Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            foreach (DelegateCaseExecutionAsserter asserter in asserts)
            {
                asserter.doAssert(caseExecution);
            }
        }
Example #2
0
        public virtual bool evaluate(DelegateCaseExecution caseExecution)
        {
            DecisionService        decisionService = caseExecution.ProcessEngineServices.DecisionService;
            DmnDecisionTableResult result          = evaluateDecision(decisionService, caseExecution);
            DmnDecisionRuleResult  singleResult    = result.SingleResult;

            return((bool?)singleResult.SingleEntry.Value);
        }
Example #3
0
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            caseExecution.setVariable("greeting", "Hello from " + greeter.getValue(caseExecution));
            caseExecution.setVariable("helloWorld", helloWorld.getValue(caseExecution));
            caseExecution.setVariable("prefix", prefix.getValue(caseExecution));
            caseExecution.setVariable("suffix", suffix.getValue(caseExecution));

            // kind of workaround to pass through the test
            greeter    = null;
            helloWorld = null;
            prefix     = null;
            suffix     = null;
        }
Example #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            // Note: we can't cache the result of the expression, because the
            // caseExecution can change: eg. delegateExpression='${mySpringBeanFactory.randomSpringBean()}'
            object @delegate = expression.getValue(caseExecution);

            applyFieldDeclaration(fieldDeclarations, @delegate);

            if (@delegate is CaseExecutionListener)
            {
                CaseExecutionListener listenerInstance = (CaseExecutionListener)@delegate;
                Context.ProcessEngineConfiguration.DelegateInterceptor.handleInvocation(new CaseExecutionListenerInvocation(listenerInstance, caseExecution));
            }
            else
            {
                throw new ProcessEngineException("Delegate expression " + expression + " did not resolve to an implementation of " + typeof(CaseExecutionListener));
            }
        }
Example #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution planItem) throws Exception
        public virtual void notify(DelegateCaseExecution planItem)
        {
            CmmnExecution execution = (CmmnExecution)planItem;

            string activityId = execution.EventSource.Id;

            CaseExecutionState previousState     = execution.PreviousState;
            string             previousStateName = "()";

            if (!previousState.Equals(org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState_Fields.NEW))
            {
                previousStateName = previousState.ToString();
            }

            CaseExecutionState newState = execution.CurrentState;

            string stateTransition = previousStateName + " --" + execution.EventName + "(" + activityId + ")--> " + newState;

            LOG.debug("collecting state transition: " + stateTransition);

            stateTransitions.Add(stateTransition);
        }
Example #6
0
        public virtual void notify(DelegateCaseExecution caseExecution, string @event)
        {
            string eventCounterName = @event + "EventCounter";

            int?eventCounter = (int?)caseExecution.getVariable(eventCounterName);

            if (eventCounter == null)
            {
                eventCounter = 0;
            }

            int?counter = (int?)caseExecution.getVariable("eventCounter");

            if (counter == null)
            {
                counter = 0;
            }

            caseExecution.setVariable(@event, true);
            caseExecution.setVariable(eventCounterName, eventCounter + 1);
            caseExecution.setVariable("eventCounter", counter + 1);
            caseExecution.setVariable(@event + "OnCaseExecutionId", caseExecution.Id);
        }
Example #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            DecisionService decisionService = caseExecution.ProcessEngineServices.DecisionService;

            evaluateDecision(decisionService, caseExecution);
        }
Example #8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            EVENT   = caseExecution.EventName;
            COUNTER = COUNTER + 1;
            ON_CASE_EXECUTION_ID = caseExecution.Id;
        }
Example #9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            CaseExecutionListener listenerInstance = ListenerInstance;

            Context.ProcessEngineConfiguration.DelegateInterceptor.handleInvocation(new CaseExecutionListenerInvocation(listenerInstance, caseExecution));
        }
Example #10
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public org.camunda.bpm.engine.impl.history.event.HistoryEvent createDecisionEvaluatedEvt(final org.camunda.bpm.engine.delegate.DelegateCaseExecution execution, final org.camunda.bpm.dmn.engine.delegate.DmnDecisionEvaluationEvent evaluationEvent)
        public virtual HistoryEvent createDecisionEvaluatedEvt(DelegateCaseExecution execution, DmnDecisionEvaluationEvent evaluationEvent)
        {
            return(createHistoryEvent(evaluationEvent, new HistoricDecisionInstanceSupplierAnonymousInnerClass2(this, execution, evaluationEvent)));
        }
Example #11
0
 public HistoricDecisionInstanceSupplierAnonymousInnerClass2(DefaultDmnHistoryEventProducer outerInstance, DelegateCaseExecution execution, DmnDecisionEvaluationEvent evaluationEvent)
 {
     this.outerInstance   = outerInstance;
     this.execution       = execution;
     this.evaluationEvent = evaluationEvent;
 }