/// <summary> /// 执行外部操作的方法 /// </summary> /// <param name="actionList"></param> /// <param name="actionMethodParameters"></param> public void ExecteActionList(IList <ActionEntity> actionList, IDictionary <string, ActionParameterInternal> actionMethodParameters) { if (actionList != null && actionList.Count > 0) { var actionExecutor = new ActionExecutor(); actionExecutor.ExecteActionList(actionList, actionMethodParameters); } }
/// <summary> /// 触发后执行外部操作的方法 /// </summary> /// <param name="actionList">操作列表</param> /// <param name="delegateService">委托服务</param> internal static void ExecteActionListAfter(IList <ActionEntity> actionList, IDelegateService delegateService) { if (actionList != null && actionList.Count > 0) { var list = actionList.Where(a => a.FireType == FireTypeEnum.After).ToList(); if (list != null && list.Count > 0) { ActionExecutor.ExecteActionList(list, delegateService); } } }
/// <summary> /// 触发后执行 /// </summary> protected void OnAfterExecuteWorkItem() { var delegateService = GetDelegateService(); var actionList = this.EventActivity.ActionList; ActionExecutor.ExecteActionListAfter(actionList, delegateService as IDelegateService); //----> 节点流转完成后,调用活动完成执行的委托事件 DelegateExecutor.InvokeExternalDelegate(this.Session, EventFireTypeEnum.OnActivityExecuted, this.EventActivity, ActivityForwardContext); }
/// <summary> /// 触发后执行 /// </summary> protected void OnAfterExecuteWorkItem() { var delegateService = GetDelegateService(); var actionList = (this is NodeMediatorEnd) ? Linker.ToActivity.ActionList : Linker.FromActivity.ActionList; ActionExecutor.ExecteActionListAfter(actionList, delegateService as IDelegateService); //----> 节点流转完成后,调用活动完成执行的委托事件 var currentActivity = Linker.ToActivity != null ? Linker.ToActivity : Linker.FromActivity; DelegateExecutor.InvokeExternalDelegate(this.Session, EventFireTypeEnum.OnActivityExecuted, currentActivity, ActivityForwardContext); }
/// <summary> /// 触发前执行 /// </summary> protected void OnBeforeExecuteWorkItem() { var delegateService = GetDelegateService(); var actionList = Linker.FromActivity.ActionList; ActionExecutor.ExecteActionListBefore(actionList, delegateService as IDelegateService); //----> 节点流转前,调用活动执行的委托事件 var currentActivity = Linker.ToActivity != null ? Linker.ToActivity : Linker.FromActivity; DelegateExecutor.InvokeExternalDelegate(this.Session, EventFireTypeEnum.OnActivityExecuting, currentActivity, ActivityForwardContext); }