Exemplo n.º 1
0
        protected internal virtual HistoryEvent createHistoryEvent(DmnDecisionEvaluationEvent evaluationEvent)
        {
            DmnDecision decisionTable = evaluationEvent.DecisionResult.Decision;

            if (isDeployedDecisionTable(decisionTable) && historyLevel.isHistoryEventProduced(HistoryEventTypes.DMN_DECISION_EVALUATE, decisionTable))
            {
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: org.camunda.bpm.engine.impl.context.CoreExecutionContext<? extends org.camunda.bpm.engine.impl.core.instance.CoreExecution> executionContext = org.camunda.bpm.engine.impl.context.Context.getCoreExecutionContext();
                CoreExecutionContext <CoreExecution> executionContext = Context.CoreExecutionContext;
                if (executionContext != null)
                {
                    CoreExecution coreExecution = executionContext.Execution;

                    if (coreExecution is ExecutionEntity)
                    {
                        ExecutionEntity execution = (ExecutionEntity)coreExecution;
                        return(eventProducer.createDecisionEvaluatedEvt(execution, evaluationEvent));
                    }
                    else if (coreExecution is CaseExecutionEntity)
                    {
                        CaseExecutionEntity caseExecution = (CaseExecutionEntity)coreExecution;
                        return(eventProducer.createDecisionEvaluatedEvt(caseExecution, evaluationEvent));
                    }
                }

                return(eventProducer.createDecisionEvaluatedEvt(evaluationEvent));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        protected internal virtual bool isCurrentContextExecution(BaseDelegateExecution execution)
        {
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: org.camunda.bpm.engine.impl.context.CoreExecutionContext<?> coreExecutionContext = org.camunda.bpm.engine.impl.context.Context.getCoreExecutionContext();
            CoreExecutionContext <object> coreExecutionContext = Context.CoreExecutionContext;

            return(coreExecutionContext != null && coreExecutionContext.Execution == execution);
        }