Exemple #1
0
        /// <summary>
        /// 创建一个简单流程,并且启动该流程
        /// </summary>
        /// <returns></returns>
        public static WfClientProcessInfo PrepareSimpleProcessInstance()
        {
            WfClientProcessDescriptor processDesp = OperationHelper.PrepareSimpleProcess();

            WfClientProcessStartupParams clientStartupParams = ProcessRuntimeHelper.PrepareClientProcessStartupParams(processDesp.Key);

            return(WfClientProcessRuntimeServiceProxy.Instance.StartWorkflow(clientStartupParams));
        }
Exemple #2
0
        /// <summary>
        /// 创建一个有4个节点的流程,并且保存它。开始点有两条出线,根据Amount是否大于等于5000来判断。
        /// </summary>
        /// <returns></returns>
        public static WfClientProcessInfo PreapreProcessWithConditionLinesInstance()
        {
            WfClientProcessDescriptor processDesp = OperationHelper.PreapreProcessWithConditionLines();

            WfClientProcessStartupParams clientStartupParams = ProcessRuntimeHelper.PrepareClientProcessStartupParams(processDesp.Key);

            clientStartupParams.ApplicationRuntimeParameters["Amount"] = 10000;
            clientStartupParams.ProcessContext["Context"] = "This is a context";

            return(WfClientProcessRuntimeServiceProxy.Instance.StartWorkflow(clientStartupParams));
        }