Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ownerActivity"></param>
        /// <param name="transferParams"></param>
        /// <returns></returns>
        public IWfOperation CreateOperation(IWfAnchorActivity ownerActivity, WfBranchesTransferParams transferParams)
        {
            WfOperation operation = new WfOperation(ownerActivity, transferParams);

            operation.AutoTransferReceivers.CopyFrom(transferParams.AutoTransferReceivers);

            return(operation);
        }
Example #2
0
        private void InitializeBranchProcesses(IWfAnchorActivity ownerActivity, WfBranchesTransferParams transferParams)
        {
            for (int i = 0; i < transferParams.BranchParams.Count; i++)
            {
                WfBranchStartupParams branchParam = (WfBranchStartupParams)transferParams.BranchParams[i];

                InitializeBranchProcess(transferParams.Operator, i, branchParam);
            }
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        public virtual IWfOperation AddNewOperation(WfBranchesTransferParams transferParams)
        {
            IWfOperation newOperation = this.Process.Factory.CreateOperation(this, transferParams);

            this.Operations.Add(newOperation);

            WorkflowSettings.GetConfig().EnqueueWorkItemExecutor.EnqueueAddNewOperationWorkItem(newOperation);

            return(newOperation);
        }
Example #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="process"></param>
        /// <param name="transParams"></param>
        /// <returns></returns>
        public IWfAnchorActivity CreateAnchorActivity(IWfProcess process, WfBranchesTransferParams transParams)
        {
            WfAnchorActivity activity = new WfAnchorActivity((IWfAnchorActivityDescriptor)transParams.NextActivityDescriptor);

            activity.Process = process;

            activity.Operations.Add(CreateOperation(activity, transParams));


            return(activity);
        }
Example #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ownerActivity"></param>
        /// <param name="transferParams"></param>
        internal protected WfOperation(IWfAnchorActivity ownerActivity, WfBranchesTransferParams transferParams)
            : this(ownerActivity)
        {
            this.Descriptor      = transferParams.OperationDescriptor;
            this.OperationalType = transferParams.OperationalType;
            this.OpState         = State.Added;

            //根据分支流程的相关启动参数 启动分支流程 , 形成WfBranchProcessInfo
            InitializeBranchProcesses(ownerActivity, transferParams);
            MoveToBranchProcessesFirstActivity();
        }