diff --git a/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonProcessInstanceDataEventDeserializer.java b/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonProcessInstanceDataEventDeserializer.java index fe033930ff..de164e6ff3 100644 --- a/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonProcessInstanceDataEventDeserializer.java +++ b/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonProcessInstanceDataEventDeserializer.java @@ -58,7 +58,7 @@ public ProcessInstanceDataEvent deserialize(JsonParser jp, DeserializationCon String type = node.get("type").asText(); switch (type) { - case "MultipleProcessInstanceDataEvent": + case MultipleProcessInstanceDataEvent.TYPE: return jp.getCodec().treeToValue(node, MultipleProcessInstanceDataEvent.class); case "ProcessInstanceErrorDataEvent": return (ProcessInstanceDataEvent) jp.getCodec().treeToValue(node, ProcessInstanceErrorDataEvent.class); diff --git a/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonUserTaskInstanceDataEventDeserializer.java b/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonUserTaskInstanceDataEventDeserializer.java index 75c6ba0ed0..32e53e4f98 100644 --- a/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonUserTaskInstanceDataEventDeserializer.java +++ b/data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonUserTaskInstanceDataEventDeserializer.java @@ -59,7 +59,7 @@ public UserTaskInstanceDataEvent deserialize(JsonParser jp, DeserializationCo String type = node.get("type").asText(); switch (type) { - case "MultipleUserTaskInstanceDataEvent": + case MultipleUserTaskInstanceDataEvent.TYPE: return jp.getCodec().treeToValue(node, MultipleUserTaskInstanceDataEvent.class); case "UserTaskInstanceAssignmentDataEvent": return (UserTaskInstanceDataEvent) jp.getCodec().treeToValue(node, UserTaskInstanceAssignmentDataEvent.class); diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java index 9fec2e2ca9..261bcc4084 100644 --- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java +++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java @@ -58,7 +58,7 @@ public ProcessInstanceDataEvent deserialize(JsonParser jp, DeserializationCon String type = node.get("type").asText(); switch (type) { - case "MultipleProcessInstanceDataEvent": + case MultipleProcessInstanceDataEvent.TYPE: return jp.getCodec().treeToValue(node, MultipleProcessInstanceDataEvent.class); case "ProcessInstanceErrorDataEvent": return (ProcessInstanceDataEvent) jp.getCodec().treeToValue(node, ProcessInstanceErrorDataEvent.class); diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java index 5c340a9873..3a515a5e8b 100644 --- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java +++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java @@ -59,7 +59,7 @@ public UserTaskInstanceDataEvent deserialize(JsonParser jp, DeserializationCo String type = node.get("type").asText(); switch (type) { - case "MultipleUserTaskInstanceDataEvent": + case MultipleUserTaskInstanceDataEvent.TYPE: return jp.getCodec().treeToValue(node, MultipleUserTaskInstanceDataEvent.class); case "UserTaskInstanceAssignmentDataEvent": return (UserTaskInstanceDataEvent) jp.getCodec().treeToValue(node, UserTaskInstanceAssignmentDataEvent.class); diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java index 430ecee796..381aa5e8d7 100644 --- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java +++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java @@ -25,6 +25,7 @@ import org.eclipse.microprofile.reactive.messaging.Message; import org.kie.kogito.event.AbstractDataEvent; import org.kie.kogito.event.DataEvent; +import org.kie.kogito.event.process.MultipleProcessInstanceDataEvent; import org.kie.kogito.event.process.ProcessDefinitionDataEvent; import org.kie.kogito.event.process.ProcessDefinitionEventBody; import org.kie.kogito.event.process.ProcessInstanceDataEvent; @@ -38,6 +39,7 @@ import org.kie.kogito.event.process.ProcessInstanceStateEventBody; import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent; import org.kie.kogito.event.process.ProcessInstanceVariableEventBody; +import org.kie.kogito.event.usertask.MultipleUserTaskInstanceDataEvent; import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentDataEvent; import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentEventBody; import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent; @@ -139,6 +141,8 @@ public void setObjectMapper(ObjectMapper objectMapper) { private DataEvent buildProcessInstanceDataEventVariant(CloudEvent cloudEvent) throws IOException { switch (cloudEvent.getType()) { + case MultipleProcessInstanceDataEvent.TYPE: + return objectMapper.convertValue(cloudEvent, MultipleProcessInstanceDataEvent.class); case "ProcessInstanceErrorDataEvent": return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceErrorDataEvent::new, ProcessInstanceErrorEventBody.class); case "ProcessInstanceNodeDataEvent": @@ -156,6 +160,8 @@ private DataEvent buildProcessInstanceDataEventVariant(CloudEvent cloudEvent) private DataEvent buildUserTaskInstanceDataEvent(CloudEvent cloudEvent) throws IOException { switch (cloudEvent.getType()) { + case MultipleUserTaskInstanceDataEvent.TYPE: + return objectMapper.convertValue(cloudEvent, MultipleUserTaskInstanceDataEvent.class); case "UserTaskInstanceAssignmentDataEvent": return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceAssignmentDataEvent::new, UserTaskInstanceAssignmentEventBody.class); case "UserTaskInstanceAttachmentDataEvent":