예제 #1
0
        void manager_SubWorkflowStarted(object sender, HA.Workflow.Services.Interfaces.SubWorkflowArgs e)
        {
            MasterPage      master  = this.Master as MasterPage;
            WorkflowManager manager = master.workflowManager;

            Guid       cartableId = new Guid(Session["CartableId"].ToString());
            wfCartable OldCart    = (from cart in context.wfCartable
                                     where cart.CartableId == cartableId
                                     select cart).First();

            OldCart.wfWorkflowStatusReference.Load();
            OldCart.wfWorkflowStatus = context.wfWorkflowStatus.First(id => id.Status == "Wait");


            wfCartable cartable = new wfCartable();

            cartable.CartableId       = Guid.NewGuid();
            cartable.ItemId           = Convert.ToInt32(Request.QueryString["ItemId"].ToString());
            cartable.WorkflowId       = e.InstanceId;
            cartable.CreateDate       = DateTime.Now;
            cartable.ParentWorkflowId = e.ParentWorkflowId;

            cartable.wfWorkflowStatus = context.wfWorkflowStatus.First(id => id.Status == "Run") as wfWorkflowStatus;
            cartable.wfActivityStates = context.wfActivityStates.First(id => id.ActivityStateName == manager._PageToGoTO) as wfActivityStates;

            context.AddTowfCartable(cartable);
        }
예제 #2
0
        void workflowManager_SubWorkflowCompleted(object sender, HA.Workflow.Services.Interfaces.SubWorkflowArgs e)
        {
            Guid       parentId = e.ParentWorkflowId;
            wfCartable OldCart  = (from cart in context.wfCartable
                                   where cart.WorkflowId == parentId && cart.wfWorkflowStatus.Status == "Wait"
                                   select cart).First();

            OldCart.wfWorkflowStatusReference.Load();

            OldCart.wfWorkflowStatus = context.wfWorkflowStatus.First(id => id.Status == "Completed");
            OldCart.ActionDate       = DateTime.Now;
        }
예제 #3
0
 void workflowManager_SubWorkflowStarted(object sender, HA.Workflow.Services.Interfaces.SubWorkflowArgs e)
 {
 }