public ActionResult TerminateProcessInst(string processInstID) { AjaxResult ajaxResult = new AjaxResult() { Result = DoResult.Failed }; string actionMessage = string.Format("终止流程实例{0}", processInstID); try { IWorkflowEngine engine = new WorkflowEngine(); engine.TerminateProcessInst(processInstID); ajaxResult.Result = DoResult.Success; ajaxResult.RetValue = AgileEAP.Workflow.Enums.ProcessInstStatus.Terminated.GetRemark(); actionMessage = actionMessage + "成功"; } catch (Exception ex) { actionMessage = actionMessage + "出错"; log.Error(actionMessage, ex); } finally { AddActionLog<ProcessInst>(actionMessage, ajaxResult.Result); } ajaxResult.PromptMsg = actionMessage; return Json(ajaxResult); }
public string Terminate(string processInstID) { AjaxResult ajaxResult = new AjaxResult(); string actionMessage = string.Format("终止流程实例{0}", processInstID); try { IWorkflowEngine engine =new WorkflowEngine(); engine.TerminateProcessInst(processInstID); ajaxResult.Result = DoResult.Success; ajaxResult.RetValue = AgileEAP.Workflow.Enums.ProcessInstStatus.Running.GetRemark(); ajaxResult.PromptMsg = actionMessage + "成功"; } catch (Exception ex) { log.Error(actionMessage + "出错", ex); } finally { AddActionLog<ProcessInst>(actionMessage, ajaxResult.Result); } return JsonConvert.SerializeObject(ajaxResult); }