本文整理汇总了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;
}
示例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;
}
示例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;
}
}
}
示例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");
}
}