use of org.camunda.bpm.engine.impl.history.event.HistoricDecisionOutputInstanceEntity in project camunda-bpm-platform by camunda.
the class DefaultDmnHistoryEventProducer method initDecisionInstanceEventForDecisionLiteralExpression.
protected void initDecisionInstanceEventForDecisionLiteralExpression(HistoricDecisionInstanceEntity event, DmnDecisionLiteralExpressionEvaluationEvent evaluationEvent) {
// no inputs for expression
event.setInputs(Collections.<HistoricDecisionInputInstance>emptyList());
HistoricDecisionOutputInstanceEntity outputInstance = new HistoricDecisionOutputInstanceEntity();
outputInstance.setVariableName(evaluationEvent.getOutputName());
outputInstance.setValue(evaluationEvent.getOutputValue());
event.setOutputs(Collections.<HistoricDecisionOutputInstance>singletonList(outputInstance));
}
use of org.camunda.bpm.engine.impl.history.event.HistoricDecisionOutputInstanceEntity in project camunda-bpm-platform by camunda.
the class BulkHistoryDeleteTest method collectHistoricDecisionOutputIds.
private void collectHistoricDecisionOutputIds(List<HistoricDecisionInstance> historicDecisionInstances, List<String> historicDecisionOutputIds, List<String> outputByteArrayId) {
for (HistoricDecisionInstance historicDecisionInstance : historicDecisionInstances) {
for (HistoricDecisionOutputInstance outputInstanceEntity : historicDecisionInstance.getOutputs()) {
historicDecisionOutputIds.add(outputInstanceEntity.getId());
final String byteArrayValueId = ((HistoricDecisionOutputInstanceEntity) outputInstanceEntity).getByteArrayValueId();
if (byteArrayValueId != null) {
outputByteArrayId.add(byteArrayValueId);
}
}
}
assertEquals(PROCESS_INSTANCE_COUNT, historicDecisionOutputIds.size());
}
use of org.camunda.bpm.engine.impl.history.event.HistoricDecisionOutputInstanceEntity in project camunda-bpm-platform by camunda.
the class DefaultDmnHistoryEventProducer method createHistoricDecisionOutputInstances.
protected List<HistoricDecisionOutputInstance> createHistoricDecisionOutputInstances(DmnDecisionTableEvaluationEvent evaluationEvent) {
List<HistoricDecisionOutputInstance> outputInstances = new ArrayList<HistoricDecisionOutputInstance>();
List<DmnEvaluatedDecisionRule> matchingRules = evaluationEvent.getMatchingRules();
for (int index = 0; index < matchingRules.size(); index++) {
DmnEvaluatedDecisionRule rule = matchingRules.get(index);
String ruleId = rule.getId();
Integer ruleOrder = index + 1;
for (DmnEvaluatedOutput outputClause : rule.getOutputEntries().values()) {
HistoricDecisionOutputInstanceEntity outputInstance = new HistoricDecisionOutputInstanceEntity();
outputInstance.setClauseId(outputClause.getId());
outputInstance.setClauseName(outputClause.getName());
outputInstance.setRuleId(ruleId);
outputInstance.setRuleOrder(ruleOrder);
outputInstance.setVariableName(outputClause.getOutputName());
outputInstance.setValue(outputClause.getValue());
outputInstances.add(outputInstance);
}
}
return outputInstances;
}
Aggregations