public void CancelProcess(string processID, bool cancelAllBranchProcesses) { processID.CheckStringIsNullOrEmpty("processID"); IWfProcess process = WfRuntime.GetProcessByProcessID(processID); IWfActivity currentActivity = process.CurrentActivity; //仅作废当前流程 WfCancelProcessExecutor executor = new WfCancelProcessExecutor(process.CurrentActivity, process, cancelAllBranchProcesses); executor.Execute(); }
protected void cancelProcess_ExecuteStep(object data) { IWfProcess process = WfRuntime.GetProcessByProcessID((string)data); CheckPermission(process); WfCancelProcessExecutor executor = new WfCancelProcessExecutor(null, process); executor.Execute(); }
protected override WfExecutorBase CreateExecutor() { WfCancelProcessExecutor executor = new WfCancelProcessExecutor(WfClientContext.Current.CurrentActivity, WfClientContext.Current.CurrentActivity.ApprovalRootActivity.Process); executor.PrepareApplicationData += new ExecutorEventHandler(executor_PrepareApplicationData); executor.PrepareNotifyTasks += new PrepareTasksEventHandler(executor_PrepareNotifyTasks); executor.SaveApplicationData += new ExecutorEventHandler(executor_SaveApplicationData); return executor; }
public static IWfProcess CancelByExecutor(this IWfProcess process) { WfCancelProcessExecutor executor = new WfCancelProcessExecutor(process.CurrentActivity, process); executor.Execute(); return process; }
public WfClientProcessInfo Cancel(string processID, WfClientRuntimeContext runtimeContext) { OperationContext.Current.FillContextToOguServiceContext(); return ExecuteProcessActionByProcessID(processID, runtimeContext, (process) => { WfCancelProcessExecutor executor = new WfCancelProcessExecutor(process.CurrentActivity, process); executor.SaveApplicationData += (dataContext) => SaveAbortOpinion(runtimeContext.Opinion); return executor; }); }