Search in sources :

Example 1 with HistoricDecisionEvaluationEvent

use of org.camunda.bpm.engine.impl.history.event.HistoricDecisionEvaluationEvent in project camunda-bpm-platform by camunda.

the class DefaultDmnHistoryEventProducer method createHistoryEvent.

protected HistoryEvent createHistoryEvent(DmnDecisionEvaluationEvent evaluationEvent, HistoricDecisionInstanceSupplier supplier) {
    HistoricDecisionEvaluationEvent event = newDecisionEvaluationEvent(evaluationEvent);
    HistoricDecisionInstanceEntity rootDecisionEvent = supplier.createHistoricDecisionInstance(evaluationEvent.getDecisionResult());
    event.setRootHistoricDecisionInstance(rootDecisionEvent);
    List<HistoricDecisionInstanceEntity> requiredDecisionEvents = new ArrayList<HistoricDecisionInstanceEntity>();
    for (DmnDecisionLogicEvaluationEvent requiredDecisionResult : evaluationEvent.getRequiredDecisionResults()) {
        HistoricDecisionInstanceEntity requiredDecisionEvent = supplier.createHistoricDecisionInstance(requiredDecisionResult);
        requiredDecisionEvents.add(requiredDecisionEvent);
    }
    event.setRequiredHistoricDecisionInstances(requiredDecisionEvents);
    return event;
}
Also used : HistoricDecisionEvaluationEvent(org.camunda.bpm.engine.impl.history.event.HistoricDecisionEvaluationEvent) DmnDecisionLogicEvaluationEvent(org.camunda.bpm.dmn.engine.delegate.DmnDecisionLogicEvaluationEvent) ArrayList(java.util.ArrayList) HistoricDecisionInstanceEntity(org.camunda.bpm.engine.impl.history.event.HistoricDecisionInstanceEntity)

Aggregations

ArrayList (java.util.ArrayList)1 DmnDecisionLogicEvaluationEvent (org.camunda.bpm.dmn.engine.delegate.DmnDecisionLogicEvaluationEvent)1 HistoricDecisionEvaluationEvent (org.camunda.bpm.engine.impl.history.event.HistoricDecisionEvaluationEvent)1 HistoricDecisionInstanceEntity (org.camunda.bpm.engine.impl.history.event.HistoricDecisionInstanceEntity)1