diff --git a/data-audit/README.md b/data-audit/README.md
index 68eb515f86..e567bba444 100644
--- a/data-audit/README.md
+++ b/data-audit/README.md
@@ -56,26 +56,29 @@ org.kie.kogito.app.audit.spi.GraphQLSchemaQueryProvider: this allow the subsyste
You need to add two different dependencies to your project.
-
- org.kie.kogito
- kogito-addons-data-audit-
- ${version}
-
-
- org.kie.kogito
- kogito-addons-data-audit-jpa-
- ${version}
-
-
+
+ org.kie.kogito
+ kogito-addons-data-audit-
+ ${version}
+
+
+ org.kie.kogito
+ kogito-addons-data-audit-jpa-
+ ${version}
+
+
+
+
+
The first dependency is related how to you want to deploy it. In this case as collocated/embedded service
The second dependency is which implementation you want to use.
Each implementation might require additional dependencies. In our case for using JPA implementation we might require driver
-
- io.quarkus
- quarkus-jdbc-h2
-
+
+ io.quarkus
+ quarkus-jdbc-h2
+
No additional configuration is requires besides the default datasource use by the application already.
diff --git a/data-audit/data-audit-common/src/main/java/org/kie/kogito/app/audit/graphql/type/UserTaskInstanceStateTO.java b/data-audit/data-audit-common/src/main/java/org/kie/kogito/app/audit/graphql/type/UserTaskInstanceStateTO.java
index dd5ed99913..67e88d46f2 100644
--- a/data-audit/data-audit-common/src/main/java/org/kie/kogito/app/audit/graphql/type/UserTaskInstanceStateTO.java
+++ b/data-audit/data-audit-common/src/main/java/org/kie/kogito/app/audit/graphql/type/UserTaskInstanceStateTO.java
@@ -37,8 +37,6 @@ public class UserTaskInstanceStateTO {
private String businessKey;
- private String taskId;
-
private String name;
private String description;
@@ -47,27 +45,20 @@ public class UserTaskInstanceStateTO {
private String state;
- private String nodeDefitionId;
-
- private String nodeInstanceId;
-
private String eventType;
public UserTaskInstanceStateTO(String eventId, Date eventDate, String userTaskDefinitionId, String userTaskInstanceId, String processInstanceId, String businessKey,
- String taskId, String name, String description, String actualUser, String state, String nodeDefitionId, String nodeInstanceId, String eventType) {
+ String name, String description, String actualUser, String state, String eventType) {
this.eventId = eventId;
this.eventDate = OffsetDateTime.ofInstant(eventDate.toInstant(), ZoneId.of("UTC"));
this.userTaskDefinitionId = userTaskDefinitionId;
this.userTaskInstanceId = userTaskInstanceId;
this.processInstanceId = processInstanceId;
this.businessKey = businessKey;
- this.taskId = taskId;
this.name = name;
this.description = description;
this.actualUser = actualUser;
this.state = state;
- this.nodeDefitionId = nodeDefitionId;
- this.nodeInstanceId = nodeInstanceId;
this.eventType = eventType;
}
@@ -119,14 +110,6 @@ public void setBusinessKey(String businessKey) {
this.businessKey = businessKey;
}
- public String getTaskId() {
- return taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
public String getName() {
return name;
}
@@ -159,14 +142,6 @@ public void setState(String state) {
this.state = state;
}
- public String getNodeInstanceId() {
- return nodeInstanceId;
- }
-
- public void setNodeInstanceId(String nodeInstanceId) {
- this.nodeInstanceId = nodeInstanceId;
- }
-
public String getEventType() {
return eventType;
}
@@ -175,12 +150,4 @@ public void setEventType(String eventType) {
this.eventType = eventType;
}
- public String getNodeDefitionId() {
- return nodeDefitionId;
- }
-
- public void setNodeDefitionId(String nodeDefitionId) {
- this.nodeDefitionId = nodeDefitionId;
- }
-
}
diff --git a/data-audit/data-audit-common/src/main/resources/META-INF/data-audit-types.graphqls b/data-audit/data-audit-common/src/main/resources/META-INF/data-audit-types.graphqls
index 9200508f5d..842fd11ab0 100644
--- a/data-audit/data-audit-common/src/main/resources/META-INF/data-audit-types.graphqls
+++ b/data-audit/data-audit-common/src/main/resources/META-INF/data-audit-types.graphqls
@@ -40,8 +40,8 @@ type ProcessInstanceStateLog {
type ProcessInstanceNodeLog {
eventId : String!
eventDate : DateTime
- processType : String
- processId : String
+ processType : String
+ sprocessId : String
processVersion : String
parentProcessInstanceId : String
rootProcessId : String
@@ -102,13 +102,10 @@ type UserTaskInstanceStateLog {
userTaskInstanceId : String
processInstanceId : String
businessKey : String
- taskId : String
name : String
description : String
actualUser : String
state : String
- nodeDefitionId : String
- nodeInstanceId : String
eventType : String
}
diff --git a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/JPADataAuditStore.java b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/JPADataAuditStore.java
index fbf6389a67..1da85e5c07 100644
--- a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/JPADataAuditStore.java
+++ b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/JPADataAuditStore.java
@@ -181,7 +181,7 @@ public void storeProcessInstanceDataEvent(DataAuditContext context, ProcessInsta
ProcessInstanceStateLog log = new ProcessInstanceStateLog();
setProcessCommonAttributes(log, event);
log.setEventType(ProcessStateLogType.SLA_VIOLATION);
-
+ log.setSlaDueDate(event.getData().getSlaDueDate());
entityManager.persist(log);
} else {
ProcessInstanceNodeLog log = new ProcessInstanceNodeLog();
@@ -191,6 +191,7 @@ public void storeProcessInstanceDataEvent(DataAuditContext context, ProcessInsta
log.setNodeName(event.getData().getNodeName());
log.setNodeType(event.getData().getNodeType());
log.setEventType(NodeLogType.SLA_VIOLATION);
+ log.setSlaDueDate(event.getData().getSlaDueDate());
entityManager.persist(log);
}
}
diff --git a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/data-audit-orm.xml b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/data-audit-orm.xml
index 932997dc8d..1d30aa1b01 100644
--- a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/data-audit-orm.xml
+++ b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/data-audit-orm.xml
@@ -545,13 +545,10 @@
log.user_task_instance_id,
log.process_instance_id,
log.business_key,
- log.task_id,
log.name,
log.description,
log.actual_user,
log.state,
- log.node_definition_id,
- log.node_instance_id,
log.event_type
FROM Task_Instance_State_Log log
LEFT JOIN Task_Instance_State_Log log_newer ON log.user_task_instance_id = log_newer.user_task_instance_id
diff --git a/data-audit/kogito-addons-data-audit-quarkus/src/test/java/org/kie/kogito/app/audit/quarkus/QuarkusAuditUserTaskInstanceServiceTest.java b/data-audit/kogito-addons-data-audit-quarkus/src/test/java/org/kie/kogito/app/audit/quarkus/QuarkusAuditUserTaskInstanceServiceTest.java
index 0e6549ab18..e89087d241 100644
--- a/data-audit/kogito-addons-data-audit-quarkus/src/test/java/org/kie/kogito/app/audit/quarkus/QuarkusAuditUserTaskInstanceServiceTest.java
+++ b/data-audit/kogito-addons-data-audit-quarkus/src/test/java/org/kie/kogito/app/audit/quarkus/QuarkusAuditUserTaskInstanceServiceTest.java
@@ -132,7 +132,7 @@ public void init() {
public void testGetAllUserTaskInstanceState() {
String query =
- "{ GetAllUserTaskInstanceState { eventId, eventDate, userTaskDefinitionId, userTaskInstanceId, processInstanceId, businessKey, taskId, name, description, actualUser, state, nodeDefitionId, nodeInstanceId, eventType } }";
+ "{ GetAllUserTaskInstanceState { eventId, eventDate, userTaskDefinitionId, userTaskInstanceId, processInstanceId, businessKey, name, description, actualUser, state, eventType } }";
query = wrapQuery(query);
List