Exemplo n.º 1
0
        /// <summary>
        /// 创建方法
        /// </summary>
        /// <param name="matchedType">匹配类型</param>
        /// <param name="root">根节点</param>
        /// <returns>下一步匹配结果</returns>
        internal static NextActivityMatchedResult CreateNextActivityMatchedResultObject(NextActivityMatchedType matchedType,
                                                                                        NextActivityComponent root)
        {
            NextActivityMatchedResult result = new NextActivityMatchedResult(matchedType, root);

            switch (matchedType)
            {
            case NextActivityMatchedType.Unknown:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.Unkonwn");
                break;

            case NextActivityMatchedType.Failed:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.Exceptional");
                break;

            case NextActivityMatchedType.Successed:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.Successed");
                break;

            case NextActivityMatchedType.NoneTransitionFilteredByCondition:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.NoneTransitionFilteredByCondition");
                break;

            case NextActivityMatchedType.WaitingForOtherSplitting:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.WaitingForOtherSplitting");
                break;

            case NextActivityMatchedType.WaitingForAgreedOrRefused:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.WaitingForAgreedOrRefused");
                break;

            case NextActivityMatchedType.NoneTransitionMatchedToSplit:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.NoneWayMatchedToSplit");
                break;

            case NextActivityMatchedType.FailedPassRateOfMulitipleInstance:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.FailedPassRateOfMulitipleInstance");
                break;

            case NextActivityMatchedType.WaitingForOthersJoin:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.WaitingForOthersJoin");
                break;

            case NextActivityMatchedType.NotMadeItselfToJoin:
                result.Message = LocalizeHelper.GetEngineMessage("nextactivitymatchedresult.NotMadeItselfToJoin");
                break;
            }
            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 创建方法
        /// </summary>
        /// <param name="scheduleStatus"></param>
        /// <param name="root"></param>
        /// <returns></returns>
        internal static NextActivityMatchedResult CreateNextActivityMatchedResultObject(NextActivityMatchedType matchedType,
                                                                                        NextActivityComponent root)
        {
            NextActivityMatchedResult result = new NextActivityMatchedResult(matchedType, root);

            switch (matchedType)
            {
            case NextActivityMatchedType.Unknown:
                result.Message = NextActivityMatchedResult.Unkonwn;
                break;

            case NextActivityMatchedType.Failed:
                result.Message = NextActivityMatchedResult.Exceptional;
                break;

            case NextActivityMatchedType.Successed:
                result.Message = NextActivityMatchedResult.Successed;
                break;

            case NextActivityMatchedType.NoneTransitionFilteredByCondition:
                result.Message = NextActivityMatchedResult.NoneTransitionFilteredByCondition;
                break;

            case NextActivityMatchedType.WaitingForSplitting:
                result.Message = NextActivityMatchedResult.NoneTransitionAsBeingFiltered;
                break;

            case NextActivityMatchedType.NoneTransitionMatchedToSplit:
                result.Message = NextActivityMatchedResult.NoneWayMatchedToSplit;
                break;

            case NextActivityMatchedType.WaitingForOthersJoin:
                result.Message = NextActivityMatchedResult.WaitingForOthersJoin;
                break;

            case NextActivityMatchedType.NotMadeItselfToJoin:
                result.Message = NextActivityMatchedResult.NotMadeItselfToJoin;
                break;
            }
            return(result);
        }