示例#1
0
        private void decision(XmlElement decisionElement, DecisionImpl decision, ProcessBlockImpl currentProcessBlock)
        {
            this.node(decisionElement, decision, currentProcessBlock);

            decision.DecisionDelegation = new DelegationImpl();
            this.delegation <DecisionImpl>(decisionElement, decision.DecisionDelegation);
        }
示例#2
0
        public void ProcessDecision(DecisionImpl decision, ExecutionContextImpl executionContext, DbSession dbSession)
        {
            // trigger actions, scheduled before the decision actually is made
            delegationService.RunActionsForEvent(EventType.BEFORE_DECISION, decision.Id, executionContext, dbSession);

            // delegate the decision
            TransitionImpl selectedTransition = delegationHelper.DelegateDecision(decision.DecisionDelegation, executionContext);

            // process the selected transition
            ProcessTransition(selectedTransition, executionContext, dbSession);

            // trigger actions, scheduled after the decision is made
            delegationService.RunActionsForEvent(EventType.AFTER_DECISION, decision.Id, executionContext, dbSession);
        }
示例#3
0
        public void ProcessDecision(DecisionImpl decision, FlowImpl flow, DbSession dbSession)
        {
            //var delegateParameters = delegationService.ParseConfiguration(decision.DecisionDelegation);

            //IDecisionHandler decisionHandler = (IDecisionHandler)delegationService.GetDelegate(decision.DecisionDelegation);
            var            attributes         = decision.DecisionDelegation.ParseConfiguration();
            string         transiationName    = new EvaluationDecision().Decide(attributes["attribute"].ToString());
            TransitionImpl selectedTransition = this.GetTransition(transiationName, decision, dbSession);

            //// delegate the decision
            //TransitionImpl selectedTransition = delegationHelper.DelegateDecision(decision.DecisionDelegation, executionContext);

            //// process the selected transition
            ProcessTransition(selectedTransition, flow, dbSession);
        }
示例#4
0
        private void processBlock(XmlElement processBlockElement, ProcessBlockImpl currentProcessBlock)
        {
            currentProcessBlock.Nodes       = new ListSet();
            currentProcessBlock.Attributes  = new ListSet();
            currentProcessBlock.ChildBlocks = new ListSet();

            IEnumerator iterAttr = processBlockElement.GetChildElements("attribute").GetEnumerator();

            while (iterAttr.MoveNext())
            {
                AttributeImpl attribute = new AttributeImpl();
                this.attribute((XmlElement)iterAttr.Current, attribute, currentProcessBlock);
                currentProcessBlock.Attributes.Add(attribute);
            }

            IEnumerator iterActivityState = processBlockElement.GetChildElements("activity-state").GetEnumerator();

            while (iterActivityState.MoveNext())
            {
                ActivityStateImpl activityState = currentProcessBlock.CreateActivityState();
                this.activityState((XmlElement)iterActivityState.Current, activityState, currentProcessBlock);
                currentProcessBlock.Nodes.Add(activityState);
            }

            IEnumerator iterConcurrent = processBlockElement.GetChildElements("concurrent-block").GetEnumerator();

            while (iterConcurrent.MoveNext())
            {
                ConcurrentBlockImpl concurrentBlock = currentProcessBlock.CreateConcurrentBlock();
                this.concurrentBlock((XmlElement)iterConcurrent.Current, concurrentBlock, currentProcessBlock);
            }

            IEnumerator iterDecision = processBlockElement.GetChildElements("decision").GetEnumerator();

            while (iterDecision.MoveNext())
            {
                DecisionImpl decision = currentProcessBlock.CreateDecision();
                this.decision((XmlElement)iterDecision.Current, decision, currentProcessBlock);
            }

            this.definitionObject(processBlockElement, currentProcessBlock, currentProcessBlock);
        }
示例#5
0
文件: Dmn.cs 项目: zf321/ESS.FW.Bpm
 /// <summary>
 /// 用于创建modelBuilder
 /// </summary>
 /// <param name="modelBuilder"></param>
 protected internal virtual void DoRegisterTypes(ModelBuilder modelBuilder)
 {
     //TODO Dmn类型注册
     try
     {
         AllowedAnswersImpl.RegisterType(modelBuilder);
         AllowedValuesImpl.RegisterType(modelBuilder);
         ArtifactImpl.RegisterType(modelBuilder);
         AssociationImpl.RegisterType(modelBuilder);
         AuthorityRequirementImpl.RegisterType(modelBuilder);
         BindingImpl.RegisterType(modelBuilder);
         BusinessContextElementImpl.RegisterType(modelBuilder);
         BusinessKnowledgeModelImpl.RegisterType(modelBuilder);
         ColumnImpl.RegisterType(modelBuilder);
         ContextEntryImpl.RegisterType(modelBuilder);
         ContextImpl.RegisterType(modelBuilder);
         DecisionImpl.RegisterType(modelBuilder);
         DecisionMadeReferenceImpl.RegisterType(modelBuilder);
         DecisionMakerReferenceImpl.RegisterType(modelBuilder);
         DecisionOwnedReferenceImpl.RegisterType(modelBuilder);
         DecisionOwnerReferenceImpl.RegisterType(modelBuilder);
         DecisionRuleImpl.RegisterType(modelBuilder);
         DecisionServiceImpl.RegisterType(modelBuilder);
         DecisionTableImpl.RegisterType(modelBuilder);
         DefaultOutputEntryImpl.RegisterType(modelBuilder);
         DefinitionsImpl.RegisterType(modelBuilder);
         DescriptionImpl.RegisterType(modelBuilder);
         DmnElementImpl.RegisterType(modelBuilder);
         DmnElementReferenceImpl.RegisterType(modelBuilder);
         DrgElementImpl.RegisterType(modelBuilder);
         DrgElementReferenceImpl.RegisterType(modelBuilder);
         ElementCollectionImpl.RegisterType(modelBuilder);
         EncapsulatedDecisionReferenceImpl.RegisterType(modelBuilder);
         EncapsulatedLogicImpl.RegisterType(modelBuilder);
         ExpressionImpl.RegisterType(modelBuilder);
         ExtensionElementsImpl.RegisterType(modelBuilder);
         FormalParameterImpl.RegisterType(modelBuilder);
         FunctionDefinitionImpl.RegisterType(modelBuilder);
         ImpactedPerformanceIndicatorReferenceImpl.RegisterType(modelBuilder);
         ImpactingDecisionReferenceImpl.RegisterType(modelBuilder);
         ImportImpl.RegisterType(modelBuilder);
         ImportedElementImpl.RegisterType(modelBuilder);
         ImportedValuesImpl.RegisterType(modelBuilder);
         InformationItemImpl.RegisterType(modelBuilder);
         InformationRequirementImpl.RegisterType(modelBuilder);
         InputImpl.RegisterType(modelBuilder);
         InputClauseImpl.RegisterType(modelBuilder);
         InputDataImpl.RegisterType(modelBuilder);
         InputDataReferenceImpl.RegisterType(modelBuilder);
         InputDecisionReferenceImpl.RegisterType(modelBuilder);
         InputEntryImpl.RegisterType(modelBuilder);
         InputExpressionImpl.RegisterType(modelBuilder);
         InputValuesImpl.RegisterType(modelBuilder);
         InvocationImpl.RegisterType(modelBuilder);
         ItemComponentImpl.RegisterType(modelBuilder);
         ItemDefinitionImpl.RegisterType(modelBuilder);
         ItemDefinitionReferenceImpl.RegisterType(modelBuilder);
         KnowledgeRequirementImpl.RegisterType(modelBuilder);
         KnowledgeSourceImpl.RegisterType(modelBuilder);
         ListImpl.RegisterType(modelBuilder);
         LiteralExpressionImpl.RegisterType(modelBuilder);
         ModelElementInstanceImpl.RegisterType(modelBuilder);
         NamedElementImpl.RegisterType(modelBuilder);
         OrganizationUnitImpl.RegisterType(modelBuilder);
         OutputImpl.RegisterType(modelBuilder);
         OutputClauseImpl.RegisterType(modelBuilder);
         OutputDecisionReferenceImpl.RegisterType(modelBuilder);
         OutputEntryImpl.RegisterType(modelBuilder);
         OutputValuesImpl.RegisterType(modelBuilder);
         OwnerReferenceImpl.RegisterType(modelBuilder);
         ParameterReferenceImpl.RegisterType(modelBuilder);
         PerformanceIndicatorImpl.RegisterType(modelBuilder);
         QuestionImpl.RegisterType(modelBuilder);
         RelationImpl.RegisterType(modelBuilder);
         RequiredAuthorityReferenceImpl.RegisterType(modelBuilder);
         RequiredDecisionReferenceImpl.RegisterType(modelBuilder);
         RequiredInputReferenceImpl.RegisterType(modelBuilder);
         RequiredKnowledgeReferenceImpl.RegisterType(modelBuilder);
         RowImpl.RegisterType(modelBuilder);
         RuleImpl.RegisterType(modelBuilder);
         SourceRefImpl.RegisterType(modelBuilder);
         SupportedObjectiveReferenceImpl.RegisterType(modelBuilder);
         TargetRefImpl.RegisterType(modelBuilder);
         TextImpl.RegisterType(modelBuilder);
         TextAnnotationImpl.RegisterType(modelBuilder);
         TypeImpl.RegisterType(modelBuilder);
         TypeRefImpl.RegisterType(modelBuilder);
         UnaryTestsImpl.RegisterType(modelBuilder);
         UsingProcessReferenceImpl.RegisterType(modelBuilder);
         UsingTaskReferenceImpl.RegisterType(modelBuilder);
         VariableImpl.RegisterType(modelBuilder);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
     /// <summary>
     /// camunda extensions </summary>
 }