Ejemplo n.º 1
0
 //private IEngineIntegrationService _integrationService;
 public HumanEscalationHelper(ILoggerFactory factory
     , IWorkItemService workItemService
     , IUserService userService
     , ISchedulerService schedulerService
     , ProcessService processService)
     //, IEngineIntegrationService integrationService)
     : base(factory
     , workItemService
     , userService
     , schedulerService
     , processService)
 {
     //this._integrationService = integrationService;
 }
Ejemplo n.º 2
0
        //仅抽取ProcessService实现的Goto主体逻辑
        internal static void PerformGoto(ProcessService processService
                                         , ISchedulerService schedulerService
                                         , ILog log
                                         , Process process
                                         , string activityName
                                         , out string current
                                         , out int currentNode
                                         , out int targetNode)
        {
            var setting = process.ProcessType.GetActivitySetting(activityName);

            if (setting == null)
            {
                throw new InvalidOperationException("没有找到指定节点“" + activityName + "”的定义");
            }
            if (setting.IsChildOfActivity)
            {
                throw new InvalidOperationException("不能跳转至子节点“" + activityName + "”");
            }

            currentNode = process.GetCurrentNode();
            try { current = process.ProcessType.GetActivitySetting(currentNode).ActivityName; }
            catch (Exception e)
            {
                current = "未找到定义";
                log.Warn("查找流程当前节点设置信息时异常", e);
            }
            //0.更新currentnode指向目标节点
            process.UpdateCurrentNode(targetNode = setting.FlowNodeIndex);
            process.ChangeStatus(ProcessStatus.Running);
            _repository.Update(process);
            //1.取消所有相关信息
            processService.CancelAllAbout(process);
            //2.重新创建恢复请求
            schedulerService.Add(new ProcessStartResumption(process));
        }
Ejemplo n.º 3
0
        //仅抽取ProcessService实现的Goto主体逻辑
        internal static void PerformGoto(ProcessService processService
            , ISchedulerService schedulerService
            , ILog log
            , Process process
            , string activityName
            , out string current
            , out int currentNode
            , out int targetNode)
        {
            var setting = process.ProcessType.GetActivitySetting(activityName);
            if (setting == null)
                throw new InvalidOperationException("没有找到指定节点“" + activityName + "”的定义");
            if (setting.IsChildOfActivity)
                throw new InvalidOperationException("不能跳转至子节点“" + activityName + "”");

            currentNode = process.GetCurrentNode();
            try { current = process.ProcessType.GetActivitySetting(currentNode).ActivityName; }
            catch (Exception e)
            {
                current = "未找到定义";
                log.Warn("查找流程当前节点设置信息时异常", e);
            }
            //0.更新currentnode指向目标节点
            process.UpdateCurrentNode(targetNode = setting.FlowNodeIndex);
            process.ChangeStatus(ProcessStatus.Running);
            _repository.Update(process);
            //1.取消所有相关信息
            processService.CancelAllAbout(process);
            //2.重新创建恢复请求
            schedulerService.Add(new ProcessStartResumption(process));
        }