From 18d37b28fe111840a9c94a48cd39b2c21fa578c9 Mon Sep 17 00:00:00 2001 From: Jonathan Lukas Date: Wed, 10 May 2023 11:35:46 +0200 Subject: [PATCH] wip: none, message, start event implemented --- pom.xml | 4 +- .../Camunda7EmbeddedExporterTest.java | 3 + .../exporter/ElementCoverageTest.java | 106 ++++++++++++++++++ .../bpmn/coverage/event-based-gateway.bpmn | 64 +++++++++++ .../bpmn/coverage/inclusive-gateway.bpmn | 47 ++++++++ .../bpmn/coverage/message-boundary-event.bpmn | 69 ++++++++++++ .../bpmn/coverage/message-end-event.bpmn | 35 ++++++ .../message-intermediate-catch-event.bpmn | 49 ++++++++ .../message-intermediate-throw-event.bpmn | 48 ++++++++ .../bpmn/coverage/message-start-event.bpmn | 35 ++++++ .../bpmn/coverage/none-end-event.bpmn | 47 ++++++++ .../coverage/none-intermediate-event.bpmn | 47 ++++++++ .../bpmn/coverage/none-start-event.bpmn | 47 ++++++++ .../bpmn/coverage/parallel-gateway.bpmn | 81 +++---------- .../bpmn/coverage/signal-boundary-event.bpmn | 68 +++++++++++ .../bpmn/coverage/signal-end-event.bpmn | 36 ++++++ .../signal-intermediate-catch-event.bpmn | 50 +++++++++ .../signal-intermediate-throw-event.bpmn | 49 ++++++++ .../bpmn/coverage/signal-start-event.bpmn | 36 ++++++ .../exporter/Camunda7Exporter.java | 77 +++++++++++-- .../api/model/data/Builder.java | 84 ++++++++++++++ .../api/model/data/BusinessRuleTaskData.java | 6 +- .../api/model/data/CallActivityData.java | 6 +- .../api/model/data/EndEventData.java | 8 ++ .../api/model/data/EventBasedGatewayData.java | 6 +- .../api/model/data/ExclusiveGatewayData.java | 6 +- .../api/model/data/InclusiveGatewayData.java | 6 +- .../data/IntermediateThrowEventData.java | 9 ++ .../api/model/data/ManualTaskData.java | 6 +- .../api/model/data/MessageBoundaryEvent.java | 8 ++ .../model/data/MessageBoundaryEventData.java | 9 ++ .../api/model/data/MessageEndEventData.java | 8 ++ .../MessageIntermediateCatchEventData.java | 6 +- .../MessageIntermediateThrowEventData.java | 9 ++ .../api/model/data/MessageStartEventData.java | 8 ++ .../api/model/data/MultiExecutionData.java | 18 +++ .../api/model/data/MultiInstanceData.java | 7 +- .../api/model/data/ParallelGatewayData.java | 6 +- .../api/model/data/ReceiveTaskData.java | 6 +- .../api/model/data/ScriptTaskData.java | 6 +- .../api/model/data/SendTaskData.java | 6 +- .../api/model/data/ServiceTaskData.java | 6 +- .../model/data/SignalBoundaryEventData.java | 9 ++ .../api/model/data/SignalEndEventData.java | 8 ++ .../SignalIntermediateCatchEventData.java | 9 ++ .../SignalIntermediateThrowEventData.java | 9 ++ .../api/model/data/SignalStartEventData.java | 8 ++ .../api/model/data/StartEventData.java | 6 +- .../api/model/data/SubProcessData.java | 6 +- .../api/model/data/TaskData.java | 6 +- .../api/model/data/TransactionData.java | 6 +- .../api/model/data/UserTaskData.java | 6 +- .../model/data/chunk/ActivityNodeData.java | 72 ++++++++---- .../data/chunk/CommonActivityNodeData.java | 13 +++ .../data/impl/BusinessRuleTaskDataImpl.java | 4 +- .../model/data/impl/CallActivityDataImpl.java | 5 +- .../api/model/data/impl/EndEventDataImpl.java | 6 + .../data/impl/EventBasedGatewayDataImpl.java | 7 ++ .../data/impl/ExclusiveGatewayDataImpl.java | 4 +- .../data/impl/InclusiveGatewayDataImpl.java | 7 ++ .../impl/IntermediateThrowEventDataImpl.java | 7 ++ .../model/data/impl/ManualTaskDataImpl.java | 5 +- .../impl/MessageBoundaryEventDataImpl.java | 7 ++ .../data/impl/MessageEndEventDataImpl.java | 7 ++ ...MessageIntermediateCatchEventDataImpl.java | 4 +- ...MessageIntermediateThrowEventDataImpl.java | 7 ++ .../data/impl/MessageStartEventDataImpl.java | 7 ++ .../data/impl/MultiExecutionDataImpl.java | 42 +++++++ .../data/impl/MultiInstanceDataImpl.java | 5 +- .../data/impl/ParallelGatewayDataImpl.java | 5 +- .../model/data/impl/ReceiveTaskDataImpl.java | 5 +- .../model/data/impl/ScriptTaskDataImpl.java | 5 +- .../api/model/data/impl/SendTaskDataImpl.java | 4 +- .../model/data/impl/ServiceTaskDataImpl.java | 5 +- .../impl/SignalBoundaryEventDataImpl.java | 7 ++ .../data/impl/SignalEndEventDataImpl.java | 7 ++ .../SignalIntermediateCatchEventDataImpl.java | 7 ++ .../SignalIntermediateThrowEventDataImpl.java | 7 ++ .../data/impl/SignalStartEventDataImpl.java | 7 ++ .../model/data/impl/StartEventDataImpl.java | 4 +- .../model/data/impl/SubProcessDataImpl.java | 4 +- .../api/model/data/impl/TaskDataImpl.java | 4 +- .../model/data/impl/TransactionDataImpl.java | 4 +- .../api/model/data/impl/UserTaskDataImpl.java | 4 +- .../BusinessRuleTaskDataBuilderImpl.java | 6 +- .../impl/builder/CallActivityBuilderImpl.java | 6 +- ...=> CommonActivityNodeDataBuilderImpl.java} | 18 +-- .../impl/builder/EndEventDataBuilderImpl.java | 25 +++++ .../EventBasedGatewayDataBuilderImpl.java | 26 +++++ .../ExclusiveGatewayDataBuilderImpl.java | 6 +- .../InclusiveGatewayDataBuilderImpl.java | 26 +++++ ...IntermediateThrowEventDataBuilderImpl.java | 28 +++++ .../builder/ManualTaskDataBuilderImpl.java | 7 +- .../MessageBoundaryEventBuilderImpl.java | 26 +++++ .../MessageEndEventDataBuilderImpl.java | 26 +++++ ...IntermediateCatchEventDataBuilderImpl.java | 6 +- ...IntermediateThrowEventDataBuilderImpl.java | 28 +++++ .../MessageStartEventDataBuilderImpl.java | 26 +++++ .../MultiExecutionDataBuilderImpl.java | 36 ++++++ .../builder/MultiInstanceDataBuilderImpl.java | 8 +- .../ParallelGatewayDataBuilderImpl.java | 6 +- .../builder/ReceiveTaskDataBuilderImpl.java | 6 +- .../builder/ScriptTaskDataBuilderImpl.java | 7 +- .../impl/builder/SendTaskDataBuilderImpl.java | 6 +- .../builder/ServiceTaskDataBuilderImpl.java | 6 +- .../SignalBoundaryEventDataBuilderImpl.java | 26 +++++ .../SignalEndEventDataBuilderImpl.java | 26 +++++ ...IntermediateCatchEventDataBuilderImpl.java | 28 +++++ ...IntermediateThrowEventDataBuilderImpl.java | 28 +++++ .../SignalStartEventDataBuilderImpl.java | 26 +++++ .../builder/StartEventDataBuilderImpl.java | 7 +- .../builder/SubProcessDataBuilderImpl.java | 7 +- .../impl/builder/TaskDataBuilderImpl.java | 6 +- .../builder/TransactionDataBuilderImpl.java | 6 +- .../impl/builder/UserTaskDataBuilderImpl.java | 6 +- ...l.java => CommonActivityNodeDataImpl.java} | 14 ++- .../api/model/data/ApiIntegrityTest.java | 51 ++++++++- 117 files changed, 1915 insertions(+), 250 deletions(-) create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/event-based-gateway.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/inclusive-gateway.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-boundary-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-end-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-catch-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-throw-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-start-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-end-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-intermediate-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-start-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-boundary-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-end-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-catch-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-throw-event.bpmn create mode 100644 process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-start-event.bpmn create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EndEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/IntermediateThrowEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEvent.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageEndEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateThrowEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageStartEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiExecutionData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalBoundaryEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalEndEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateCatchEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateThrowEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalStartEventData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/CommonActivityNodeData.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EndEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EventBasedGatewayDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/InclusiveGatewayDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/IntermediateThrowEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageBoundaryEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageEndEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateThrowEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageStartEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiExecutionDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalBoundaryEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalEndEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateCatchEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateThrowEventDataImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalStartEventDataImpl.java rename process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/{ActivityNodeDataBuilderImpl.java => CommonActivityNodeDataBuilderImpl.java} (71%) create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EndEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EventBasedGatewayDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/InclusiveGatewayDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/IntermediateThrowEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageBoundaryEventBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageEndEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateThrowEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageStartEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiExecutionDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalBoundaryEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalEndEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateCatchEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateThrowEventDataBuilderImpl.java create mode 100644 process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalStartEventDataBuilderImpl.java rename process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/{ActivityNodeDataImpl.java => CommonActivityNodeDataImpl.java} (67%) diff --git a/pom.xml b/pom.xml index 2dbbda6fa..b101a0450 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 1.8 1.8 8.2.4 - 8.2.0 + 8.2.1 8.2.2 7.19.0 1.16.1 @@ -33,7 +33,7 @@ 15.0.0 2.13.10 1.15.3 - 3.21.9 + 3.22.3 31.1-android 2.14.0 diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/Camunda7EmbeddedExporterTest.java b/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/Camunda7EmbeddedExporterTest.java index 300fc67f0..7de3dcea9 100644 --- a/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/Camunda7EmbeddedExporterTest.java +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/Camunda7EmbeddedExporterTest.java @@ -26,6 +26,7 @@ import org.camunda.community.migration.processInstance.api.model.data.SubProcessData; import org.camunda.community.migration.processInstance.api.model.data.UserTaskData; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -193,6 +194,8 @@ void shouldExportMultiInstanceUserTask() throws JsonProcessingException { private ActivityNodeData findForLoopCounter( MultiInstanceData multiInstanceData, int loopCounter) { return multiInstanceData.getInstances().stream() + .filter(a -> CommonActivityNodeData.class.isAssignableFrom(a.getClass())) + .map(CommonActivityNodeData.class::cast) .filter(a -> a.getVariables().get("loopCounter").asInt() == loopCounter) .findFirst() .get(); diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/ElementCoverageTest.java b/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/ElementCoverageTest.java index c15b05ac3..6aa524ae2 100644 --- a/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/ElementCoverageTest.java +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/java/org/camunda/community/migration/processInstance/exporter/ElementCoverageTest.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.exporter; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.*; +import static org.junit.jupiter.api.DynamicContainer.*; import static org.junit.jupiter.api.DynamicTest.*; import com.fasterxml.jackson.core.JsonProcessingException; @@ -17,21 +18,36 @@ import org.camunda.bpm.engine.test.junit5.ProcessEngineExtension; import org.camunda.community.migration.processInstance.api.model.data.BusinessRuleTaskData; import org.camunda.community.migration.processInstance.api.model.data.CallActivityData; +import org.camunda.community.migration.processInstance.api.model.data.EndEventData; import org.camunda.community.migration.processInstance.api.model.data.EventBasedGatewayData; import org.camunda.community.migration.processInstance.api.model.data.ExclusiveGatewayData; import org.camunda.community.migration.processInstance.api.model.data.InclusiveGatewayData; +import org.camunda.community.migration.processInstance.api.model.data.IntermediateThrowEventData; import org.camunda.community.migration.processInstance.api.model.data.ManualTaskData; +import org.camunda.community.migration.processInstance.api.model.data.MessageBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateCatchEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageStartEventData; import org.camunda.community.migration.processInstance.api.model.data.ParallelGatewayData; import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceData; import org.camunda.community.migration.processInstance.api.model.data.ReceiveTaskData; import org.camunda.community.migration.processInstance.api.model.data.ScriptTaskData; import org.camunda.community.migration.processInstance.api.model.data.SendTaskData; import org.camunda.community.migration.processInstance.api.model.data.ServiceTaskData; +import org.camunda.community.migration.processInstance.api.model.data.SignalBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateCatchEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalStartEventData; +import org.camunda.community.migration.processInstance.api.model.data.StartEventData; import org.camunda.community.migration.processInstance.api.model.data.SubProcessData; import org.camunda.community.migration.processInstance.api.model.data.TaskData; import org.camunda.community.migration.processInstance.api.model.data.TransactionData; import org.camunda.community.migration.processInstance.api.model.data.UserTaskData; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.DynamicContainer; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; import org.junit.jupiter.api.extension.ExtendWith; @@ -55,6 +71,7 @@ private static List> defaultSteps() { } @TestFactory + @DisplayName("Task Coverage") Stream taskCoverage() { return Stream.of( dynamicTest("Task", () -> performTest("bpmn/coverage/task.bpmn", TaskData.class)), @@ -80,6 +97,7 @@ Stream taskCoverage() { } @TestFactory + @DisplayName("Sub Process Coverage") Stream subProcessCoverage() { return Stream.of( dynamicTest( @@ -101,6 +119,7 @@ Stream subProcessCoverage() { } @TestFactory + @DisplayName("Gateway Coverage") Stream gatewayCoverage() { return Stream.of( dynamicTest( @@ -118,6 +137,93 @@ Stream gatewayCoverage() { () -> performTest("bpmn/coverage/inclusive-gateway.bpmn", InclusiveGatewayData.class))); } + @TestFactory + @DisplayName("Event Coverage") + Stream eventCoverage() { + return Stream.of( + dynamicContainer( + "None Events", + Stream.of( + dynamicTest( + "Start", + () -> performTest("bpmn/coverage/none-start-event.bpmn", StartEventData.class)), + dynamicTest( + "Intermediate Throw", + () -> + performTest( + "bpmn/coverage/none-intermediate-event.bpmn", + IntermediateThrowEventData.class)), + dynamicTest( + "End", + () -> performTest("bpmn/coverage/none-end-event.bpmn", EndEventData.class)))), + dynamicContainer( + "Message Events", + Stream.of( + dynamicTest( + "Start", + () -> + performTest( + "bpmn/coverage/message-start-event.bpmn", MessageStartEventData.class)), + dynamicTest( + "Intermediate Throw", + () -> + performTest( + "bpmn/coverage/message-intermediate-throw-event.bpmn", + MessageIntermediateThrowEventData.class)), + dynamicTest( + "Intermediate Catch", + () -> + performTest( + "bpmn/coverage/message-intermediate-catch-event.bpmn", + MessageIntermediateCatchEventData.class)), + dynamicTest( + "End", + () -> + performTest( + "bpmn/coverage/message-end-event.bpmn", MessageEndEventData.class)), + dynamicTest( + "Boundary Event", + () -> + performTest( + "bpmn/coverage/message-boundary-event.bpmn", + Collections.singletonList( + pi -> runtimeService().correlateMessage("msg")), + MessageBoundaryEventData.class)))), + dynamicContainer( + "Signal Events", + Stream.of( + dynamicTest( + "Start", + () -> + performTest( + "bpmn/coverage/signal-start-event.bpmn", SignalStartEventData.class)), + dynamicTest( + "Intermediate Throw", + () -> + performTest( + "bpmn/coverage/signal-intermediate-throw-event.bpmn", + SignalIntermediateThrowEventData.class)), + dynamicTest( + "Intermediate Catch", + () -> + performTest( + "bpmn/coverage/signal-intermediate-catch-event.bpmn", + SignalIntermediateCatchEventData.class)), + dynamicTest( + "End", + () -> + performTest( + "bpmn/coverage/signal-end-event.bpmn", SignalEndEventData.class)), + dynamicTest( + "Boundary Event", + () -> + performTest( + "bpmn/coverage/signal-boundary-event.bpmn", + Collections.singletonList( + pi -> runtimeService().createSignalEvent("msg").send()), + SignalBoundaryEventData.class))))); + } + private void performTest(String resourceName, Class expectedType) { performTest(resourceName, defaultSteps(), defaultTypeExtractor(), expectedType); } diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/event-based-gateway.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/event-based-gateway.bpmn new file mode 100644 index 000000000..07f0d2159 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/event-based-gateway.bpmn @@ -0,0 +1,64 @@ + + + + + Flow_13bnbu3 + + + + Flow_0so6of6 + + + Flow_13bnbu3 + Flow_0gmbwwc + + + Flow_0gmbwwc + Flow_0so6of6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/inclusive-gateway.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/inclusive-gateway.bpmn new file mode 100644 index 000000000..c05dbe953 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/inclusive-gateway.bpmn @@ -0,0 +1,47 @@ + + + + + Flow_13bnbu3 + + + + Flow_1hw0z77 + + + + Flow_13bnbu3 + Flow_1hw0z77 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-boundary-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-boundary-event.bpmn new file mode 100644 index 000000000..728da4bcf --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-boundary-event.bpmn @@ -0,0 +1,69 @@ + + + + + + Flow_13bnbu3 + + + + Flow_12swlyb + + + + + Flow_13bnbu3 + Flow_12swlyb + + + Flow_195saiv + + + + Flow_195saiv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-end-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-end-event.bpmn new file mode 100644 index 000000000..7157a2259 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-end-event.bpmn @@ -0,0 +1,35 @@ + + + + + + Flow_13bnbu3 + + + + Flow_13bnbu3 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-catch-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-catch-event.bpmn new file mode 100644 index 000000000..ba0c44d19 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-catch-event.bpmn @@ -0,0 +1,49 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-throw-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-throw-event.bpmn new file mode 100644 index 000000000..f9e6cf781 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-intermediate-throw-event.bpmn @@ -0,0 +1,48 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-start-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-start-event.bpmn new file mode 100644 index 000000000..de982ce4a --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/message-start-event.bpmn @@ -0,0 +1,35 @@ + + + + + + Flow_13bnbu3 + + + + Flow_13bnbu3 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-end-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-end-event.bpmn new file mode 100644 index 000000000..bf2047f27 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-end-event.bpmn @@ -0,0 +1,47 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-intermediate-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-intermediate-event.bpmn new file mode 100644 index 000000000..c9a391f37 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-intermediate-event.bpmn @@ -0,0 +1,47 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-start-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-start-event.bpmn new file mode 100644 index 000000000..1dd0c22b5 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/none-start-event.bpmn @@ -0,0 +1,47 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/parallel-gateway.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/parallel-gateway.bpmn index 87e74a359..74e3dad2a 100644 --- a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/parallel-gateway.bpmn +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/parallel-gateway.bpmn @@ -1,97 +1,46 @@ - - + + Flow_13bnbu3 - + Flow_1hw0z77 - Flow_14s3kgo - Flow_1lmwyrz - Flow_1hw0z77 - - - Flow_13bnbu3 - Flow_17ihvrc - Flow_0ik88gy + Flow_1hw0z77 - - Flow_0ik88gy - Flow_14s3kgo - - - - - Flow_17ihvrc - Flow_1lmwyrz - - - - - - - - - - - - - - - + - - - - - + + - + - - + + - + - - - - - - - - - - - - - - - - - - + - - - - + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-boundary-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-boundary-event.bpmn new file mode 100644 index 000000000..2901e7669 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-boundary-event.bpmn @@ -0,0 +1,68 @@ + + + + + + + Flow_13bnbu3 + Flow_12swlyb + + + Flow_195saiv + + + + Flow_13bnbu3 + + + Flow_12swlyb + + + Flow_195saiv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-end-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-end-event.bpmn new file mode 100644 index 000000000..31a4445dc --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-end-event.bpmn @@ -0,0 +1,36 @@ + + + + + + Flow_13bnbu3 + + + + Flow_13bnbu3 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-catch-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-catch-event.bpmn new file mode 100644 index 000000000..05e286c2f --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-catch-event.bpmn @@ -0,0 +1,50 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-throw-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-throw-event.bpmn new file mode 100644 index 000000000..9f6aa63d9 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-intermediate-throw-event.bpmn @@ -0,0 +1,49 @@ + + + + + Flow_13bnbu3 + + + + Flow_0bubrbe + + + + Flow_13bnbu3 + Flow_0bubrbe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-start-event.bpmn b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-start-event.bpmn new file mode 100644 index 000000000..91872bc56 --- /dev/null +++ b/process-instance-migration/camunda-7-embedded-exporter/src/test/resources/bpmn/coverage/signal-start-event.bpmn @@ -0,0 +1,36 @@ + + + + + + Flow_13bnbu3 + + + + Flow_13bnbu3 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-instance-migration/camunda7-base-exporter/src/main/java/org/camunda/community/migration/processInstance/exporter/Camunda7Exporter.java b/process-instance-migration/camunda7-base-exporter/src/main/java/org/camunda/community/migration/processInstance/exporter/Camunda7Exporter.java index 6ae337416..8c09e745e 100644 --- a/process-instance-migration/camunda7-base-exporter/src/main/java/org/camunda/community/migration/processInstance/exporter/Camunda7Exporter.java +++ b/process-instance-migration/camunda7-base-exporter/src/main/java/org/camunda/community/migration/processInstance/exporter/Camunda7Exporter.java @@ -9,6 +9,7 @@ import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.IntStream; +import java.util.stream.Stream; import org.camunda.community.migration.processInstance.api.ProcessInstanceDataExporter; import org.camunda.community.migration.processInstance.api.ProcessInstanceMigrationContext; import org.camunda.community.migration.processInstance.api.ProcessInstanceMigrationContext.ProcessInstanceMigrationSuccessfulContext; @@ -16,6 +17,8 @@ import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceData; import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceMetadata; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData.CommonActivityNodeDataBuilder; import org.camunda.community.migration.processInstance.exporter.api.ActivityInstance; import org.camunda.community.migration.processInstance.exporter.api.ProcessDefinition; import org.camunda.community.migration.processInstance.exporter.api.ProcessEngineService; @@ -73,13 +76,13 @@ private ProcessInstanceData buildProcessInstance(String processInstanceId) { private Map buildActivities(List activityInstances) { return activityInstances.stream() .collect( - Collectors.toMap( + Collectors.groupingBy( activityInstance -> activityInstance.getActivityId().replaceAll("#multiInstanceBody", ""), - this::buildActivity)); + Collectors.collectingAndThen(Collectors.toList(), this::buildActivity))); } - private List buildActivitiesWithoutIdAndTransition( + private List buildActivitiesWithoutIdAndTransition( List activityInstances) { return activityInstances.stream() .filter(activityInstance -> !activityInstance.isTransition()) @@ -87,20 +90,44 @@ private List buildActivitiesWithoutIdAndTransition( .collect(Collectors.toList()); } - private String equalString(String s1, String s2) { - if (s1 == null) { - return s2; + private String equalString(Stream strings) { + return equalString(strings.collect(Collectors.toList())); + } + + private String equalString(List strings) { + String result = null; + for (String s : strings) { + if (s != null) { + if (result == null) { + result = s; + } else { + if (!Objects.equals(s, result)) { + throw new IllegalStateException("Strings are not equal"); + } + } + } } - if (Objects.equals(s1, s2)) { - return s1; + return result; + } + + private ActivityNodeData buildActivity(List activityInstances) { + String activityName = + equalString(activityInstances.stream().map(ActivityInstance::getActivityName)); + if (activityInstances.size() == 1) { + return buildActivity(activityInstances.get(0)); + } else { + return multiExecutionData() + .withName(activityName) + .withActivities( + activityInstances.stream().map(this::buildActivity).collect(Collectors.toList())) + .build(); } - throw new IllegalStateException("Strings are not equal"); } - private ActivityNodeData buildActivity(ActivityInstance activityInstance) { + private CommonActivityNodeData buildActivity(ActivityInstance activityInstance) { switch (activityInstance.getActivityType()) { case "multiInstanceBody": - List instances = + List instances = buildActivitiesWithoutIdAndTransition(activityInstance.getChildActivityInstances()); List activeLoopCounters = instances.stream() @@ -158,6 +185,32 @@ private ActivityNodeData buildActivity(ActivityInstance activityInstance) { return decorate(exclusiveGatewayData(), activityInstance).build(); case PARALLEL_GATEWAY: return decorate(parallelGatewayData(), activityInstance).build(); + case EVENT_BASED_GATEWAY: + return decorate(eventBasedGateway(), activityInstance).build(); + case INCLUSIVE_GATEWAY: + return decorate(inclusiveGateway(), activityInstance).build(); + case INTERMEDIATE_EVENT: + return decorate(intermediateThrowEvent(), activityInstance).build(); + case END_EVENT: + return decorate(endEvent(), activityInstance).build(); + case MESSAGE_START_EVENT: + return decorate(messageStartEvent(), activityInstance).build(); + case MESSAGE_INTERMEDIATE_THROW_EVENT: + return decorate(messageIntermediateThrowEvent(), activityInstance).build(); + case MESSAGE_END_EVENT: + return decorate(messageEndEvent(), activityInstance).build(); + case MESSAGE_BOUNDARY_EVENT: + return decorate(messageBoundaryEvent(), activityInstance).build(); + case SIGNAL_START_EVENT: + return decorate(signalStartEvent(), activityInstance).build(); + case SIGNAL_INTERMEDIATE_THROW_EVENT: + return decorate(signalIntermediateThrowEvent(), activityInstance).build(); + case SIGNAL_INTERMEDIATE_CATCH_EVENT: + return decorate(signalIntermediateCatchEvent(), activityInstance).build(); + case SIGNAL_END_EVENT: + return decorate(signalEndEvent(), activityInstance).build(); + case SIGNAL_BOUNDARY_EVENT: + return decorate(signalBoundaryEvent(), activityInstance).build(); default: throw new RuntimeException( "No handler defined for activity type '" + activityInstance.getActivityType() + "'"); @@ -184,7 +237,7 @@ private ProcessInstanceData getCalledProcessInstance(ActivityInstance activityIn return buildProcessInstance(processInstances.get(0).getId()); } - private > T decorate( + private > T decorate( T builder, ActivityInstance activityInstance) { return builder .withName(activityInstance.getActivityName()) diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/Builder.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/Builder.java index 887a19cf6..6d1cf3cef 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/Builder.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/Builder.java @@ -9,9 +9,18 @@ import com.fasterxml.jackson.databind.node.TextNode; import org.camunda.community.migration.processInstance.api.model.data.BusinessRuleTaskData.BusinessRuleTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.CallActivityData.CallActivityDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.EndEventData.EndEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.EventBasedGatewayData.EventBasedGatewayDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ExclusiveGatewayData.ExclusiveGatewayDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.InclusiveGatewayData.InclusiveGatewayDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.IntermediateThrowEventData.IntermediateThrowEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ManualTaskData.ManualTaskDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.MessageBoundaryEventData.MessageBoundaryEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.MessageEndEventData.MessageEndEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateCatchEventData.MessageIntermediateCatchEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateThrowEventData.MessageIntermediateThrowEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.MessageStartEventData.MessageStartEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.MultiExecutionData.MultiExecutionDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.MultiInstanceData.MultiInstanceDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ParallelGatewayData.ParallelGatewayDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceData.ProcessInstanceDataBuilder; @@ -20,6 +29,11 @@ import org.camunda.community.migration.processInstance.api.model.data.ScriptTaskData.ScriptTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.SendTaskData.SendTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ServiceTaskData.ServiceTaskDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.SignalBoundaryEventData.SignalBoundaryEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.SignalEndEventData.SignalEndEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateCatchEventData.SignalIntermediateCatchEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateThrowEventData.SignalIntermediateThrowEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.SignalStartEventData.SignalStartEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.StartEventData.StartEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.SubProcessData.SubProcessDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.TaskData.TaskDataBuilder; @@ -27,9 +41,18 @@ import org.camunda.community.migration.processInstance.api.model.data.UserTaskData.UserTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.BusinessRuleTaskDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.CallActivityBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.EndEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.EventBasedGatewayDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ExclusiveGatewayDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.InclusiveGatewayDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.IntermediateThrowEventDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ManualTaskDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MessageBoundaryEventBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MessageEndEventDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MessageIntermediateCatchEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MessageIntermediateThrowEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MessageStartEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MultiExecutionDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.MultiInstanceDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ParallelGatewayDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ProcessInstanceDataBuilderImpl; @@ -38,6 +61,11 @@ import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ScriptTaskDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SendTaskDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.ServiceTaskDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SignalBoundaryEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SignalEndEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SignalIntermediateCatchEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SignalIntermediateThrowEventDataBuilderImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SignalStartEventDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.StartEventDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.SubProcessDataBuilderImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.builder.TaskDataBuilderImpl; @@ -117,6 +145,62 @@ static ParallelGatewayDataBuilder parallelGatewayData() { return new ParallelGatewayDataBuilderImpl(); } + static MultiExecutionDataBuilder multiExecutionData() { + return new MultiExecutionDataBuilderImpl(); + } + + static EventBasedGatewayDataBuilder eventBasedGateway() { + return new EventBasedGatewayDataBuilderImpl(); + } + + static InclusiveGatewayDataBuilder inclusiveGateway() { + return new InclusiveGatewayDataBuilderImpl(); + } + + static IntermediateThrowEventDataBuilder intermediateThrowEvent() { + return new IntermediateThrowEventDataBuilderImpl(); + } + + static EndEventDataBuilder endEvent() { + return new EndEventDataBuilderImpl(); + } + + static MessageStartEventDataBuilder messageStartEvent() { + return new MessageStartEventDataBuilderImpl(); + } + + static MessageIntermediateThrowEventDataBuilder messageIntermediateThrowEvent() { + return new MessageIntermediateThrowEventDataBuilderImpl(); + } + + static MessageEndEventDataBuilder messageEndEvent() { + return new MessageEndEventDataBuilderImpl(); + } + + static MessageBoundaryEventDataBuilder messageBoundaryEvent() { + return new MessageBoundaryEventBuilderImpl(); + } + + static SignalStartEventDataBuilder signalStartEvent() { + return new SignalStartEventDataBuilderImpl(); + } + + static SignalIntermediateThrowEventDataBuilder signalIntermediateThrowEvent() { + return new SignalIntermediateThrowEventDataBuilderImpl(); + } + + static SignalIntermediateCatchEventDataBuilder signalIntermediateCatchEvent() { + return new SignalIntermediateCatchEventDataBuilderImpl(); + } + + static SignalEndEventDataBuilder signalEndEvent() { + return new SignalEndEventDataBuilderImpl(); + } + + static SignalBoundaryEventDataBuilder signalBoundaryEvent() { + return new SignalBoundaryEventDataBuilderImpl(); + } + interface Json { static TextNode text(String text) { diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/BusinessRuleTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/BusinessRuleTaskData.java index 51e7d6e79..46f098a6f 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/BusinessRuleTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/BusinessRuleTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface BusinessRuleTaskData extends ActivityNodeData { +public interface BusinessRuleTaskData extends CommonActivityNodeData { interface BusinessRuleTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/CallActivityData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/CallActivityData.java index 6fd4f996f..e3cdc8ab3 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/CallActivityData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/CallActivityData.java @@ -1,12 +1,12 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface CallActivityData extends ActivityNodeData { +public interface CallActivityData extends CommonActivityNodeData { ProcessInstanceData getProcessInstance(); interface CallActivityDataBuilder - extends ActivityNodeDataBuilder { + extends CommonActivityNodeDataBuilder { CallActivityDataBuilder withProcessInstance(ProcessInstanceData processInstance); } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EndEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EndEventData.java new file mode 100644 index 000000000..fbbb129da --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EndEventData.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface EndEventData extends CommonActivityNodeData { + interface EndEventDataBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EventBasedGatewayData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EventBasedGatewayData.java index 1501ea344..32f9f5b6f 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EventBasedGatewayData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/EventBasedGatewayData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface EventBasedGatewayData extends ActivityNodeData { +public interface EventBasedGatewayData extends CommonActivityNodeData { interface EventBasedGatewayDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ExclusiveGatewayData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ExclusiveGatewayData.java index 6803567a5..aa5f6296b 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ExclusiveGatewayData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ExclusiveGatewayData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ExclusiveGatewayData extends ActivityNodeData { +public interface ExclusiveGatewayData extends CommonActivityNodeData { interface ExclusiveGatewayDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/InclusiveGatewayData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/InclusiveGatewayData.java index 3504a377a..c00d36b3c 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/InclusiveGatewayData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/InclusiveGatewayData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface InclusiveGatewayData extends ActivityNodeData { +public interface InclusiveGatewayData extends CommonActivityNodeData { interface InclusiveGatewayDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/IntermediateThrowEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/IntermediateThrowEventData.java new file mode 100644 index 000000000..9cb4cf169 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/IntermediateThrowEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface IntermediateThrowEventData extends CommonActivityNodeData { + interface IntermediateThrowEventDataBuilder + extends CommonActivityNodeDataBuilder< + IntermediateThrowEventDataBuilder, IntermediateThrowEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ManualTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ManualTaskData.java index 1e9954c44..ec9dae8fb 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ManualTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ManualTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ManualTaskData extends ActivityNodeData { +public interface ManualTaskData extends CommonActivityNodeData { interface ManualTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEvent.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEvent.java new file mode 100644 index 000000000..14514cf82 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEvent.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface MessageBoundaryEvent extends CommonActivityNodeData { + interface MessageBoundaryEventBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEventData.java new file mode 100644 index 000000000..38a566918 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageBoundaryEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface MessageBoundaryEventData extends CommonActivityNodeData { + interface MessageBoundaryEventDataBuilder + extends CommonActivityNodeDataBuilder< + MessageBoundaryEventDataBuilder, MessageBoundaryEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageEndEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageEndEventData.java new file mode 100644 index 000000000..8e4fad726 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageEndEventData.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface MessageEndEventData extends CommonActivityNodeData { + interface MessageEndEventDataBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateCatchEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateCatchEventData.java index c0f291719..82df921f1 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateCatchEventData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateCatchEventData.java @@ -1,9 +1,9 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface MessageIntermediateCatchEventData extends ActivityNodeData { +public interface MessageIntermediateCatchEventData extends CommonActivityNodeData { interface MessageIntermediateCatchEventDataBuilder - extends ActivityNodeDataBuilder< + extends CommonActivityNodeDataBuilder< MessageIntermediateCatchEventDataBuilder, MessageIntermediateCatchEventData> {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateThrowEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateThrowEventData.java new file mode 100644 index 000000000..e51dba7f9 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageIntermediateThrowEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface MessageIntermediateThrowEventData extends CommonActivityNodeData { + interface MessageIntermediateThrowEventDataBuilder + extends CommonActivityNodeDataBuilder< + MessageIntermediateThrowEventDataBuilder, MessageIntermediateThrowEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageStartEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageStartEventData.java new file mode 100644 index 000000000..79469c4ba --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MessageStartEventData.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface MessageStartEventData extends CommonActivityNodeData { + interface MessageStartEventDataBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiExecutionData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiExecutionData.java new file mode 100644 index 000000000..9570b90b4 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiExecutionData.java @@ -0,0 +1,18 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import java.util.List; +import org.camunda.community.migration.processInstance.api.model.FinalBuildStep; +import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.NamedNodeData; + +public interface MultiExecutionData extends ActivityNodeData, NamedNodeData { + List getActivities(); + + interface MultiExecutionDataBuilder + extends NamedNodeDataBuilder, FinalBuildStep { + MultiExecutionDataBuilder withActivity(CommonActivityNodeData activity); + + MultiExecutionDataBuilder withActivities(List activities); + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiInstanceData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiInstanceData.java index 84d9dbd9e..42be105ad 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiInstanceData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/MultiInstanceData.java @@ -2,17 +2,18 @@ import java.util.List; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface MultiInstanceData extends ActivityNodeData { +public interface MultiInstanceData extends CommonActivityNodeData { List getInstances(); List getCompletedInstanceLoopCounters(); interface MultiInstanceDataBuilder - extends ActivityNodeDataBuilder { + extends CommonActivityNodeDataBuilder { MultiInstanceDataBuilder withInstance(ActivityNodeData instance); - MultiInstanceDataBuilder withInstances(Iterable instances); + MultiInstanceDataBuilder withInstances(Iterable instances); MultiInstanceDataBuilder withCompletedInstanceLoopCounter(Integer loopCounter); diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ParallelGatewayData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ParallelGatewayData.java index 49c673c9a..03e713a7a 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ParallelGatewayData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ParallelGatewayData.java @@ -1,9 +1,9 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ParallelGatewayData extends ActivityNodeData { +public interface ParallelGatewayData extends CommonActivityNodeData { interface ParallelGatewayDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ReceiveTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ReceiveTaskData.java index 89a2a4c03..500c4cadf 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ReceiveTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ReceiveTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ReceiveTaskData extends ActivityNodeData { +public interface ReceiveTaskData extends CommonActivityNodeData { interface ReceiveTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ScriptTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ScriptTaskData.java index f6e3f560b..cce90bef9 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ScriptTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ScriptTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ScriptTaskData extends ActivityNodeData { +public interface ScriptTaskData extends CommonActivityNodeData { interface ScriptTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SendTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SendTaskData.java index 5ab65b533..6931c6414 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SendTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SendTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface SendTaskData extends ActivityNodeData { +public interface SendTaskData extends CommonActivityNodeData { interface SendTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ServiceTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ServiceTaskData.java index 1a2e51ee2..8e98ea4f5 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ServiceTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/ServiceTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface ServiceTaskData extends ActivityNodeData { +public interface ServiceTaskData extends CommonActivityNodeData { interface ServiceTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalBoundaryEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalBoundaryEventData.java new file mode 100644 index 000000000..3cd557d09 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalBoundaryEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface SignalBoundaryEventData extends CommonActivityNodeData { + interface SignalBoundaryEventDataBuilder + extends CommonActivityNodeDataBuilder< + SignalBoundaryEventDataBuilder, SignalBoundaryEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalEndEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalEndEventData.java new file mode 100644 index 000000000..729cd1ac4 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalEndEventData.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface SignalEndEventData extends CommonActivityNodeData { + interface SignalEndEventDataBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateCatchEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateCatchEventData.java new file mode 100644 index 000000000..f47780bc4 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateCatchEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface SignalIntermediateCatchEventData extends CommonActivityNodeData { + interface SignalIntermediateCatchEventDataBuilder + extends CommonActivityNodeDataBuilder< + SignalIntermediateCatchEventDataBuilder, SignalIntermediateCatchEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateThrowEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateThrowEventData.java new file mode 100644 index 000000000..f74860dcd --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalIntermediateThrowEventData.java @@ -0,0 +1,9 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface SignalIntermediateThrowEventData extends CommonActivityNodeData { + interface SignalIntermediateThrowEventDataBuilder + extends CommonActivityNodeDataBuilder< + SignalIntermediateThrowEventDataBuilder, SignalIntermediateThrowEventData> {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalStartEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalStartEventData.java new file mode 100644 index 000000000..39ac096ec --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SignalStartEventData.java @@ -0,0 +1,8 @@ +package org.camunda.community.migration.processInstance.api.model.data; + +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public interface SignalStartEventData extends CommonActivityNodeData { + interface SignalStartEventDataBuilder + extends CommonActivityNodeDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/StartEventData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/StartEventData.java index f9b00bea1..1568e0f8c 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/StartEventData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/StartEventData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface StartEventData extends ActivityNodeData { +public interface StartEventData extends CommonActivityNodeData { interface StartEventDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SubProcessData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SubProcessData.java index de0bca003..aa7348e97 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SubProcessData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/SubProcessData.java @@ -1,11 +1,11 @@ package org.camunda.community.migration.processInstance.api.model.data; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityContainerData; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface SubProcessData extends ActivityNodeData, ActivityContainerData { +public interface SubProcessData extends CommonActivityNodeData, ActivityContainerData { interface SubProcessDataBuilder - extends ActivityNodeDataBuilder, + extends CommonActivityNodeDataBuilder, ActivityContainerDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TaskData.java index 15e8bd2ac..7fdb5abae 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TaskData.java @@ -1,7 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface TaskData extends ActivityNodeData { - interface TaskDataBuilder extends ActivityNodeDataBuilder {} +public interface TaskData extends CommonActivityNodeData { + interface TaskDataBuilder extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TransactionData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TransactionData.java index 521166d1e..cdd07ed09 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TransactionData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/TransactionData.java @@ -1,10 +1,10 @@ package org.camunda.community.migration.processInstance.api.model.data; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityContainerData; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface TransactionData extends ActivityNodeData, ActivityContainerData { +public interface TransactionData extends CommonActivityNodeData, ActivityContainerData { interface TransactionDataBuilder - extends ActivityNodeDataBuilder, + extends CommonActivityNodeDataBuilder, ActivityContainerDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/UserTaskData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/UserTaskData.java index 5c7fda8c5..7486fc535 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/UserTaskData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/UserTaskData.java @@ -1,8 +1,8 @@ package org.camunda.community.migration.processInstance.api.model.data; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public interface UserTaskData extends ActivityNodeData { +public interface UserTaskData extends CommonActivityNodeData { interface UserTaskDataBuilder - extends ActivityNodeDataBuilder {} + extends CommonActivityNodeDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/ActivityNodeData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/ActivityNodeData.java index f095d0d94..a883d527d 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/ActivityNodeData.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/ActivityNodeData.java @@ -3,18 +3,31 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.camunda.community.migration.processInstance.api.model.FinalBuildStep; import org.camunda.community.migration.processInstance.api.model.data.impl.BusinessRuleTaskDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.CallActivityDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.EndEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.EventBasedGatewayDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ExclusiveGatewayDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.InclusiveGatewayDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.IntermediateThrowEventDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ManualTaskDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageBoundaryEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageEndEventDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.MessageIntermediateCatchEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageIntermediateThrowEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageStartEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.MultiExecutionDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.MultiInstanceDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ParallelGatewayDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ReceiveTaskDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ScriptTaskDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.SendTaskDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.ServiceTaskDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalBoundaryEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalEndEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalIntermediateCatchEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalIntermediateThrowEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalStartEventDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.StartEventDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.SubProcessDataImpl; import org.camunda.community.migration.processInstance.api.model.data.impl.TaskDataImpl; @@ -40,9 +53,31 @@ @Type(value = StartEventDataImpl.class, name = ActivityNodeData.START_EVENT), @Type(value = TransactionDataImpl.class, name = ActivityNodeData.TRANSACTION), @Type(value = ExclusiveGatewayDataImpl.class, name = ActivityNodeData.EXCLUSIVE_GATEWAY), - @Type(value = ParallelGatewayDataImpl.class, name = ActivityNodeData.PARALLEL_GATEWAY) + @Type(value = ParallelGatewayDataImpl.class, name = ActivityNodeData.PARALLEL_GATEWAY), + @Type(value = MultiExecutionDataImpl.class, name = ActivityNodeData.MULTI_EXECUTION), + @Type(value = EventBasedGatewayDataImpl.class, name = ActivityNodeData.EVENT_BASED_GATEWAY), + @Type(value = InclusiveGatewayDataImpl.class, name = ActivityNodeData.INCLUSIVE_GATEWAY), + @Type(value = IntermediateThrowEventDataImpl.class, name = ActivityNodeData.INTERMEDIATE_EVENT), + @Type(value = EndEventDataImpl.class, name = ActivityNodeData.END_EVENT), + @Type(value = MessageStartEventDataImpl.class, name = ActivityNodeData.MESSAGE_START_EVENT), + @Type( + value = MessageIntermediateThrowEventDataImpl.class, + name = ActivityNodeData.MESSAGE_INTERMEDIATE_THROW_EVENT), + @Type(value = MessageEndEventDataImpl.class, name = ActivityNodeData.MESSAGE_END_EVENT), + @Type(value = MessageBoundaryEventDataImpl.class, name = ActivityNodeData.MESSAGE_BOUNDARY_EVENT), + @Type(value = SignalStartEventDataImpl.class, name = ActivityNodeData.SIGNAL_START_EVENT), + @Type( + value = SignalIntermediateThrowEventDataImpl.class, + name = ActivityNodeData.SIGNAL_INTERMEDIATE_THROW_EVENT), + @Type( + value = SignalIntermediateCatchEventDataImpl.class, + name = ActivityNodeData.SIGNAL_INTERMEDIATE_CATCH_EVENT), + @Type(value = SignalEndEventDataImpl.class, name = ActivityNodeData.SIGNAL_END_EVENT), + @Type(value = SignalBoundaryEventDataImpl.class, name = ActivityNodeData.SIGNAL_BOUNDARY_EVENT) }) -public interface ActivityNodeData extends NamedNodeData, VariableScopeData, ExecutionData { +public interface ActivityNodeData { + // Helper + String MULTI_EXECUTION = "multipleExecution"; // Tasks String USER_TASK = "userTask"; String TASK = "task"; @@ -58,28 +93,27 @@ public interface ActivityNodeData extends NamedNodeData, VariableScopeData, Exec String CALL_ACTIVITY = "callActivity"; // Gateways String EXCLUSIVE_GATEWAY = "exclusiveGateway"; - String PARALLEL_GATEWAY = "parallelGateway"; // TODO define parallel gateway - String EVENT_BASED_GATEWAY = ""; // TODO define event based gateway - String INCLUSIVE_GATEWAY = ""; // TODO define inclusive gateway + String PARALLEL_GATEWAY = "parallelGateway"; + String EVENT_BASED_GATEWAY = "eventBasedGateway"; + String INCLUSIVE_GATEWAY = "inclusiveGateway"; // Markers String MULTI_INSTANCE = "multiInstance"; // Events - String START_EVENT = "startEvent"; // TODO define start event - String INTERMEDIATE_EVENT = ""; // TODO define intermediate event - String END_EVENT = ""; // TODO define end event - String MESSAGE_START_EVENT = ""; // TODO define message start event + String START_EVENT = "startEvent"; + String INTERMEDIATE_EVENT = "intermediateNoneThrowEvent"; + String END_EVENT = "noneEndEvent"; + String MESSAGE_START_EVENT = "messageStartEvent"; String MESSAGE_INTERMEDIATE_CATCH_EVENT = "intermediateMessageCatch"; - String MESSAGE_INTERMEDIATE_THROW_EVENT = ""; // TODO define message intermediate throw event - String MESSAGE_END_EVENT = ""; // TODO define message end event + String MESSAGE_INTERMEDIATE_THROW_EVENT = "intermediateMessageThrowEvent"; + String MESSAGE_END_EVENT = "messageEndEvent"; + String MESSAGE_BOUNDARY_EVENT = "boundaryMessage"; + String SIGNAL_START_EVENT = "signalStartEvent"; + String SIGNAL_INTERMEDIATE_THROW_EVENT = "intermediateSignalThrow"; + String SIGNAL_INTERMEDIATE_CATCH_EVENT = "intermediateSignalCatch"; + String SIGNAL_END_EVENT = "signalEndEvent"; + String SIGNAL_BOUNDARY_EVENT = "boundarySignal"; default T as(Class type) { return type.cast(this); } - - interface ActivityNodeDataBuilder< - T extends ActivityNodeDataBuilder, R extends ActivityNodeData> - extends FinalBuildStep, - NamedNodeDataBuilder, - VariableScopeDataBuilder, - ExecutionDataBuilder {} } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/CommonActivityNodeData.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/CommonActivityNodeData.java new file mode 100644 index 000000000..018cecf62 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/chunk/CommonActivityNodeData.java @@ -0,0 +1,13 @@ +package org.camunda.community.migration.processInstance.api.model.data.chunk; + +import org.camunda.community.migration.processInstance.api.model.FinalBuildStep; + +public interface CommonActivityNodeData + extends ActivityNodeData, NamedNodeData, VariableScopeData, ExecutionData { + interface CommonActivityNodeDataBuilder< + T extends CommonActivityNodeDataBuilder, R extends CommonActivityNodeData> + extends FinalBuildStep, + NamedNodeDataBuilder, + VariableScopeDataBuilder, + ExecutionDataBuilder {} +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/BusinessRuleTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/BusinessRuleTaskDataImpl.java index 3f4edc06d..af24105b5 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/BusinessRuleTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/BusinessRuleTaskDataImpl.java @@ -1,7 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.BusinessRuleTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class BusinessRuleTaskDataImpl extends ActivityNodeDataImpl +public final class BusinessRuleTaskDataImpl extends CommonActivityNodeDataImpl implements BusinessRuleTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/CallActivityDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/CallActivityDataImpl.java index 867c8be30..4f6ebc948 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/CallActivityDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/CallActivityDataImpl.java @@ -3,9 +3,10 @@ import java.util.Objects; import org.camunda.community.migration.processInstance.api.model.data.CallActivityData; import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class CallActivityDataImpl extends ActivityNodeDataImpl implements CallActivityData { +public final class CallActivityDataImpl extends CommonActivityNodeDataImpl + implements CallActivityData { private ProcessInstanceData processInstance; diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EndEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EndEventDataImpl.java new file mode 100644 index 000000000..0743ae67b --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EndEventDataImpl.java @@ -0,0 +1,6 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.EndEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class EndEventDataImpl extends CommonActivityNodeDataImpl implements EndEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EventBasedGatewayDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EventBasedGatewayDataImpl.java new file mode 100644 index 000000000..0e6aaa2e4 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/EventBasedGatewayDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.EventBasedGatewayData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class EventBasedGatewayDataImpl extends CommonActivityNodeDataImpl + implements EventBasedGatewayData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ExclusiveGatewayDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ExclusiveGatewayDataImpl.java index ef0a8d6c8..968691a1c 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ExclusiveGatewayDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ExclusiveGatewayDataImpl.java @@ -1,7 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ExclusiveGatewayData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public class ExclusiveGatewayDataImpl extends ActivityNodeDataImpl +public class ExclusiveGatewayDataImpl extends CommonActivityNodeDataImpl implements ExclusiveGatewayData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/InclusiveGatewayDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/InclusiveGatewayDataImpl.java new file mode 100644 index 000000000..e1987a8a9 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/InclusiveGatewayDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.InclusiveGatewayData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class InclusiveGatewayDataImpl extends CommonActivityNodeDataImpl + implements InclusiveGatewayData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/IntermediateThrowEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/IntermediateThrowEventDataImpl.java new file mode 100644 index 000000000..27bb202de --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/IntermediateThrowEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.IntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class IntermediateThrowEventDataImpl extends CommonActivityNodeDataImpl + implements IntermediateThrowEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ManualTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ManualTaskDataImpl.java index 8fd54e31c..b92fb49d2 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ManualTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ManualTaskDataImpl.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ManualTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class ManualTaskDataImpl extends ActivityNodeDataImpl implements ManualTaskData {} +public final class ManualTaskDataImpl extends CommonActivityNodeDataImpl + implements ManualTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageBoundaryEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageBoundaryEventDataImpl.java new file mode 100644 index 000000000..18829bf8f --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageBoundaryEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.MessageBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageBoundaryEventDataImpl extends CommonActivityNodeDataImpl + implements MessageBoundaryEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageEndEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageEndEventDataImpl.java new file mode 100644 index 000000000..297dfe531 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageEndEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.MessageEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageEndEventDataImpl extends CommonActivityNodeDataImpl + implements MessageEndEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateCatchEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateCatchEventDataImpl.java index 1b7278dfb..b51d1ae98 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateCatchEventDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateCatchEventDataImpl.java @@ -1,7 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateCatchEventData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public class MessageIntermediateCatchEventDataImpl extends ActivityNodeDataImpl +public class MessageIntermediateCatchEventDataImpl extends CommonActivityNodeDataImpl implements MessageIntermediateCatchEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateThrowEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateThrowEventDataImpl.java new file mode 100644 index 000000000..b57513417 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageIntermediateThrowEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageIntermediateThrowEventDataImpl extends CommonActivityNodeDataImpl + implements MessageIntermediateThrowEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageStartEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageStartEventDataImpl.java new file mode 100644 index 000000000..32dd9383b --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MessageStartEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.MessageStartEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageStartEventDataImpl extends CommonActivityNodeDataImpl + implements MessageStartEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiExecutionDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiExecutionDataImpl.java new file mode 100644 index 000000000..06fe22259 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiExecutionDataImpl.java @@ -0,0 +1,42 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import java.util.List; +import java.util.Objects; +import org.camunda.community.migration.processInstance.api.model.data.MultiExecutionData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; + +public class MultiExecutionDataImpl implements MultiExecutionData { + private List activities; + private String name; + + @Override + public List getActivities() { + return activities; + } + + public void setActivities(List activities) { + this.activities = activities; + } + + @Override + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MultiExecutionDataImpl that = (MultiExecutionDataImpl) o; + return Objects.equals(activities, that.activities) && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(activities, name); + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiInstanceDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiInstanceDataImpl.java index 279c455d8..9f1ad5f9f 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiInstanceDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/MultiInstanceDataImpl.java @@ -4,9 +4,10 @@ import java.util.Objects; import org.camunda.community.migration.processInstance.api.model.data.MultiInstanceData; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class MultiInstanceDataImpl extends ActivityNodeDataImpl implements MultiInstanceData { +public final class MultiInstanceDataImpl extends CommonActivityNodeDataImpl + implements MultiInstanceData { private List instances; private List completedInstanceLoopCounters; diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ParallelGatewayDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ParallelGatewayDataImpl.java index 6de713bf2..5cf097dbf 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ParallelGatewayDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ParallelGatewayDataImpl.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ParallelGatewayData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public class ParallelGatewayDataImpl extends ActivityNodeDataImpl implements ParallelGatewayData {} +public class ParallelGatewayDataImpl extends CommonActivityNodeDataImpl + implements ParallelGatewayData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ReceiveTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ReceiveTaskDataImpl.java index e6466c049..b0e825927 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ReceiveTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ReceiveTaskDataImpl.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ReceiveTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class ReceiveTaskDataImpl extends ActivityNodeDataImpl implements ReceiveTaskData {} +public final class ReceiveTaskDataImpl extends CommonActivityNodeDataImpl + implements ReceiveTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ScriptTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ScriptTaskDataImpl.java index 6c66acb49..64e1ddd59 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ScriptTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ScriptTaskDataImpl.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ScriptTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class ScriptTaskDataImpl extends ActivityNodeDataImpl implements ScriptTaskData {} +public final class ScriptTaskDataImpl extends CommonActivityNodeDataImpl + implements ScriptTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SendTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SendTaskDataImpl.java index 68d440a22..0cba22e8e 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SendTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SendTaskDataImpl.java @@ -1,6 +1,6 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.SendTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class SendTaskDataImpl extends ActivityNodeDataImpl implements SendTaskData {} +public final class SendTaskDataImpl extends CommonActivityNodeDataImpl implements SendTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ServiceTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ServiceTaskDataImpl.java index c91967f85..76710dd50 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ServiceTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/ServiceTaskDataImpl.java @@ -1,6 +1,7 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.ServiceTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class ServiceTaskDataImpl extends ActivityNodeDataImpl implements ServiceTaskData {} +public final class ServiceTaskDataImpl extends CommonActivityNodeDataImpl + implements ServiceTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalBoundaryEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalBoundaryEventDataImpl.java new file mode 100644 index 000000000..948c33701 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalBoundaryEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.SignalBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalBoundaryEventDataImpl extends CommonActivityNodeDataImpl + implements SignalBoundaryEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalEndEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalEndEventDataImpl.java new file mode 100644 index 000000000..9b5ba6890 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalEndEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.SignalEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalEndEventDataImpl extends CommonActivityNodeDataImpl + implements SignalEndEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateCatchEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateCatchEventDataImpl.java new file mode 100644 index 000000000..fd1e0f70f --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateCatchEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateCatchEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalIntermediateCatchEventDataImpl extends CommonActivityNodeDataImpl + implements SignalIntermediateCatchEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateThrowEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateThrowEventDataImpl.java new file mode 100644 index 000000000..9d2367f7a --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalIntermediateThrowEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalIntermediateThrowEventDataImpl extends CommonActivityNodeDataImpl + implements SignalIntermediateThrowEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalStartEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalStartEventDataImpl.java new file mode 100644 index 000000000..dc15a697a --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SignalStartEventDataImpl.java @@ -0,0 +1,7 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl; + +import org.camunda.community.migration.processInstance.api.model.data.SignalStartEventData; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalStartEventDataImpl extends CommonActivityNodeDataImpl + implements SignalStartEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/StartEventDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/StartEventDataImpl.java index db9c01330..86a73349d 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/StartEventDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/StartEventDataImpl.java @@ -1,6 +1,6 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.StartEventData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public class StartEventDataImpl extends ActivityNodeDataImpl implements StartEventData {} +public class StartEventDataImpl extends CommonActivityNodeDataImpl implements StartEventData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SubProcessDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SubProcessDataImpl.java index 714e0d13d..722494c08 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SubProcessDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/SubProcessDataImpl.java @@ -4,9 +4,9 @@ import java.util.Objects; import org.camunda.community.migration.processInstance.api.model.data.SubProcessData; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class SubProcessDataImpl extends ActivityNodeDataImpl implements SubProcessData { +public final class SubProcessDataImpl extends CommonActivityNodeDataImpl implements SubProcessData { private Map activities; @Override diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TaskDataImpl.java index 50a4d527c..9880f5e97 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TaskDataImpl.java @@ -1,6 +1,6 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.TaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class TaskDataImpl extends ActivityNodeDataImpl implements TaskData {} +public final class TaskDataImpl extends CommonActivityNodeDataImpl implements TaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TransactionDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TransactionDataImpl.java index ede16ddfd..134ac451b 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TransactionDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/TransactionDataImpl.java @@ -4,9 +4,9 @@ import java.util.Objects; import org.camunda.community.migration.processInstance.api.model.data.TransactionData; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public class TransactionDataImpl extends ActivityNodeDataImpl implements TransactionData { +public class TransactionDataImpl extends CommonActivityNodeDataImpl implements TransactionData { private Map activities; @Override diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/UserTaskDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/UserTaskDataImpl.java index 0ebca4a89..fceebdf4b 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/UserTaskDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/UserTaskDataImpl.java @@ -1,6 +1,6 @@ package org.camunda.community.migration.processInstance.api.model.data.impl; import org.camunda.community.migration.processInstance.api.model.data.UserTaskData; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; -public final class UserTaskDataImpl extends ActivityNodeDataImpl implements UserTaskData {} +public final class UserTaskDataImpl extends CommonActivityNodeDataImpl implements UserTaskData {} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/BusinessRuleTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/BusinessRuleTaskDataBuilderImpl.java index 3a2c5ebe9..050b9e598 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/BusinessRuleTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/BusinessRuleTaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.BusinessRuleTaskData; import org.camunda.community.migration.processInstance.api.model.data.BusinessRuleTaskData.BusinessRuleTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.BusinessRuleTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class BusinessRuleTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< BusinessRuleTaskDataBuilder, BusinessRuleTaskData, BusinessRuleTaskDataImpl> implements BusinessRuleTaskDataBuilder { @Override @@ -15,7 +15,7 @@ protected BusinessRuleTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CallActivityBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CallActivityBuilderImpl.java index cddf4d563..ffbdaabfa 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CallActivityBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CallActivityBuilderImpl.java @@ -4,10 +4,10 @@ import org.camunda.community.migration.processInstance.api.model.data.CallActivityData.CallActivityDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.ProcessInstanceData; import org.camunda.community.migration.processInstance.api.model.data.impl.CallActivityDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class CallActivityBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< CallActivityDataBuilder, CallActivityData, CallActivityDataImpl> implements CallActivityDataBuilder { @Override @@ -27,7 +27,7 @@ protected CallActivityDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ActivityNodeDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CommonActivityNodeDataBuilderImpl.java similarity index 71% rename from process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ActivityNodeDataBuilderImpl.java rename to process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CommonActivityNodeDataBuilderImpl.java index 15182b9d5..34dafc254 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ActivityNodeDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/CommonActivityNodeDataBuilderImpl.java @@ -5,13 +5,15 @@ import com.fasterxml.jackson.databind.JsonNode; import java.util.Map; import org.camunda.community.migration.processInstance.api.model.FinalBuildStep.FinalBuildStepImpl; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData.ActivityNodeDataBuilder; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; - -public abstract class ActivityNodeDataBuilderImpl< - B extends ActivityNodeDataBuilder, T extends ActivityNodeData, I extends T> - extends FinalBuildStepImpl implements ActivityNodeDataBuilder { +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData.CommonActivityNodeDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public abstract class CommonActivityNodeDataBuilderImpl< + B extends CommonActivityNodeDataBuilder, + T extends CommonActivityNodeData, + I extends T> + extends FinalBuildStepImpl implements CommonActivityNodeDataBuilder { @Override public B withName(String name) { data().setName(name); @@ -38,5 +40,5 @@ public B withExecuted(Boolean executed) { protected abstract B builder(); - protected abstract ActivityNodeDataImpl data(); + protected abstract CommonActivityNodeDataImpl data(); } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EndEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EndEventDataBuilderImpl.java new file mode 100644 index 000000000..c0efb9817 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EndEventDataBuilderImpl.java @@ -0,0 +1,25 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.EndEventData; +import org.camunda.community.migration.processInstance.api.model.data.EndEventData.EndEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.EndEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class EndEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl + implements EndEventDataBuilder { + @Override + protected EndEventDataImpl createData() { + return new EndEventDataImpl(); + } + + @Override + protected EndEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EventBasedGatewayDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EventBasedGatewayDataBuilderImpl.java new file mode 100644 index 000000000..4cd52ff40 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/EventBasedGatewayDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.EventBasedGatewayData; +import org.camunda.community.migration.processInstance.api.model.data.EventBasedGatewayData.EventBasedGatewayDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.EventBasedGatewayDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class EventBasedGatewayDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + EventBasedGatewayDataBuilder, EventBasedGatewayData, EventBasedGatewayDataImpl> + implements EventBasedGatewayDataBuilder { + @Override + protected EventBasedGatewayDataImpl createData() { + return new EventBasedGatewayDataImpl(); + } + + @Override + protected EventBasedGatewayDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ExclusiveGatewayDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ExclusiveGatewayDataBuilderImpl.java index fd3aa1bab..9e75f8d65 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ExclusiveGatewayDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ExclusiveGatewayDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.ExclusiveGatewayData; import org.camunda.community.migration.processInstance.api.model.data.ExclusiveGatewayData.ExclusiveGatewayDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ExclusiveGatewayDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ExclusiveGatewayDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< ExclusiveGatewayDataBuilder, ExclusiveGatewayData, ExclusiveGatewayDataImpl> implements ExclusiveGatewayDataBuilder { @Override @@ -20,7 +20,7 @@ protected ExclusiveGatewayDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/InclusiveGatewayDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/InclusiveGatewayDataBuilderImpl.java new file mode 100644 index 000000000..b10c79b5d --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/InclusiveGatewayDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.InclusiveGatewayData; +import org.camunda.community.migration.processInstance.api.model.data.InclusiveGatewayData.InclusiveGatewayDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.InclusiveGatewayDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class InclusiveGatewayDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + InclusiveGatewayDataBuilder, InclusiveGatewayData, InclusiveGatewayDataImpl> + implements InclusiveGatewayDataBuilder { + @Override + protected InclusiveGatewayDataImpl createData() { + return new InclusiveGatewayDataImpl(); + } + + @Override + protected InclusiveGatewayDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/IntermediateThrowEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/IntermediateThrowEventDataBuilderImpl.java new file mode 100644 index 000000000..e442c2f15 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/IntermediateThrowEventDataBuilderImpl.java @@ -0,0 +1,28 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.IntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.IntermediateThrowEventData.IntermediateThrowEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.IntermediateThrowEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class IntermediateThrowEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + IntermediateThrowEventDataBuilder, + IntermediateThrowEventData, + IntermediateThrowEventDataImpl> + implements IntermediateThrowEventDataBuilder { + @Override + protected IntermediateThrowEventDataImpl createData() { + return new IntermediateThrowEventDataImpl(); + } + + @Override + protected IntermediateThrowEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ManualTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ManualTaskDataBuilderImpl.java index 8cabcd271..159a7eaf5 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ManualTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ManualTaskDataBuilderImpl.java @@ -3,10 +3,11 @@ import org.camunda.community.migration.processInstance.api.model.data.ManualTaskData; import org.camunda.community.migration.processInstance.api.model.data.ManualTaskData.ManualTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ManualTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ManualTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + ManualTaskDataBuilder, ManualTaskData, ManualTaskDataImpl> implements ManualTaskDataBuilder { @Override protected ManualTaskDataBuilder builder() { @@ -14,7 +15,7 @@ protected ManualTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageBoundaryEventBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageBoundaryEventBuilderImpl.java new file mode 100644 index 000000000..cc1b99aae --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageBoundaryEventBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.MessageBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageBoundaryEventData.MessageBoundaryEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageBoundaryEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageBoundaryEventBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + MessageBoundaryEventDataBuilder, MessageBoundaryEventData, MessageBoundaryEventDataImpl> + implements MessageBoundaryEventDataBuilder { + @Override + protected MessageBoundaryEventDataImpl createData() { + return new MessageBoundaryEventDataImpl(); + } + + @Override + protected MessageBoundaryEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageEndEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageEndEventDataBuilderImpl.java new file mode 100644 index 000000000..d92ebdbbc --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageEndEventDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.MessageEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageEndEventData.MessageEndEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageEndEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageEndEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + MessageEndEventDataBuilder, MessageEndEventData, MessageEndEventDataImpl> + implements MessageEndEventDataBuilder { + @Override + protected MessageEndEventDataImpl createData() { + return new MessageEndEventDataImpl(); + } + + @Override + protected MessageEndEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateCatchEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateCatchEventDataBuilderImpl.java index 2e11e5fa4..dba1fce6c 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateCatchEventDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateCatchEventDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateCatchEventData; import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateCatchEventData.MessageIntermediateCatchEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.MessageIntermediateCatchEventDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class MessageIntermediateCatchEventDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< MessageIntermediateCatchEventDataBuilder, MessageIntermediateCatchEventData, MessageIntermediateCatchEventDataImpl> @@ -22,7 +22,7 @@ protected MessageIntermediateCatchEventDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateThrowEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateThrowEventDataBuilderImpl.java new file mode 100644 index 000000000..0e6a6a52d --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageIntermediateThrowEventDataBuilderImpl.java @@ -0,0 +1,28 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageIntermediateThrowEventData.MessageIntermediateThrowEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageIntermediateThrowEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageIntermediateThrowEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + MessageIntermediateThrowEventDataBuilder, + MessageIntermediateThrowEventData, + MessageIntermediateThrowEventDataImpl> + implements MessageIntermediateThrowEventDataBuilder { + @Override + protected MessageIntermediateThrowEventDataImpl createData() { + return new MessageIntermediateThrowEventDataImpl(); + } + + @Override + protected MessageIntermediateThrowEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageStartEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageStartEventDataBuilderImpl.java new file mode 100644 index 000000000..4ff904bb0 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MessageStartEventDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.MessageStartEventData; +import org.camunda.community.migration.processInstance.api.model.data.MessageStartEventData.MessageStartEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.MessageStartEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class MessageStartEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + MessageStartEventDataBuilder, MessageStartEventData, MessageStartEventDataImpl> + implements MessageStartEventDataBuilder { + @Override + protected MessageStartEventDataImpl createData() { + return new MessageStartEventDataImpl(); + } + + @Override + protected MessageStartEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiExecutionDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiExecutionDataBuilderImpl.java new file mode 100644 index 000000000..46411daf0 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiExecutionDataBuilderImpl.java @@ -0,0 +1,36 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import static org.camunda.community.migration.processInstance.api.model.data.impl.builder.BuilderUtil.*; + +import java.util.List; +import org.camunda.community.migration.processInstance.api.model.data.MultiExecutionData; +import org.camunda.community.migration.processInstance.api.model.data.MultiExecutionData.MultiExecutionDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.impl.MultiExecutionDataImpl; + +public class MultiExecutionDataBuilderImpl implements MultiExecutionDataBuilder { + private final MultiExecutionDataImpl data = new MultiExecutionDataImpl(); + + @Override + public MultiExecutionData build() { + return data; + } + + @Override + public MultiExecutionDataBuilder withName(String name) { + data.setName(name); + return this; + } + + @Override + public MultiExecutionDataBuilder withActivity(CommonActivityNodeData activity) { + addListEntry(data::getActivities, data::setActivities, activity); + return this; + } + + @Override + public MultiExecutionDataBuilder withActivities(List activities) { + activities.forEach(this::withActivity); + return this; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiInstanceDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiInstanceDataBuilderImpl.java index ebe084773..aa3b49381 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiInstanceDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/MultiInstanceDataBuilderImpl.java @@ -7,10 +7,10 @@ import org.camunda.community.migration.processInstance.api.model.data.MultiInstanceData.MultiInstanceDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; import org.camunda.community.migration.processInstance.api.model.data.impl.MultiInstanceDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class MultiInstanceDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< MultiInstanceDataBuilder, MultiInstanceData, MultiInstanceDataImpl> implements MultiInstanceDataBuilder { @Override @@ -20,7 +20,7 @@ public MultiInstanceDataBuilder withInstance(ActivityNodeData instance) { } @Override - public MultiInstanceDataBuilder withInstances(Iterable instances) { + public MultiInstanceDataBuilder withInstances(Iterable instances) { instances.forEach(this::withInstance); return this; } @@ -51,7 +51,7 @@ protected MultiInstanceDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ParallelGatewayDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ParallelGatewayDataBuilderImpl.java index 5c24ccffc..292fdb5b3 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ParallelGatewayDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ParallelGatewayDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.ParallelGatewayData; import org.camunda.community.migration.processInstance.api.model.data.ParallelGatewayData.ParallelGatewayDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ParallelGatewayDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ParallelGatewayDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< ParallelGatewayDataBuilder, ParallelGatewayData, ParallelGatewayDataImpl> implements ParallelGatewayDataBuilder { @Override @@ -20,7 +20,7 @@ protected ParallelGatewayDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ReceiveTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ReceiveTaskDataBuilderImpl.java index b6a8a7c1b..cd7025783 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ReceiveTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ReceiveTaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.ReceiveTaskData; import org.camunda.community.migration.processInstance.api.model.data.ReceiveTaskData.ReceiveTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ReceiveTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ReceiveTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< ReceiveTaskDataBuilder, ReceiveTaskData, ReceiveTaskDataImpl> implements ReceiveTaskDataBuilder { @Override @@ -15,7 +15,7 @@ protected ReceiveTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ScriptTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ScriptTaskDataBuilderImpl.java index 5655dfb4f..88562e270 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ScriptTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ScriptTaskDataBuilderImpl.java @@ -3,10 +3,11 @@ import org.camunda.community.migration.processInstance.api.model.data.ScriptTaskData; import org.camunda.community.migration.processInstance.api.model.data.ScriptTaskData.ScriptTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ScriptTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ScriptTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + ScriptTaskDataBuilder, ScriptTaskData, ScriptTaskDataImpl> implements ScriptTaskDataBuilder { @Override protected ScriptTaskDataBuilder builder() { @@ -14,7 +15,7 @@ protected ScriptTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SendTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SendTaskDataBuilderImpl.java index bdeb804d6..5ff177781 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SendTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SendTaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.SendTaskData; import org.camunda.community.migration.processInstance.api.model.data.SendTaskData.SendTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.SendTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class SendTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl implements SendTaskDataBuilder { @Override protected SendTaskDataBuilder builder() { @@ -14,7 +14,7 @@ protected SendTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ServiceTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ServiceTaskDataBuilderImpl.java index 327fcf5ac..ac3124cb1 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ServiceTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/ServiceTaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.ServiceTaskData; import org.camunda.community.migration.processInstance.api.model.data.ServiceTaskData.ServiceTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.ServiceTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class ServiceTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< ServiceTaskDataBuilder, ServiceTaskData, ServiceTaskDataImpl> implements ServiceTaskDataBuilder { @Override @@ -15,7 +15,7 @@ protected ServiceTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalBoundaryEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalBoundaryEventDataBuilderImpl.java new file mode 100644 index 000000000..252e4a5eb --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalBoundaryEventDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.SignalBoundaryEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalBoundaryEventData.SignalBoundaryEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalBoundaryEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalBoundaryEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SignalBoundaryEventDataBuilder, SignalBoundaryEventData, SignalBoundaryEventDataImpl> + implements SignalBoundaryEventDataBuilder { + @Override + protected SignalBoundaryEventDataImpl createData() { + return new SignalBoundaryEventDataImpl(); + } + + @Override + protected SignalBoundaryEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalEndEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalEndEventDataBuilderImpl.java new file mode 100644 index 000000000..e063e4a4c --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalEndEventDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.SignalEndEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalEndEventData.SignalEndEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalEndEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalEndEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SignalEndEventDataBuilder, SignalEndEventData, SignalEndEventDataImpl> + implements SignalEndEventDataBuilder { + @Override + protected SignalEndEventDataImpl createData() { + return new SignalEndEventDataImpl(); + } + + @Override + protected SignalEndEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateCatchEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateCatchEventDataBuilderImpl.java new file mode 100644 index 000000000..f2b50574f --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateCatchEventDataBuilderImpl.java @@ -0,0 +1,28 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateCatchEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateCatchEventData.SignalIntermediateCatchEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalIntermediateCatchEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalIntermediateCatchEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SignalIntermediateCatchEventDataBuilder, + SignalIntermediateCatchEventData, + SignalIntermediateCatchEventDataImpl> + implements SignalIntermediateCatchEventDataBuilder { + @Override + protected SignalIntermediateCatchEventDataImpl createData() { + return new SignalIntermediateCatchEventDataImpl(); + } + + @Override + protected SignalIntermediateCatchEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateThrowEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateThrowEventDataBuilderImpl.java new file mode 100644 index 000000000..c3810ed03 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalIntermediateThrowEventDataBuilderImpl.java @@ -0,0 +1,28 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateThrowEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalIntermediateThrowEventData.SignalIntermediateThrowEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalIntermediateThrowEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalIntermediateThrowEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SignalIntermediateThrowEventDataBuilder, + SignalIntermediateThrowEventData, + SignalIntermediateThrowEventDataImpl> + implements SignalIntermediateThrowEventDataBuilder { + @Override + protected SignalIntermediateThrowEventDataImpl createData() { + return new SignalIntermediateThrowEventDataImpl(); + } + + @Override + protected SignalIntermediateThrowEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalStartEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalStartEventDataBuilderImpl.java new file mode 100644 index 000000000..8d332b711 --- /dev/null +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SignalStartEventDataBuilderImpl.java @@ -0,0 +1,26 @@ +package org.camunda.community.migration.processInstance.api.model.data.impl.builder; + +import org.camunda.community.migration.processInstance.api.model.data.SignalStartEventData; +import org.camunda.community.migration.processInstance.api.model.data.SignalStartEventData.SignalStartEventDataBuilder; +import org.camunda.community.migration.processInstance.api.model.data.impl.SignalStartEventDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; + +public class SignalStartEventDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SignalStartEventDataBuilder, SignalStartEventData, SignalStartEventDataImpl> + implements SignalStartEventDataBuilder { + @Override + protected SignalStartEventDataImpl createData() { + return new SignalStartEventDataImpl(); + } + + @Override + protected SignalStartEventDataBuilder builder() { + return this; + } + + @Override + protected CommonActivityNodeDataImpl data() { + return data; + } +} diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/StartEventDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/StartEventDataBuilderImpl.java index 9f559c646..cb6eec542 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/StartEventDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/StartEventDataBuilderImpl.java @@ -3,10 +3,11 @@ import org.camunda.community.migration.processInstance.api.model.data.StartEventData; import org.camunda.community.migration.processInstance.api.model.data.StartEventData.StartEventDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.StartEventDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class StartEventDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + StartEventDataBuilder, StartEventData, StartEventDataImpl> implements StartEventDataBuilder { @Override protected StartEventDataImpl createData() { @@ -19,7 +20,7 @@ protected StartEventDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SubProcessDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SubProcessDataBuilderImpl.java index 60cf8167f..793012bbf 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SubProcessDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/SubProcessDataBuilderImpl.java @@ -5,10 +5,11 @@ import org.camunda.community.migration.processInstance.api.model.data.SubProcessData.SubProcessDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; import org.camunda.community.migration.processInstance.api.model.data.impl.SubProcessDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class SubProcessDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl< + SubProcessDataBuilder, SubProcessData, SubProcessDataImpl> implements SubProcessDataBuilder { @Override public SubProcessDataBuilder withActivity(String name, ActivityNodeData activity) { @@ -28,7 +29,7 @@ protected SubProcessDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TaskDataBuilderImpl.java index c9234089e..15bc1132a 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.TaskData; import org.camunda.community.migration.processInstance.api.model.data.TaskData.TaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.TaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class TaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl implements TaskDataBuilder { @Override @@ -20,7 +20,7 @@ protected TaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TransactionDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TransactionDataBuilderImpl.java index 7e11914be..3669cab2b 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TransactionDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/TransactionDataBuilderImpl.java @@ -7,10 +7,10 @@ import org.camunda.community.migration.processInstance.api.model.data.TransactionData.TransactionDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; import org.camunda.community.migration.processInstance.api.model.data.impl.TransactionDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class TransactionDataBuilderImpl - extends ActivityNodeDataBuilderImpl< + extends CommonActivityNodeDataBuilderImpl< TransactionDataBuilder, TransactionData, TransactionDataImpl> implements TransactionDataBuilder { @Override @@ -36,7 +36,7 @@ protected TransactionDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/UserTaskDataBuilderImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/UserTaskDataBuilderImpl.java index 367e434f8..5610ecea9 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/UserTaskDataBuilderImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/builder/UserTaskDataBuilderImpl.java @@ -3,10 +3,10 @@ import org.camunda.community.migration.processInstance.api.model.data.UserTaskData; import org.camunda.community.migration.processInstance.api.model.data.UserTaskData.UserTaskDataBuilder; import org.camunda.community.migration.processInstance.api.model.data.impl.UserTaskDataImpl; -import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.ActivityNodeDataImpl; +import org.camunda.community.migration.processInstance.api.model.data.impl.chunk.CommonActivityNodeDataImpl; public class UserTaskDataBuilderImpl - extends ActivityNodeDataBuilderImpl + extends CommonActivityNodeDataBuilderImpl implements UserTaskDataBuilder { @Override protected UserTaskDataImpl createData() { @@ -19,7 +19,7 @@ protected UserTaskDataBuilder builder() { } @Override - protected ActivityNodeDataImpl data() { + protected CommonActivityNodeDataImpl data() { return data; } } diff --git a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/ActivityNodeDataImpl.java b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/CommonActivityNodeDataImpl.java similarity index 67% rename from process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/ActivityNodeDataImpl.java rename to process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/CommonActivityNodeDataImpl.java index ae7774771..4fe2dc7cc 100644 --- a/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/ActivityNodeDataImpl.java +++ b/process-instance-migration/process-instance-migration-api/src/main/java/org/camunda/community/migration/processInstance/api/model/data/impl/chunk/CommonActivityNodeDataImpl.java @@ -3,9 +3,9 @@ import com.fasterxml.jackson.databind.JsonNode; import java.util.Map; import java.util.Objects; -import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; -public abstract class ActivityNodeDataImpl implements ActivityNodeData { +public abstract class CommonActivityNodeDataImpl implements CommonActivityNodeData { private String name; private Map variables; private Boolean executed; @@ -40,13 +40,15 @@ public void setExecuted(Boolean executed) { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || !getClass().isAssignableFrom(o.getClass())) return false; - ActivityNodeDataImpl that = (ActivityNodeDataImpl) o; - return Objects.equals(name, that.name) && Objects.equals(variables, that.variables); + if (o == null || getClass() != o.getClass()) return false; + CommonActivityNodeDataImpl that = (CommonActivityNodeDataImpl) o; + return Objects.equals(name, that.name) + && Objects.equals(variables, that.variables) + && Objects.equals(executed, that.executed); } @Override public int hashCode() { - return Objects.hash(name, variables); + return Objects.hash(name, variables, executed); } } diff --git a/process-instance-migration/process-instance-migration-api/src/test/java/org/camunda/community/migration/processInstance/api/model/data/ApiIntegrityTest.java b/process-instance-migration/process-instance-migration-api/src/test/java/org/camunda/community/migration/processInstance/api/model/data/ApiIntegrityTest.java index ca519a227..551da9c33 100644 --- a/process-instance-migration/process-instance-migration-api/src/test/java/org/camunda/community/migration/processInstance/api/model/data/ApiIntegrityTest.java +++ b/process-instance-migration/process-instance-migration-api/src/test/java/org/camunda/community/migration/processInstance/api/model/data/ApiIntegrityTest.java @@ -23,6 +23,7 @@ import org.assertj.core.data.MapEntry; import org.camunda.community.migration.processInstance.api.model.FinalBuildStep; import org.camunda.community.migration.processInstance.api.model.data.chunk.ActivityNodeData; +import org.camunda.community.migration.processInstance.api.model.data.chunk.CommonActivityNodeData; import org.junit.jupiter.api.DynamicContainer; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; @@ -165,6 +166,12 @@ private BuilderTestData findData(String methodName, List> parameterType d.expectedGetterValue = "foo"; d.builderArgs = new Object[] {"foo"}; }), + new ParameterTypeFilteringTestDataVisitor( + Collections.singletonList(Boolean.class), + d -> { + d.expectedGetterValue = true; + d.builderArgs = new Object[] {true}; + }), new MethodNameFilteringTestDataVisitor( "withInstances", d -> { @@ -186,6 +193,22 @@ private BuilderTestData findData(String methodName, List> parameterType d.expectedGetterValue = variables; d.builderArgs = new Object[] {variables}; }), + new MethodNameAndParameterTypeFilteringTestDataVisitor( + Collections.singletonList(List.class), + "withActivities", + d -> { + d.expectedGetterValue = Collections.singletonList(manualTaskData().build()); + d.builderArgs = + new Object[] {Collections.singletonList(manualTaskData().build())}; + }), + new MethodNameAndParameterTypeFilteringTestDataVisitor( + Collections.singletonList(CommonActivityNodeData.class), + "withActivity", + d -> { + ActivityNodeData taskData = manualTaskData().build(); + d.expectedGetterValue = Collections.singletonList(taskData); + d.builderArgs = new Object[] {taskData}; + }), new MethodNameFilteringTestDataVisitor( "withVariable", d -> { @@ -193,7 +216,8 @@ private BuilderTestData findData(String methodName, List> parameterType Collections.singletonMap("foo", text("bar")); d.builderArgs = new Object[] {"foo", text("bar")}; }), - new MethodNameFilteringTestDataVisitor( + new MethodNameAndParameterTypeFilteringTestDataVisitor( + Collections.singletonList(Map.class), "withActivities", d -> { Map activities = @@ -201,7 +225,8 @@ private BuilderTestData findData(String methodName, List> parameterType d.expectedGetterValue = activities; d.builderArgs = new Object[] {activities}; }), - new MethodNameFilteringTestDataVisitor( + new MethodNameAndParameterTypeFilteringTestDataVisitor( + Arrays.asList(String.class, ActivityNodeData.class), "withActivity", d -> { ActivityNodeData taskData = manualTaskData().build(); @@ -280,6 +305,28 @@ public void visit(BuilderTestData testData) { } } + private static class MethodNameAndParameterTypeFilteringTestDataVisitor + implements TestDataVisitor { + private final List> parameterTypes; + private final String methodName; + private final Consumer visitor; + + public MethodNameAndParameterTypeFilteringTestDataVisitor( + List> parameterTypes, String methodName, Consumer visitor) { + this.parameterTypes = parameterTypes; + this.methodName = methodName; + this.visitor = visitor; + } + + @Override + public void visit(BuilderTestData testData) { + if (testData.parameterTypes.equals(parameterTypes) + && testData.methodName.equals(methodName)) { + visitor.accept(testData); + } + } + } + private static class BuilderTestData { private String methodName; private List> parameterTypes;