use of org.camunda.bpm.dmn.engine.delegate.DmnDecisionLiteralExpressionEvaluationEvent in project camunda-engine-dmn by camunda.
the class DecisionLiteralExpressionEvaluationHandler method generateDecisionResult.
@Override
public DmnDecisionResult generateDecisionResult(DmnDecisionLogicEvaluationEvent event) {
DmnDecisionLiteralExpressionEvaluationEvent evaluationEvent = (DmnDecisionLiteralExpressionEvaluationEvent) event;
DmnDecisionResultEntriesImpl result = new DmnDecisionResultEntriesImpl();
result.putValue(evaluationEvent.getOutputName(), evaluationEvent.getOutputValue());
return new DmnDecisionResultImpl(Collections.<DmnDecisionResultEntries>singletonList(result));
}
use of org.camunda.bpm.dmn.engine.delegate.DmnDecisionLiteralExpressionEvaluationEvent in project camunda-bpm-platform by camunda.
the class DefaultDmnHistoryEventProducer method initDecisionInstanceEvent.
protected void initDecisionInstanceEvent(HistoricDecisionInstanceEntity event, DmnDecisionLogicEvaluationEvent evaluationEvent, HistoryEventTypes eventType) {
event.setEventType(eventType.getEventName());
DecisionDefinition decision = (DecisionDefinition) evaluationEvent.getDecision();
event.setDecisionDefinitionId(decision.getId());
event.setDecisionDefinitionKey(decision.getKey());
event.setDecisionDefinitionName(decision.getName());
if (decision.getDecisionRequirementsDefinitionId() != null) {
event.setDecisionRequirementsDefinitionId(decision.getDecisionRequirementsDefinitionId());
event.setDecisionRequirementsDefinitionKey(decision.getDecisionRequirementsDefinitionKey());
}
if (evaluationEvent instanceof DmnDecisionTableEvaluationEvent) {
initDecisionInstanceEventForDecisionTable(event, (DmnDecisionTableEvaluationEvent) evaluationEvent);
} else if (evaluationEvent instanceof DmnDecisionLiteralExpressionEvaluationEvent) {
initDecisionInstanceEventForDecisionLiteralExpression(event, (DmnDecisionLiteralExpressionEvaluationEvent) evaluationEvent);
} else {
event.setInputs(Collections.<HistoricDecisionInputInstance>emptyList());
event.setOutputs(Collections.<HistoricDecisionOutputInstance>emptyList());
}
}
Aggregations