public WfStartBranchProcessExecutor(IWfActivity operatorActivity, IWfActivity ownerActivity, IWfBranchProcessTemplateDescriptor template)
			: base(operatorActivity, WfControlOperationType.StartBranchProcess)
		{
			ownerActivity.NullCheck("ownerActivity");
			template.NullCheck("template");

			this.OwnerActivity = ownerActivity;
			this.BranchTransferParams = new WfBranchProcessTransferParams(template);
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="ownerActivityID">分支流程所挂接的活动</param>
		/// <param name="template">分支流程模板</param>
		/// <param name="autoAddExitMaintainingStatusTask">是否在最后补充一个退出维护模式的任务</param>
		public StartBranchProcessSysTaskProcessBuilder(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
		{
			ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
			template.NullCheck("template");

			this.OwnerActivityID = ownerActivityID;
			this.Template = template;
			this.AutoAddExitMaintainingStatusTask = autoAddExitMaintainingStatusTask;
		}
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ownerActivityID">分支流程所挂接的活动</param>
        /// <param name="template">分支流程模板</param>
        /// <param name="autoAddExitMaintainingStatusTask">是否在最后补充一个退出维护模式的任务</param>
        public StartBranchProcessSysTaskProcessBuilder(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
        {
            ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
            template.NullCheck("template");

            this.OwnerActivityID = ownerActivityID;
            this.Template        = template;
            this.AutoAddExitMaintainingStatusTask = autoAddExitMaintainingStatusTask;
        }
Пример #4
0
        public WfStartBranchProcessExecutor(IWfActivity operatorActivity, IWfActivity ownerActivity, IWfBranchProcessTemplateDescriptor template)
            : base(operatorActivity, WfControlOperationType.StartBranchProcess)
        {
            ownerActivity.NullCheck("ownerActivity");
            template.NullCheck("template");

            this.OwnerActivity        = ownerActivity;
            this.BranchTransferParams = new WfBranchProcessTransferParams(template);
        }
		public int DispatchStartBranchProcessTasks(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
		{
			ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
			template.NullCheck("template");

			StartBranchProcessSysTaskProcessBuilder builder = new StartBranchProcessSysTaskProcessBuilder(ownerActivityID, template, autoAddExitMaintainingStatusTask);

			SysTaskProcess sysTaskProcess = builder.Build();

			SysTaskProcessRuntime.StartProcess(sysTaskProcess);

			return sysTaskProcess.Activities.Count;
		}
Пример #6
0
        public int DispatchStartBranchProcessTasks(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
        {
            ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
            template.NullCheck("template");

            StartBranchProcessSysTaskProcessBuilder builder = new StartBranchProcessSysTaskProcessBuilder(ownerActivityID, template, autoAddExitMaintainingStatusTask);

            SysTaskProcess sysTaskProcess = builder.Build();

            SysTaskProcessRuntime.StartProcess(sysTaskProcess);

            return(sysTaskProcess.Activities.Count);
        }
		public DispatchStartBranchProcessTask(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
			: base()
		{
			ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
			template.NullCheck("template");

			this.OwnerActivityID = ownerActivityID;
			this.Template = template;
			this.AutoAddExitMaintainingStatusTask = autoAddExitMaintainingStatusTask;

			this.InitServiceDefinitions();
			this.Context["template"] = this.Template;
		}
        public DispatchStartBranchProcessTask(string ownerActivityID, IWfBranchProcessTemplateDescriptor template, bool autoAddExitMaintainingStatusTask)
            : base()
        {
            ownerActivityID.CheckStringIsNullOrEmpty("ownerActivityID");
            template.NullCheck("template");

            this.OwnerActivityID = ownerActivityID;
            this.Template        = template;
            this.AutoAddExitMaintainingStatusTask = autoAddExitMaintainingStatusTask;

            this.InitServiceDefinitions();
            this.Context["template"] = this.Template;
        }
Пример #9
0
        /// <summary>
        /// 构造方法。根据分支流程模板以及传递进来的人员初始化BranchParams
        /// </summary>
        /// <param name="template"></param>
        /// <param name="users"></param>
        public WfBranchProcessTransferParams(IWfBranchProcessTemplateDescriptor template, IEnumerable <IUser> users)
        {
            template.NullCheck("template");
            users.NullCheck("users");

            this._Template = template;
            this.BranchParams.Add(users);

            if (template.DefaultTaskTitle.IsNotEmpty())
            {
                this.BranchParams.ForEach(b => b.DefaultTaskTitle = template.DefaultTaskTitle);
            }
        }
Пример #10
0
        /// <summary>
        /// 构造方法。根据分支流程模板以及其中的资源初始化BranchParams
        /// </summary>
        /// <param name="template"></param>
        public WfBranchProcessTransferParams(IWfBranchProcessTemplateDescriptor template)
        {
            template.NullCheck("template");

            this._Template = template;

            OguDataCollection <IUser> users = PrepareBranchTransferUsers(template);

            if (template.ExecuteSequence == WfBranchProcessExecuteSequence.SerialInSameProcess)
            {
                //串行流程中,仅仅启动一个流程
                this.BranchParams.Add(new WfBranchProcessStartupParams(users));
            }
            else
            {
                this.BranchParams.Add(users);
            }

            if (template.DefaultTaskTitle.IsNotEmpty())
            {
                this.BranchParams.ForEach(b => b.DefaultTaskTitle = template.DefaultTaskTitle);
            }
        }