This is an automated email from the ASF dual-hosted git repository.
pefernan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new 324d0f981 [incubator-kie-issues#2009] Process Instance in `error`
state after completing user task has wrong `nodeInstanceIdInError`. (#2239)
324d0f981 is described below
commit 324d0f981a4363c722e3c14183fcf2ed69b163dd
Author: Pere Fernández <[email protected]>
AuthorDate: Fri Jul 4 13:10:48 2025 +0200
[incubator-kie-issues#2009] Process Instance in `error` state after
completing user task has wrong `nodeInstanceIdInError`. (#2239)
- adding missing retrigger event type to ProcessInstanceStateLog
---
.../kie/kogito/app/audit/jpa/JPADataAuditStore.java | 1 +
.../audit/jpa/model/ProcessInstanceStateLog.java | 1 +
..._instance_state_retriggered_event_type_check.sql | 21 +++++++++++++++++++++
..._instance_state_retriggered_event_type_check.sql | 21 +++++++++++++++++++++
4 files changed, 44 insertions(+)
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 505dcdce8..dd58b192f 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
@@ -109,6 +109,7 @@ public class JPADataAuditStore implements DataAuditStore {
case ProcessInstanceStateEventBody.EVENT_TYPE_ENDED ->
ProcessStateLogType.COMPLETED;
case ProcessInstanceStateEventBody.EVENT_TYPE_MIGRATED ->
ProcessStateLogType.MIGRATED;
case ProcessInstanceStateEventBody.EVENT_TYPE_UPDATED ->
ProcessStateLogType.STATE_UPDATED;
+ case ProcessInstanceStateEventBody.EVENT_TYPE_RETRIGGERED ->
ProcessStateLogType.RETRIGGERED;
default -> throw new IllegalArgumentException("Unknown
ProcessInstanceStateDataEvent type " + event.getData().getEventType());
};
}
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/model/ProcessInstanceStateLog.java
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/model/ProcessInstanceStateLog.java
index 18a6e55f8..b18a7d656 100644
---
a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/model/ProcessInstanceStateLog.java
+++
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/model/ProcessInstanceStateLog.java
@@ -56,6 +56,7 @@ public class ProcessInstanceStateLog extends
AbstractProcessInstanceLog {
MIGRATED,
SLA_VIOLATION,
STATE_UPDATED,
+ RETRIGGERED,
}
@Id
diff --git
a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/h2/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/h2/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
new file mode 100644
index 000000000..dda78a1c4
--- /dev/null
+++
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/h2/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table Process_Instance_State_Log drop constraint
Process_Instance_State_Log_event_type_check;
+alter table Process_Instance_State_Log add constraint
Process_Instance_State_Log_event_type_check CHECK (event_type IN
('ACTIVE','COMPLETED','SLA_VIOLATION','MIGRATED','STATE_UPDATED','RETRIGGERED'));
\ No newline at end of file
diff --git
a/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/postgresql/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/postgresql/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
new file mode 100644
index 000000000..9ea456b9a
--- /dev/null
+++
b/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/postgresql/V1.4.3__Add_process_instance_state_retriggered_event_type_check.sql
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table Process_Instance_State_Log drop constraint
Process_Instance_State_Log_event_type_check;
+alter table Process_Instance_State_Log add constraint
Process_Instance_State_Log_event_type_check check (event_type in
('ACTIVE','COMPLETED','SLA_VIOLATION','MIGRATED','STATE_UPDATED','RETRIGGERED'));
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]