예제 #1
0
        /// <summary>
        /// 创建下一步活动的节点
        /// </summary>
        /// <param name="activity"></param>
        /// <returns></returns>
        internal static NextActivityComponent CreateNextActivityComponent(TransitionEntity transition,
                                                                          ActivityEntity activity)
        {
            NextActivityComponent component = null;

            if (XPDLHelper.IsSimpleComponentNode(activity.ActivityType) == true)           //可流转简单类型节点
            {
                string name = "单一节点";
                component = new NextActivityItem(name, transition, activity);
            }
            else if (activity.ActivityType == ActivityTypeEnum.SubProcessNode)
            {
                string name = "子流程节点";
                component = new NextActivityItem(name, transition, activity);
            }
            else
            {
                string name = string.Empty;
                if (activity.GatewayDirectionType == Slickflow.Engine.Common.GatewayDirectionEnum.AndSplit)
                {
                    name = "必全选节点";
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.AndSplitMI)
                {
                    name = "并行多实例节点";
                }
                else
                {
                    name = "或多选节点";
                }

                component = new NextActivityGateway(name, transition, activity);
            }
            return(component);
        }
예제 #2
0
        /// <summary>
        /// 创建上一步根显示节点
        /// </summary>
        /// <returns>根节点</returns>
        internal static NextActivityComponent CreatePreviousActivityComponent()
        {
            //上一步步骤列表
            NextActivityComponent root = new NextActivityGateway(LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.previoussteplist"),
                                                                 null, null);

            return(root);
        }
        /// <summary>
        /// 创建下一步活动的节点
        /// </summary>
        /// <param name="transition">转移</param>
        /// <param name="activity">活动</param>
        /// <returns>下一步节点封装</returns>
        internal static NextActivityComponent CreateNextActivityComponent(TransitionEntity transition,
                                                                          ActivityEntity activity)
        {
            string name = string.Empty;
            NextActivityComponent component = null;

            if (XPDLHelper.IsSimpleComponentNode(activity.ActivityType) == true)           //可流转简单类型节点
            {
                name      = "单一节点";
                component = new NextActivityItem(name, transition, activity);
            }
            else if (XPDLHelper.IsIntermediateEventComponentNode(activity.ActivityType) == true)
            {
                name      = "跨事件节点";
                component = new NextActivityIntermediate(name, transition, activity);
            }
            else if (XPDLHelper.IsGatewayComponentNode(activity.ActivityType) == true)
            {
                if (activity.GatewayDirectionType == GatewayDirectionEnum.AndSplit)
                {
                    name      = "必全选节点";
                    component = new NextActivityGateway(name, transition, activity);
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.AndSplitMI)
                {
                    name      = "并行多实例节点";
                    component = new NextActivityGateway(name, transition, activity);
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.OrSplit ||
                         activity.GatewayDirectionType == GatewayDirectionEnum.OrSplitMI ||
                         activity.GatewayDirectionType == GatewayDirectionEnum.XOrSplit)
                {
                    name      = "或多选节点";
                    component = new NextActivityGateway(name, transition, activity);
                }
                else
                {
                    throw new WfXpdlException(string.Format("无法创建下一步节点列表,不明确的分支类型:{0}",
                                                            activity.GatewayDirectionType.ToString()));
                }
            }
            else if (activity.ActivityType == ActivityTypeEnum.SubProcessNode)
            {
                name      = "子流程节点";
                component = new NextActivityItem(name, transition, activity);
            }
            else
            {
                throw new WfXpdlException(string.Format("无法创建下一步节点列表,不明确的节点类型:{0}",
                                                        activity.ActivityType.ToString()));
            }

            return(component);
        }
예제 #4
0
        /// <summary>
        /// 创建下一步活动的节点
        /// </summary>
        /// <param name="transition">转移</param>
        /// <param name="activity">活动</param>
        /// <returns>下一步节点封装</returns>
        internal static NextActivityComponent CreateNextActivityComponent(TransitionEntity transition,
                                                                          ActivityEntity activity)
        {
            string name = string.Empty;
            NextActivityComponent component = null;

            if (XPDLHelper.IsSimpleComponentNode(activity.ActivityType) == true)           //可流转简单类型节点
            {
                //单一节点
                name      = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.singlenode");
                component = new NextActivityItem(name, transition, activity);
            }
            else if (XPDLHelper.IsIntermediateEventComponentNode(activity.ActivityType) == true)
            {
                //跨事件节点
                name      = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.intermediatenode");
                component = new NextActivityIntermediate(name, transition, activity);
            }
            else if (XPDLHelper.IsGatewayComponentNode(activity.ActivityType) == true)
            {
                if (activity.GatewayDirectionType == GatewayDirectionEnum.AndSplit ||
                    activity.GatewayDirectionType == GatewayDirectionEnum.AndJoin)
                {
                    //必全选节点
                    name = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.mandatorycheckall");
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.AndSplitMI ||
                         activity.GatewayDirectionType == GatewayDirectionEnum.AndJoinMI)
                {
                    //并行多实例节点
                    name = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.parallelmultipleinstance");
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.OrSplit ||
                         activity.GatewayDirectionType == GatewayDirectionEnum.OrJoin)
                {
                    //或多选节点
                    name = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.orsplitorjoin");
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.XOrSplit ||
                         activity.GatewayDirectionType == GatewayDirectionEnum.XOrJoin)
                {
                    //异或节点
                    name = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.xor");
                }
                else if (activity.GatewayDirectionType == GatewayDirectionEnum.EOrJoin)
                {
                    //增强合并多选节点
                    name = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.eorjoin");
                }
                else
                {
                    throw new WfXpdlException(LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.CreateNextActivityComponent.gateway.error",
                                                                              activity.GatewayDirectionType.ToString()));
                }
                component = new NextActivityGateway(name, transition, activity);
            }
            else if (activity.ActivityType == ActivityTypeEnum.SubProcessNode)
            {
                //子流程节点
                name      = LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.subprocess");
                component = new NextActivityItem(name, transition, activity);
            }
            else
            {
                throw new WfXpdlException(LocalizeHelper.GetEngineMessage("nextactivitycomponentfactory.CreateNextActivityComponent.error",
                                                                          activity.ActivityType.ToString()));
            }

            return(component);
        }
예제 #5
0
        /// <summary>
        /// 创建根显示节点
        /// </summary>
        /// <returns></returns>
        internal static NextActivityComponent CreateNextActivityComponent()
        {
            NextActivityComponent root = new NextActivityGateway("下一步步骤列表", null, null);

            return(root);
        }