コード例 #1
0
		public void WithdrawProcess(string processID, bool cancelAllBranchProcesses)
		{
			processID.CheckStringIsNullOrEmpty("processID");

			IWfProcess process = WfRuntime.GetProcessByProcessID(processID);

			WfWithdrawExecutor executor = new WfWithdrawExecutor(process.CurrentActivity, process.CurrentActivity, cancelAllBranchProcesses);

			executor.Execute();
		}
コード例 #2
0
        public static IWfProcess WithdrawByExecutor(this IWfProcess process, bool cancelProcess = false)
        {
            WfWithdrawExecutor executor = new WfWithdrawExecutor(process.CurrentActivity, process.CurrentActivity, true, cancelProcess);

            executor.Execute();

            return WfRuntime.GetProcessByProcessID(process.ID); ;
        }
コード例 #3
0
        private static IWfProcess DoWithdrawExecutor(IWfProcess originalProcess)
        {
            IWfProcess process = WfRuntime.GetProcessByProcessID(originalProcess.ID);
            WfWithdrawExecutor withdrawExecutor = new WfWithdrawExecutor(process.CurrentActivity, process.CurrentActivity);

            withdrawExecutor.Execute();

            return WfRuntime.GetProcessByProcessID(originalProcess.ID);
        }
コード例 #4
0
        public WfClientProcessInfo WithdrawAndCancel(string processID, WfClientRuntimeContext runtimeContext)
        {
            OperationContext.Current.FillContextToOguServiceContext();

            return ExecuteProcessActionByProcessID(processID, runtimeContext,
                (process) =>
                {
                    WfWithdrawExecutor executor = new WfWithdrawExecutor(process.CurrentActivity, process.CurrentActivity, true, true);

                    executor.SaveApplicationData += (dataContext) => SaveAbortOpinion(runtimeContext.Opinion);
                    return executor;
                });
        }