Skip to content

Commit

Permalink
Merge pull request #44 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch (OSL 1.35 cut-off)
  • Loading branch information
rgdoliveira authored Nov 7, 2024
2 parents 3ec8627 + ebb5fcc commit 0f7a410
Show file tree
Hide file tree
Showing 72 changed files with 1,231 additions and 1,129 deletions.
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
package org.kie.kogito.app.audit.json;

import org.kie.kogito.event.job.JobInstanceDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import io.cloudevents.jackson.JsonFormat;

Expand All @@ -41,15 +38,7 @@ public static ObjectMapper getObjectMapper() {
}

public static ObjectMapper configure(ObjectMapper objectMapper) {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.registerModule(JsonFormat.getCloudEventJacksonModule());
objectMapper.registerModule(new JavaTimeModule());

SimpleModule module = new SimpleModule("Kogito Cloud Events");
module.addDeserializer(ProcessInstanceDataEvent.class, new JsonProcessInstanceDataEventDeserializer());
module.addDeserializer(UserTaskInstanceDataEvent.class, new JsonUserTaskInstanceDataEventDeserializer());
module.addDeserializer(JobInstanceDataEvent.class, new JsonJobDataEventDeserializer());
objectMapper.registerModule(module);
return objectMapper;
return objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false).registerModule(JsonFormat.getCloudEventJacksonModule())
.registerModule(new SimpleModule("Data Audit").addDeserializer(JobInstanceDataEvent.class, new JsonJobDataEventDeserializer())).findAndRegisterModules();
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@
*/
package org.kie.kogito.index.json;

import org.kie.kogito.event.process.ProcessInstanceDataEvent;
import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.jackson.utils.JsonObjectUtils;
import org.kie.kogito.jackson.utils.MergeUtils;
import org.kie.kogito.jackson.utils.ObjectMapperFactory;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import io.cloudevents.jackson.JsonFormat;

Expand All @@ -44,15 +40,7 @@ public static ObjectMapper getObjectMapper() {
}

public static ObjectMapper configure(ObjectMapper objectMapper) {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.registerModule(JsonFormat.getCloudEventJacksonModule());
objectMapper.registerModule(new JavaTimeModule());

SimpleModule module = new SimpleModule("Kogito Cloud Events");
module.addDeserializer(ProcessInstanceDataEvent.class, new JsonProcessInstanceDataEventDeserializer());
module.addDeserializer(UserTaskInstanceDataEvent.class, new JsonUserTaskInstanceDataEventDeserializer());
objectMapper.registerModule(module);
return objectMapper;
return objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false).registerModule(JsonFormat.getCloudEventJacksonModule()).findAndRegisterModules();
}

public static ObjectNode mergeVariable(String variableName, Object variableValue, ObjectNode variables) {
Expand Down
Loading

0 comments on commit 0f7a410

Please sign in to comment.