Java Code Examples for org.camunda.bpm.dmn.engine.DmnDecisionTableResult#getResultList()
The following examples show how to use
org.camunda.bpm.dmn.engine.DmnDecisionTableResult#getResultList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DmnDecisionTableResultTest.java From camunda-engine-dmn with Apache License 2.0 | 6 votes |
@Test @DecisionResource(resource = RESULT_TEST_DMN) public void testOutputList() { DmnDecisionTableResult decisionResult = evaluateWithMatchingRules(SINGLE_OUTPUT_VALUE, MULTIPLE_OUTPUT_VALUES); List<Map<String, Object>> entryMapList = decisionResult.getResultList(); assertThat(entryMapList).hasSize(2); Map<String, Object> firstResult = entryMapList.get(0); assertThat(firstResult).hasSize(1); assertThat(firstResult).containsEntry("firstOutput", "singleValue"); Map<String, Object> secondResult = entryMapList.get(1); assertThat(secondResult).hasSize(2); assertThat(secondResult).containsEntry("firstOutput", "multipleValues1"); assertThat(secondResult).containsEntry("secondOutput", "multipleValues2"); }
Example 2
Source File: DmnDecisionTableResultTest.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
@Test @DecisionResource(resource = RESULT_TEST_DMN) public void testOutputList() { DmnDecisionTableResult decisionResult = evaluateWithMatchingRules(SINGLE_OUTPUT_VALUE, MULTIPLE_OUTPUT_VALUES); List<Map<String, Object>> entryMapList = decisionResult.getResultList(); assertThat(entryMapList).hasSize(2); Map<String, Object> firstResult = entryMapList.get(0); assertThat(firstResult).hasSize(1); assertThat(firstResult).containsEntry("firstOutput", "singleValue"); Map<String, Object> secondResult = entryMapList.get(1); assertThat(secondResult).hasSize(2); assertThat(secondResult).containsEntry("firstOutput", "multipleValues1"); assertThat(secondResult).containsEntry("secondOutput", "multipleValues2"); }
Example 3
Source File: DmnDecisionEvaluationTest.java From camunda-engine-dmn with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionsWithRequiredDecisionAndMultipleMatchingRules() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_MULTIPLE_MATCHING_RULES) , createVariables() .putValue("dd", 3) .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.get(0)).containsEntry("aa", "aa"); assertThat(resultList.get(1)).containsEntry("aa", "aaa"); }
Example 4
Source File: DmnDecisionEvaluationTest.java From camunda-engine-dmn with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionsWithRequiredDecisionAndMultipleMatchingRulesMultipleOutputs() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_MULTIPLE_MATCHING_RULES_MULTIPLE_OUTPUTS) , createVariables() .putValue("dd", "dd") .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.get(0)).containsEntry("aa", "aa"); assertThat(resultList.get(1)).containsEntry("aa", "aaa"); }
Example 5
Source File: DmnDecisionEvaluationTest.java From camunda-engine-dmn with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionWithRequiredDecisionAndNoMatchingRuleInParentDecision() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_NO_MATCHING_RULE_IN_PARENT) , createVariables() .putValue("dd", "dd") .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.size()).isEqualTo(0); }
Example 6
Source File: DmnDecisionEvaluationTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionsWithRequiredDecisionAndMultipleMatchingRules() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_MULTIPLE_MATCHING_RULES) , createVariables() .putValue("dd", 3) .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.get(0)).containsEntry("aa", "aa"); assertThat(resultList.get(1)).containsEntry("aa", "aaa"); }
Example 7
Source File: DmnDecisionEvaluationTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionsWithRequiredDecisionAndMultipleMatchingRulesMultipleOutputs() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_MULTIPLE_MATCHING_RULES_MULTIPLE_OUTPUTS) , createVariables() .putValue("dd", "dd") .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.get(0)).containsEntry("aa", "aa"); assertThat(resultList.get(1)).containsEntry("aa", "aaa"); }
Example 8
Source File: DmnDecisionEvaluationTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Test public void shouldEvaluateDecisionWithRequiredDecisionAndNoMatchingRuleInParentDecision() { DmnDecisionTableResult results = dmnEngine.evaluateDecisionTable(parseDecisionFromFile("A", DMN_DECISIONS_WITH_NO_MATCHING_RULE_IN_PARENT) , createVariables() .putValue("dd", "dd") .putValue("ee", "ee") .asVariableContext()); List<Map<String, Object>> resultList = results.getResultList(); assertThat(resultList.size()).isEqualTo(0); }