@Test void test_Aggregate_EvaluateDecisionService_ListWithMissingAfterEvaluateDecisionEvent_NoExecutionStepHierarchy() throws IOException { final DefaultAggregator aggregator = new DefaultAggregator(); final List<EvaluateEvent> events = DecisionTestUtils.readEvaluateEventsFromJsonResource(EVALUATE_DECISION_SERVICE_JSON_RESOURCE).stream() .filter(e -> !(e.getType() == EvaluateEventType.AFTER_EVALUATE_DECISION && DECISION_SERVICE_DECISION_ID.equals(e.getNodeId()))) .collect(Collectors.toList()); CloudEvent cloudEvent = aggregator.aggregate(model, EVALUATE_DECISION_SERVICE_EXECUTION_ID, events, configBean); TraceEvent traceEvent = assertValidCloudEventAndGetData(cloudEvent, EVALUATE_DECISION_SERVICE_EXECUTION_ID); assertTraceEventWithNoExecutionStepsHierarchy(traceEvent, 1, 1, 2); }
@Override public CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean) { return events == null || events.isEmpty() ? buildNotEnoughDataCloudEvent(model, executionId, configBean) : buildDefaultCloudEvent(model, executionId, events, configBean); }
DefaultAggregator implements Aggregator { @Override public CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean) { return events == null || events.isEmpty() ? buildNotEnoughDataCloudEvent(model, executionId, configBean) : buildDefaultCloudEvent(model, executionId, events, configBean); } }
DefaultAggregator implements Aggregator { @Override public CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean) { return events == null || events.isEmpty() ? buildNotEnoughDataCloudEvent(model, executionId, configBean) : buildDefaultCloudEvent(model, executionId, events, configBean); }  }
DefaultAggregator implements Aggregator { @Override public CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean) { return events == null || events.isEmpty() ? buildNotEnoughDataCloudEvent(model, executionId, configBean) : buildDefaultCloudEvent(model, executionId, events, configBean); }  @Override CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean); }
DefaultAggregator implements Aggregator { @Override public CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean) { return events == null || events.isEmpty() ? buildNotEnoughDataCloudEvent(model, executionId, configBean) : buildDefaultCloudEvent(model, executionId, events, configBean); }  @Override CloudEvent aggregate(DMNModel model, String executionId, List<EvaluateEvent> events, ConfigBean configBean);  }