use of org.camunda.bpm.engine.history.HistoricDecisionOutputInstance in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceManager method insertHistoricDecisionOutputInstances.
protected void insertHistoricDecisionOutputInstances(List<HistoricDecisionOutputInstance> outputs, String decisionInstanceId) {
for (HistoricDecisionOutputInstance output : outputs) {
HistoricDecisionOutputInstanceEntity outputEntity = (HistoricDecisionOutputInstanceEntity) output;
outputEntity.setDecisionInstanceId(decisionInstanceId);
getDbEntityManager().insert(outputEntity);
}
}
use of org.camunda.bpm.engine.history.HistoricDecisionOutputInstance in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceInputOutputValueTest method decisionOutputInstanceValue.
@Test
@Deployment(resources = { DECISION_PROCESS, DECISION_SINGLE_OUTPUT_DMN })
public void decisionOutputInstanceValue() {
startProcessInstanceAndEvaluateDecision(inputValue);
HistoricDecisionInstance historicDecisionInstance = engineRule.getHistoryService().createHistoricDecisionInstanceQuery().includeOutputs().singleResult();
List<HistoricDecisionOutputInstance> outputInstances = historicDecisionInstance.getOutputs();
assertThat(outputInstances.size(), is(1));
HistoricDecisionOutputInstance outputInstance = outputInstances.get(0);
assertThat(outputInstance.getTypeName(), is(valueType));
assertThat(outputInstance.getValue(), is(inputValue));
}
use of org.camunda.bpm.engine.history.HistoricDecisionOutputInstance in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceTest method testMultipleDecisionOutputInstances.
@Deployment(resources = { DECISION_PROCESS, DECISION_MULTIPLE_OUTPUT_DMN })
public void testMultipleDecisionOutputInstances() {
startProcessInstanceAndEvaluateDecision();
HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().includeOutputs().singleResult();
List<HistoricDecisionOutputInstance> outputs = historicDecisionInstance.getOutputs();
assertThat(outputs.size(), is(2));
HistoricDecisionOutputInstance firstOutput = outputs.get(0);
assertThat(firstOutput.getClauseId(), is("out1"));
assertThat(firstOutput.getRuleId(), is("rule1"));
assertThat(firstOutput.getRuleOrder(), is(1));
assertThat(firstOutput.getVariableName(), is("result1"));
assertThat(firstOutput.getValue(), is((Object) "okay"));
HistoricDecisionOutputInstance secondOutput = outputs.get(1);
assertThat(secondOutput.getClauseId(), is("out1"));
assertThat(secondOutput.getRuleId(), is("rule2"));
assertThat(secondOutput.getRuleOrder(), is(2));
assertThat(secondOutput.getVariableName(), is("result1"));
assertThat(secondOutput.getValue(), is((Object) "not okay"));
}
use of org.camunda.bpm.engine.history.HistoricDecisionOutputInstance in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceTest method testDecisionOutputInstanceProperties.
@Deployment(resources = { DECISION_PROCESS, DECISION_SINGLE_OUTPUT_DMN })
public void testDecisionOutputInstanceProperties() {
startProcessInstanceAndEvaluateDecision();
HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().includeOutputs().singleResult();
List<HistoricDecisionOutputInstance> outputs = historicDecisionInstance.getOutputs();
assertThat(outputs, is(notNullValue()));
assertThat(outputs.size(), is(1));
HistoricDecisionOutputInstance output = outputs.get(0);
assertThat(output.getDecisionInstanceId(), is(historicDecisionInstance.getId()));
assertThat(output.getClauseId(), is("out"));
assertThat(output.getClauseName(), is("output"));
assertThat(output.getRuleId(), is("rule"));
assertThat(output.getRuleOrder(), is(1));
assertThat(output.getVariableName(), is("result"));
}
Aggregations