/// <summary>
        /// 创建一个有4个节点的流程,开始点有两条出线,根据Amount是否大于等于5000来判断
        /// </summary>
        /// <returns></returns>
        public static WfClientProcessDescriptor CreateClientProcessWithConditionLines()
        {
            WfClientProcessDescriptor processDesp = CreateSimpleClientProcessWithoutLines();

            processDesp.Activities.Add(ActivityDescriptorHelper.CreateSimpleClientActivityWithUser("N1", "CFO", "CFO", WfClientActivityType.NormalActivity));
            processDesp.Activities.Add(ActivityDescriptorHelper.CreateSimpleClientActivityWithUser("N2", "CEO", "CEO", WfClientActivityType.NormalActivity));

            WfClientTransitionDescriptor transitionToCFO = new WfClientTransitionDescriptor(processDesp.InitialActivity.Key, "N1");

            transitionToCFO.Key = "L1";
            transitionToCFO.Condition.Expression = "Amount >= 5000";
            processDesp.InitialActivity.ToTransitions.Add(transitionToCFO);

            WfClientTransitionDescriptor transitionToCEO = new WfClientTransitionDescriptor(processDesp.InitialActivity.Key, "N2");

            transitionToCEO.Key = "L2";
            transitionToCEO.Condition.Expression = "Amount < 5000";

            processDesp.InitialActivity.ToTransitions.Add(transitionToCEO);

            WfClientTransitionDescriptor transitionCEOToCFO = new WfClientTransitionDescriptor("CFO", "CEO");

            transitionCEOToCFO.Key = "L3";

            processDesp.Activities["N1"].ToTransitions.Add(transitionCEOToCFO);

            return(processDesp);
        }
        /// <summary>
        /// 创建一个没有连线的客户端流程对象
        /// </summary>
        /// <returns></returns>
        public static WfClientProcessDescriptor CreateSimpleClientProcessWithoutLines()
        {
            WfClientProcessDescriptor processDesp = new WfClientProcessDescriptor();

            processDesp.Key  = UuidHelper.NewUuidString();
            processDesp.Name = "客户端测试流程";

            processDesp.Activities.Add(ActivityDescriptorHelper.CreateSimpleClientActivityWithUser("Start", "开始", "Requestor", WfClientActivityType.InitialActivity));
            processDesp.Activities.Add(ActivityDescriptorHelper.CreateSimpleClientActivity("End", "结束", WfClientActivityType.CompletedActivity));

            processDesp.RelativeLinks.Add(new WfClientRelativeLinkDescriptor("AP1")
            {
                Category = "Process", Url = "http://www.ak47.com"
            });
            processDesp.CancelEventReceivers.Add(new WfClientUserResourceDescriptor(Consts.Users["Requestor"]));

            return(processDesp);
        }