本文整理汇总了C#中Slickflow.Engine.Service.WorkflowService.WithdrawProcess方法的典型用法代码示例。如果您正苦于以下问题:C# WorkflowService.WithdrawProcess方法的具体用法?C# WorkflowService.WithdrawProcess怎么用?C# WorkflowService.WithdrawProcess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slickflow.Engine.Service.WorkflowService
的用法示例。
在下文中一共展示了WorkflowService.WithdrawProcess方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WithdrawProcess
public ResponseResult WithdrawProcess(WfAppRunner runner)
{
IWorkflowService wfService = new WorkflowService();
IDbConnection conn = SessionFactory.CreateConnection();
IDbTransaction trans = null;
try
{
trans = conn.BeginTransaction();
var result = wfService.WithdrawProcess(conn, runner, trans);
if (result.Status == WfExecutedStatus.Success)
{
trans.Commit();
return ResponseResult.Success();
}
else
{
trans.Rollback();
return ResponseResult.Error(result.Message);
}
}
catch (WorkflowException w)
{
trans.Rollback();
return ResponseResult.Error(w.Message);
}
finally
{
trans.Dispose();
if (conn.State == ConnectionState.Open)
conn.Close();
}
}
示例2: btnWithdraw_Click
/// <summary>
/// 撤销流程
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnWithdraw_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";
IWorkflowService wfService = new WorkflowService();
var result = wfService.WithdrawProcess(appRunner);
var msg = string.Format("流程撤销结果:{0}\r\n", result.Status);
textBox1.Text += msg;
}