Пример #1
0
        /// <summary>
        /// 构造并且发送任务到任务列表中
        /// </summary>
        /// <param name="processID"></param>
        /// <param name="cancelAllBranchProcesses"></param>
        /// <returns></returns>
        public static DispatchCancelBranchProcessesTask SendTask(string ownerSysActivityID, string ownerActivityID, bool cancelAllBranchProcesses)
        {
            DispatchCancelBranchProcessesTask task = CreateTask(ownerSysActivityID, ownerActivityID, cancelAllBranchProcesses);

            InvokeServiceTaskAdapter.Instance.Update(task);

            return(task);
        }
		public static DispatchCancelBranchProcessesTask CreateTask(string ownerSysActivityID, string ownerActivityID, bool cancelAllBranchProcesses)
		{
			DispatchCancelBranchProcessesTask task = new DispatchCancelBranchProcessesTask(ownerSysActivityID, ownerActivityID, cancelAllBranchProcesses);

			task.TaskID = UuidHelper.NewUuidString();
			task.ResourceID = ownerActivityID;
			task.TaskTitle = string.Format("作废活动下{0}的分支流程", ownerActivityID);

			return task;
		}
Пример #3
0
        public static DispatchCancelBranchProcessesTask CreateTask(string ownerSysActivityID, string ownerActivityID, bool cancelAllBranchProcesses)
        {
            DispatchCancelBranchProcessesTask task = new DispatchCancelBranchProcessesTask(ownerSysActivityID, ownerActivityID, cancelAllBranchProcesses);

            task.TaskID     = UuidHelper.NewUuidString();
            task.ResourceID = ownerActivityID;
            task.TaskTitle  = string.Format("作废活动下{0}的分支流程", ownerActivityID);

            return(task);
        }
        /// <summary>
        /// 创建一个分发作废流程任务流程的任务活动
        /// </summary>
        /// <param name="sysTaskProcess"></param>
        /// <param name="ownerActivityID"></param>
        /// <param name="cancelAllBranchProcesses"></param>
        /// <param name="index"></param>
        /// <returns></returns>
        public static SysTaskActivity CreateDispatchCancelBranchesProcessActivity(this SysTaskProcess sysTaskProcess, string ownerActivityID, bool cancelAllBranchProcesses, int index)
        {
            string activityID = UuidHelper.NewUuidString();

            DispatchCancelBranchProcessesTask task = DispatchCancelBranchProcessesTask.CreateTask(activityID, ownerActivityID, cancelAllBranchProcesses);

            SysTaskActivity activity = WfSysTaskActivityHelper.CreateActivity(
                sysTaskProcess,
                index,
                string.Format("分派作废活动ID为{0}的分支流程的任务流程活动", ownerActivityID, index),
                task);

            activity.ID = activityID;

            SysTaskProcessRuntime.ProcessContext.AffectedActivities.AddOrReplace(activity);

            return(activity);
        }