public void Create()
 {
     var pmb     = ProcessModelBuilder.CreateProcess("LeaveRequest", "LeaveRequestCode");
     var process = pmb.Start("Start")
                   .Task("Fill Leave Days")
                   .OrSplit("OrSplit")
                   .Parallels(
         () => pmb.Branch(
             () => pmb.Task(
                 VertexBuilder.CreateTask("CEO Evaluate"),
                 LinkBuilder.CreateTransition("days>=3")
                 .AddCondition(ConditionTypeEnum.Expression, "days>=3")
                 )
             )
         , () => pmb.Branch(
             () => pmb.Task(
                 VertexBuilder.CreateTask("Manager Evaluate"),
                 LinkBuilder.CreateTransition("days<3")
                 .AddCondition(ConditionTypeEnum.Expression, "days<3")
                 )
             )
         )
                   .OrJoin("OrJoin")
                   .Task("HR Notify")
                   .End("End")
                   .Store();
 }
        public string Create()
        {
            string message = "OK";

            try
            {
                var pmb     = ProcessModelBuilder.CreateProcess("EDevTrainingApproval", "EDevTrainingApprovalFlow");
                var process = pmb.Start("Start")
                              .Task("Approvers in Progress")   //1st Approval In progress
                              .Task("Approvers in Progress")   //2nd Approval In progress
                              .OrSplit("3rd Approval Need?")
                              .Parallels(
                    () => pmb.Branch(
                        () => pmb.Task(
                            VertexBuilder.CreateTask("Approvers in Progress"),                            //3rd Approval In progress
                            LinkBuilder.CreateTransition("Required 3rd Approval")
                            .AddCondition(ConditionTypeEnum.Expression, "Norminated = 4")                 //Training Type (Attend duing office Hour)
                            )
                        ),
                    () => pmb.Branch(
                        () => pmb.Dumb()
                        )
                    )
                              .Task("SND in Process", "SNDInProcessCode", null, true)   //SND in Process
                              .OrSplit("Claims?")
                              .Parallels(
                    false,
                    (a) => pmb.Branch(
                        a,
                        () => pmb.Task(
                            VertexBuilder.CreateEnd("End"),
                            LinkBuilder.CreateTransition("Completed Enrollment w/o Claim")
                            .AddCondition(ConditionTypeEnum.Expression, "Claims = 0")
                            )
                        ),

                    //Claim = 1
                    (a) => pmb.Branch(
                        a,
                        () => pmb.OrSplit("Pre Approval Claim ?")
                        .Parallels(
                            () => pmb.Branch(
                                () => pmb.Dumb()
                                ),
                            () => pmb.Branch(
                                () => pmb.Task(
                                    VertexBuilder.CreateTask("Pending for Reimbursement"),
                                    LinkBuilder.CreateTransition("Completed Enrollment w/o Claim")
                                    .AddCondition(ConditionTypeEnum.Expression, "Norminated = 4")
                                    )
                                )
                            )
                        .Task("Pending for Finance Reimbursement", "PendingforFinaceReimbursementCode", null, true)
                        .End("End Workflow")
                        )
                    )
                              .Store();
            }
            catch (System.Exception ex)
            {
                message = ex.Message;
            }
            return(message);
        }