Search in sources :

Example 1 with HistoricDecisionInputInstanceEntity

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

the class DefaultDmnHistoryEventProducer method createHistoricDecisionInputInstances.

protected List<HistoricDecisionInputInstance> createHistoricDecisionInputInstances(DmnDecisionTableEvaluationEvent evaluationEvent) {
    List<HistoricDecisionInputInstance> inputInstances = new ArrayList<HistoricDecisionInputInstance>();
    for (DmnEvaluatedInput inputClause : evaluationEvent.getInputs()) {
        HistoricDecisionInputInstanceEntity inputInstance = new HistoricDecisionInputInstanceEntity();
        inputInstance.setClauseId(inputClause.getId());
        inputInstance.setClauseName(inputClause.getName());
        TypedValue typedValue = Variables.untypedValue(inputClause.getValue());
        inputInstance.setValue(typedValue);
        inputInstances.add(inputInstance);
    }
    return inputInstances;
}
Also used : HistoricDecisionInputInstance(org.camunda.bpm.engine.history.HistoricDecisionInputInstance) HistoricDecisionInputInstanceEntity(org.camunda.bpm.engine.impl.history.event.HistoricDecisionInputInstanceEntity) DmnEvaluatedInput(org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedInput) ArrayList(java.util.ArrayList) TypedValue(org.camunda.bpm.engine.variable.value.TypedValue)

Example 2 with HistoricDecisionInputInstanceEntity

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

the class BulkHistoryDeleteTest method collectHistoricDecisionInputIds.

private void collectHistoricDecisionInputIds(List<HistoricDecisionInstance> historicDecisionInstances, List<String> historicDecisionInputIds, List<String> inputByteArrayIds) {
    for (HistoricDecisionInstance historicDecisionInstance : historicDecisionInstances) {
        for (HistoricDecisionInputInstance inputInstanceEntity : historicDecisionInstance.getInputs()) {
            historicDecisionInputIds.add(inputInstanceEntity.getId());
            final String byteArrayValueId = ((HistoricDecisionInputInstanceEntity) inputInstanceEntity).getByteArrayValueId();
            if (byteArrayValueId != null) {
                inputByteArrayIds.add(byteArrayValueId);
            }
        }
    }
    assertEquals(PROCESS_INSTANCE_COUNT, historicDecisionInputIds.size());
}
Also used : HistoricDecisionInputInstance(org.camunda.bpm.engine.history.HistoricDecisionInputInstance) HistoricDecisionInputInstanceEntity(org.camunda.bpm.engine.impl.history.event.HistoricDecisionInputInstanceEntity) HistoricDecisionInstance(org.camunda.bpm.engine.history.HistoricDecisionInstance)

Aggregations

HistoricDecisionInputInstance (org.camunda.bpm.engine.history.HistoricDecisionInputInstance)2 HistoricDecisionInputInstanceEntity (org.camunda.bpm.engine.impl.history.event.HistoricDecisionInputInstanceEntity)2 ArrayList (java.util.ArrayList)1 DmnEvaluatedInput (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedInput)1 HistoricDecisionInstance (org.camunda.bpm.engine.history.HistoricDecisionInstance)1 TypedValue (org.camunda.bpm.engine.variable.value.TypedValue)1