/// <summary> /// 获取当前节点的下一个节点信息 /// </summary> /// <param name="processId"></param> /// <param name="nodeId"></param> /// <returns></returns> public ActivityEntity GetNextActivity(string processId, string nodeId, string billUid) { _processModel = new ProcessModel(_dataAccessor, _loggerFactory, processId, billUid); var nextActivity = _processModel.GetNextActivity(nodeId); return(nextActivity); }
/// <summary> /// 获取当前节点的下一个节点信息 /// </summary> /// <param name="processId"></param> /// <param name="nodeId"></param> /// <returns></returns> public ActivityEntity GetNextActivity(string processId, string nodeId, string billUid) { _processModel = new ProcessModel(_serviceProvider, processId, billUid); var nextActivity = _processModel.GetNextActivity(nodeId); return(nextActivity); }
/// <summary> /// 获取预选步骤人员列表 /// </summary> /// <param name="runner">当前运行用户</param> /// <returns>步骤预选人员列表</returns> private IDictionary <string, PerformerList> GetNextActivityPerformersPriliminary(WfAppRunner runner) { IDictionary <string, PerformerList> nextSteps = null; var tm = new TaskManager(); TaskViewEntity taskView = tm.GetTaskOfMine(runner); //读取活动实例中记录的步骤预选数据 var aim = new ActivityInstanceManager(); if (taskView.MIHostActivityInstanceID != null) { var mainActivityInstanceID = taskView.MIHostActivityInstanceID.Value; var mainActivityInstance = aim.GetById(mainActivityInstanceID); if (mainActivityInstance != null) { nextSteps = NextStepUtility.DeserializeNextStepPerformers(mainActivityInstance.NextStepPerformers); } } IProcessModel processModel = ProcessModelFactory.Create(runner.ProcessGUID, runner.Version); var nextActivity = processModel.GetNextActivity(taskView.ActivityGUID); if (nextActivity != null) { if (nextActivity.ActivityType == ActivityTypeEnum.GatewayNode) { //获取网关节点信息 var gatewayActivityInstance = aim.GetActivityInstanceLatest(taskView.ProcessInstanceID, nextActivity.ActivityGUID); if (gatewayActivityInstance != null && !string.IsNullOrEmpty(gatewayActivityInstance.NextStepPerformers)) { nextSteps = NextStepUtility.DeserializeNextStepPerformers(gatewayActivityInstance.NextStepPerformers); } } else if (XPDLHelper.IsInterTimerEventComponentNode(nextActivity) == true) { //中间Timer事件节点 var timerActivityInstance = aim.GetActivityInstanceLatest(taskView.ProcessInstanceID, nextActivity.ActivityGUID); if (timerActivityInstance != null && !string.IsNullOrEmpty(timerActivityInstance.NextStepPerformers)) { nextSteps = NextStepUtility.DeserializeNextStepPerformers(timerActivityInstance.NextStepPerformers); } } } return(nextSteps); }
/// <summary> /// 获取预选步骤人员列表 /// </summary> /// <param name="nextActivityTree">下一步活动节点树</param> /// <param name="runner">当前运行用户</param> /// <returns>步骤预选人员列表</returns> private IDictionary <string, PerformerList> GetNextActivityPerformers(IList <NodeView> nextActivityTree, WfAppRunner runner) { IDictionary <string, PerformerList> nextSteps = null; var tm = new TaskManager(); TaskViewEntity taskView = tm.GetTaskOfMine(runner); //读取活动实例中记录的步骤预选数据 var aim = new ActivityInstanceManager(); if (taskView.MIHostActivityInstanceID != null) { var mainActivityInstanceID = taskView.MIHostActivityInstanceID.Value; var mainActivityInstance = aim.GetById(mainActivityInstanceID); if (mainActivityInstance != null) { nextSteps = NextStepUtility.DeserializeNextStepPerformers(mainActivityInstance.NextStepPerformers); } } //获取网关节点信息 IProcessModel processModel = ProcessModelFactory.Create(runner.ProcessGUID, runner.Version); var nextActivity = processModel.GetNextActivity(taskView.ActivityGUID); if (nextActivity.ActivityType == ActivityTypeEnum.GatewayNode) { var gatewayActivityInstance = aim.GetActivityInstanceLatest(taskView.ProcessInstanceID, nextActivity.ActivityGUID); if (gatewayActivityInstance != null && !string.IsNullOrEmpty(gatewayActivityInstance.NextStepPerformers)) { nextSteps = NextStepUtility.DeserializeNextStepPerformers(gatewayActivityInstance.NextStepPerformers); } } return(nextSteps); }