Exemplo n.º 1
0
        public virtual void logCreationOnEvaluateDecisionTableByKey()
        {
            // given
            DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().singleResult();

            // when
            identityService.AuthenticatedUserId = USER_ID;
            decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY, createVariables());
            identityService.clearAuthentication();

            // then
            assertOperationLog(decisionDefinition);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testStatisticForRootDecisionEvaluation() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void testStatisticForRootDecisionEvaluation()
        {
            //when
            decisionService.evaluateDecisionTableByKey(DISH_DECISION).variables(Variables.createVariables().putValue(TEMPERATURE, 21).putValue(DAY_TYPE, WEEKEND)).evaluate();

            decisionService.evaluateDecisionTableByKey(DISH_DECISION).variables(Variables.createVariables().putValue(TEMPERATURE, 11).putValue(DAY_TYPE, WEEKEND)).evaluate();

            DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().singleResult();

            HistoricDecisionInstanceStatisticsQuery statisticsQuery = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.Id);

            //then
            assertThat(statisticsQuery.count(), @is(3L));
            assertThat(statisticsQuery.list().size(), @is(3));
            assertThat(statisticsQuery.list().get(0).Evaluations, @is(2));
            assertThat(statisticsQuery.list().get(0).DecisionDefinitionKey, @is(notNullValue()));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void setUp()
        {
            testHelper.deploy(DISH_DRG_DMN);
            decisionService   = engineRule.DecisionService;
            historyService    = engineRule.HistoryService;
            repositoryService = engineRule.RepositoryService;

            authRule.createUserAndGroup("userId", "groupId");

            decisionService.evaluateDecisionTableByKey("dish-decision").variables(Variables.createVariables().putValue("temperature", 21).putValue("dayType", "Weekend")).evaluate();

            decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().singleResult();
        }
Exemplo n.º 4
0
        public virtual void evaluateDecisionTableByKey()
        {
            DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY, createVariables());

            assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
        }
Exemplo n.º 5
0
 protected internal virtual DmnDecisionTableResult evaluateDecision(DecisionService decisionService, VariableScope variableScope)
 {
     return(decisionService.evaluateDecisionTableByKey("testDecision", variableScope.Variables));
 }
Exemplo n.º 6
0
        public override void execute(PerfTestRunContext context)
        {
            DecisionService decisionService = processEngine.DecisionService;

            decisionService.evaluateDecisionTableByKey(decisionDefinitionKey, variables);
        }