當前位置: 首頁>>代碼示例>>C#>>正文


C# WorkflowService.JumpProcess方法代碼示例

本文整理匯總了C#中Slickflow.Engine.Service.WorkflowService.JumpProcess方法的典型用法代碼示例。如果您正苦於以下問題:C# WorkflowService.JumpProcess方法的具體用法?C# WorkflowService.JumpProcess怎麽用?C# WorkflowService.JumpProcess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Slickflow.Engine.Service.WorkflowService的用法示例。


在下文中一共展示了WorkflowService.JumpProcess方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: btnBackward_Click

        /// <summary>
        /// 退回流程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBackward_Click(object sender, EventArgs e)
        {
            WfAppRunner appRunner = new WfAppRunner();
            appRunner.ProcessGUID = process_guid;
            appRunner.AppInstanceID = application_instance_id;
            appRunner.AppName = "WallwaOrder";
            appRunner.UserID = "1";
            appRunner.UserName = "admin";

            //下一步執行人
            PerformerList list = new PerformerList();
            Performer p = new Performer("13", "andun");//下一步人ID,Name
            list.Add(p);
            Dictionary<String, PerformerList> dict = new Dictionary<String, PerformerList>();
            dict.Add("fc8c71c5-8786-450e-af27-9f6a9de8560f", list); //print activity:"fc8c71c5-8786-450e-af27-9f6a9de8560f"下一步節點的標識ID
            appRunner.NextActivityPerformers = dict;

            IWorkflowService wfService = new WorkflowService();
            var result = wfService.JumpProcess(appRunner);

            var msg = string.Format("流程跳轉回退結果:{0}\r\n", result.Status);
            textBox1.Text += msg;
        }
開發者ID:zengfanlin,項目名稱:Slickflow,代碼行數:28,代碼來源:FlowForm.cs

示例2: RunProcess

        /// <summary>
        /// 工作流運行
        /// </summary>
        /// <param name="session"></param>
        /// <param name="runner"></param>
        /// <returns></returns>
        public WfExecutedResult RunProcess(IDbSession session, WfAppRunner runner, IDictionary<string, string> conditions = null)
        {
            var result = new WfExecutedResult();
            var wfService = new WorkflowService();
            var nodeViewList = wfService.GetNextActivityTree(runner, conditions).ToList<NodeView>();

            foreach (var node in nodeViewList)
            {
                var performerList = wfService.GetPerformerList(node);       //根據節點角色定義,讀取執行者列表
                Dictionary<string, PerformerList> dict = new Dictionary<string, PerformerList>();
                dict.Add(node.ActivityGUID, performerList);
                runner.NextActivityPerformers = dict;

                if (node.IsSkipTo == true)
                {
                    result = wfService.JumpProcess(session.Connection, runner, session.Transaction);
                }
                else
                {
                    result = wfService.RunProcessApp(session.Connection, runner, session.Transaction);
                }
            }
            return result;
        }
開發者ID:huoxudong125,項目名稱:Slickflow,代碼行數:30,代碼來源:WfAppInteropService.cs

示例3: btnSkip_Click

        /// <summary>
        /// XML節點預定義跳轉
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSkip_Click(object sender, EventArgs e)
        {
            WfAppRunner appRunner = new WfAppRunner();
            appRunner.ProcessGUID = process_guid;
            appRunner.AppInstanceID = application_instance_id;
            appRunner.AppName = "WallwaOrder";
            appRunner.UserID = "13";
            appRunner.UserName = "andun";

            IWorkflowService wfService = new WorkflowService();
            var nodeViewList = wfService.GetNextActivityTree(appRunner);
            if (nodeViewList != null && nodeViewList.Count() == 1)
            {
                var nodeView = nodeViewList[0];
                if (nodeView.IsSkipTo == true)
                {
                    //下一步執行人
                    PerformerList list = new PerformerList();
                    Performer p = new Performer("1", "admin");//下一步人ID,Name
                    list.Add(p);
                    Dictionary<String, PerformerList> dict = new Dictionary<String, PerformerList>();
                    dict.Add(nodeView.ActivityGUID, list); //nodeView.ID  下一步節點的標識ID
                    appRunner.NextActivityPerformers = dict;

                    var result = wfService.JumpProcess(appRunner);
                    var msg = string.Format("流程跳轉結果:{0}\r\n", result.Status);
                    textBox1.Text += msg;
                }
            }
        }
開發者ID:zengfanlin,項目名稱:Slickflow,代碼行數:35,代碼來源:FlowForm.cs

示例4: btnOutput_Click

         /// <summary>
        /// 輸出節點
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOutput_Click(object sender, EventArgs e)
        {
            WfAppRunner appRunner = new WfAppRunner();
            appRunner.ProcessGUID = process_guid;
            appRunner.AppInstanceID = application_instance_id;
            appRunner.AppName = application_name;
            appRunner.UserID = per_dict["andun"];
            appRunner.UserName = "andun";

            var wfService = new WorkflowService();
            var nextSteps = wfService.GetNextActivityTree(appRunner);

            if (nextSteps != null)
            {
                //構造下一步辦理人的信息
                string msg2 = string.Empty;

                foreach (NodeView nodeView in nextSteps)
                {
                    //當前用例隻有一個節點能夠向下流轉
                    appRunner.NextActivityPerformers = CreateNextActivityPerformers(nodeView);

                    if (nodeView.IsSkipTo == true)
                    {
                        var j2 = wfService.JumpProcess(appRunner);
                        msg2 = string.Format("執行【輸出】並跳轉:{0}, {1}\r\n", j2.Status, j2.Message);

                        WriteText(msg2);

                        if (j2.Status == WfExecutedStatus.Success)
                        {
                            WriteText(string.Format("任務已經發送到下一節點:{0}\r\n\r\n", nodeView.ActivityName));
                        }
                    }
                    else
                    {
                        var r2 = wfService.RunProcessApp(appRunner);
                        msg2 = string.Format("執行【輸出】:{0}\r\n", r2.Message);

                        WriteText(msg2);

                        if (r2.Status == WfExecutedStatus.Success)
                        {
                            WriteText(string.Format("任務已經發送到下一節點:{0}\r\n", nodeView.ActivityName));
                        }
                    }
                }

            }
            else
            {
                WriteText("您當前沒有辦理任務!\r\n");
            }
        }
開發者ID:huoxudong125,項目名稱:Slickflow,代碼行數:59,代碼來源:MOrderUserCaseForm.cs


注:本文中的Slickflow.Engine.Service.WorkflowService.JumpProcess方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。