예제 #1
0
        public WfActivityBuilderBase GetActivityBuilder(WfActivityType activityType)
        {
            WfActivityConfigurationElement activityElement = Activities[activityType.ToString()];

            (activityElement != null).FalseThrow <SettingsPropertyNotFoundException>("不能根据{0}找到对应的ActivityBuilder", activityType);

            return((WfActivityBuilderBase)activityElement.CreateInstance());
        }
예제 #2
0
        public static void LoadActions(IWfActivity activity)
        {
            WfActivityConfigurationElement activityElement = WfActivitySettings.GetConfig().Activities[activity.Descriptor.ActivityType.ToString()];

            if (WfRuntime.Parameters.AutoloadActions && activityElement != null)
            {
                activity.LeaveActions.CopyFrom(activityElement.GetLeaveActions());
                activity.EnterActions.CopyFrom(activityElement.GetEnterActions());

                activity.WithdrawActions.CopyFrom(activityElement.GetWithdrawActions());
                activity.BeWithdrawnActions.CopyFrom(activityElement.GetBeWithdrawnActions());
            }
        }
예제 #3
0
 /// <summary>
 /// 办结流程的操作类
 /// </summary>
 /// <returns></returns>
 public WfActionCollection GetCompleteProcessActions()
 {
     return(WfActivityConfigurationElement.GetActions(this.CompleteProcessActionsString));
 }
예제 #4
0
 /// <summary>
 /// 流程状态改变的操作类
 /// </summary>
 /// <returns></returns>
 public WfActionCollection GetProcessStatusChangeActions()
 {
     return(WfActivityConfigurationElement.GetActions(this.ProcessStatusChangeActionsString));
 }
예제 #5
0
 /// <summary>
 /// 流程撤回的操作类
 /// </summary>
 /// <returns></returns>
 public WfActionCollection GetWithdrawActions()
 {
     return(WfActivityConfigurationElement.GetActions(this.WithdrawActionsString));
 }