This is an automated email from the ASF dual-hosted git repository.
djoseph 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 2afefc97b [incubator-kie-issues#2255] Sync service task not setting
process to ERROR state (#2305)
2afefc97b is described below
commit 2afefc97b5ee79b40bce6d2b77d1bd6874677a86
Author: Deepak Joseph <[email protected]>
AuthorDate: Tue Mar 10 13:37:13 2026 +0530
[incubator-kie-issues#2255] Sync service task not setting process to ERROR
state (#2305)
* sync service task fix
* update
* int tests
* license headers
* fixed it tests
---
.../integration-tests-jobs/pom.xml | 157 +++++++++++++
.../main/java/org/kie/kogito/FailingService.java | 30 +++
.../main/resources/FailingAsyncServiceTask.bpmn2 | 255 +++++++++++++++++++++
.../main/resources/FailingSyncServiceTask.bpmn2 | 252 ++++++++++++++++++++
.../src/main/resources/application.properties | 38 +++
.../org/kie/kogito/FailingAsyncServiceTaskIT.java | 149 ++++++++++++
.../org/kie/kogito/FailingServiceTestUtil.java | 70 ++++++
.../org/kie/kogito/FailingSyncServiceTaskIT.java | 148 ++++++++++++
apps-integration-tests/pom.xml | 1 +
.../ErrorHandlingJobTimeoutInterceptor.java | 5 +-
10 files changed, 1103 insertions(+), 2 deletions(-)
diff --git a/apps-integration-tests/integration-tests-jobs/pom.xml
b/apps-integration-tests/integration-tests-jobs/pom.xml
new file mode 100644
index 000000000..ef0ebd176
--- /dev/null
+++ b/apps-integration-tests/integration-tests-jobs/pom.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>apps-integration-tests</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>integration-tests-jobs</artifactId>
+
+ <name>Kogito Apps :: Integration Tests :: Jobs</name>
+ <description>Integration tests for Embedded Jobs</description>
+
+ <dependencies>
+ <!-- Ensure data-index and jobs module was built, but not added in the
classpath -->
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>jobs</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-with-drools-quarkus</artifactId>
+ </dependency>
+ <!-- Persistence -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <!-- Jobs Service with JPA -->
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-embedded-jobs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-embedded-jobs-jpa</artifactId>
+ </dependency>
+ <!-- Data Index with JPA -->
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <configuration>
+ <skipOriginalJarRename>true</skipOriginalJarRename>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/apps-integration-tests/integration-tests-jobs/src/main/java/org/kie/kogito/FailingService.java
b/apps-integration-tests/integration-tests-jobs/src/main/java/org/kie/kogito/FailingService.java
new file mode 100644
index 000000000..6c18f7af0
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/main/java/org/kie/kogito/FailingService.java
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.kie.kogito;
+
+import jakarta.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+public class FailingService {
+
+ public void fail() {
+ System.out.println("FailingService.fail() called - throwing
RuntimeException");
+ throw new RuntimeException("Failed Service Task!!!");
+ }
+}
diff --git
a/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingAsyncServiceTask.bpmn2
b/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingAsyncServiceTask.bpmn2
new file mode 100644
index 000000000..95f632771
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingAsyncServiceTask.bpmn2
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+-->
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" id="_9LPSYf3JED6fs7MmJp2RPQ"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www. [...]
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_PriorityInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_CommentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_DescriptionInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_CreatedByInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_GroupIdInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_ContentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotStartedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotCompletedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotStartedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotCompletedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessageType" structureRef=""/>
+ <bpmn2:itemDefinition
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessageType" structureRef=""/>
+ <bpmn2:message id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessage"
itemRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessageType"/>
+ <bpmn2:message id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessage"
itemRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessageType"/>
+ <bpmn2:interface id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceInterface"
name="org.kie.kogito.FailingService"
implementationRef="org.kie.kogito.FailingService">
+ <bpmn2:operation
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceOperation" name="fail"
implementationRef="fail">
+
<bpmn2:inMessageRef>_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessage</bpmn2:inMessageRef>
+
<bpmn2:outMessageRef>_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessage</bpmn2:outMessageRef>
+ </bpmn2:operation>
+ </bpmn2:interface>
+ <bpmn2:collaboration id="_FD66B22A-BE2E-4006-AE07-E0E5D4403FF2"
name="Default Collaboration">
+ <bpmn2:participant id="_00E14F0C-472F-4DBE-B4E1-2BFDA3B1FA72" name="Pool
Participant" processRef="FailingAsyncServiceTask"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="FailingAsyncServiceTask" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="FailingAsyncServiceTask"
isExecutable="true" processType="Public">
+ <bpmn2:sequenceFlow id="_039B7A29-CE0D-4005-BF21-8A9DFF314E8A"
sourceRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D"
targetRef="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_07F44C66-4DC9-4AC2-A602-8F55F844552F"
sourceRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1"
targetRef="_98C40A0D-04B1-4456-8D80-64DF4671BEF7"/>
+ <bpmn2:sequenceFlow id="_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D"
sourceRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D"
targetRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1"/>
+ <bpmn2:sequenceFlow id="_B8E3DEBF-5404-411A-A162-D491F4665110"
sourceRef="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A"
targetRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D"/>
+ <bpmn2:sequenceFlow id="_7F20517C-28E8-46CE-9B44-E8A92AE86F46"
sourceRef="_12026FED-3D13-4409-9397-6F84D9323F3D"
targetRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D"/>
+ <bpmn2:endEvent id="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <bpmn2:incoming>_039B7A29-CE0D-4005-BF21-8A9DFF314E8A</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:serviceTask id="_C02E8C5F-5134-47A5-9784-45821DB66B5D"
drools:serviceimplementation="Java"
drools:serviceinterface="org.kie.kogito.FailingService"
drools:serviceoperation="fail" name="Service Task" implementation="Java"
operationRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceOperation">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Service Task]]></drools:metaValue>
+ </drools:metaData>
+ <drools:metaData name="customAsync">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_7F20517C-28E8-46CE-9B44-E8A92AE86F46</bpmn2:incoming>
+ <bpmn2:outgoing>_039B7A29-CE0D-4005-BF21-8A9DFF314E8A</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:endEvent id="_98C40A0D-04B1-4456-8D80-64DF4671BEF7">
+ <bpmn2:incoming>_07F44C66-4DC9-4AC2-A602-8F55F844552F</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:userTask id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1" name="User
Task">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[User Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D</bpmn2:incoming>
+ <bpmn2:outgoing>_07F44C66-4DC9-4AC2-A602-8F55F844552F</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX" drools:dtype="Object"
itemSubjectRef="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputXItem"
name="TaskName"/>
+ <bpmn2:dataInput
id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX"
drools:dtype="Object"
itemSubjectRef="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputXItem"
name="Skippable"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[Task]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:potentialOwner id="_9LS8wP3JED6fs7MmJp2RPQ">
+ <bpmn2:resourceAssignmentExpression id="_9LS8wf3JED6fs7MmJp2RPQ">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:scriptTask id="_F2534445-E1CB-494C-85CD-DEAB2BB9852D" name="Script
Task" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Script Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_B8E3DEBF-5404-411A-A162-D491F4665110</bpmn2:incoming>
+ <bpmn2:outgoing>_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("This is Script Task");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <bpmn2:outgoing>_B8E3DEBF-5404-411A-A162-D491F4665110</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:boundaryEvent id="_12026FED-3D13-4409-9397-6F84D9323F3D"
drools:dockerinfo="48.0377358490566^74|" drools:boundaryca="true"
attachedToRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <bpmn2:outgoing>_7F20517C-28E8-46CE-9B44-E8A92AE86F46</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration
xsi:type="bpmn2:tFormalExpression">PT2S</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="FailingAsyncServiceTask">
+ <bpmndi:BPMNShape id="shape__12026FED-3D13-4409-9397-6F84D9323F3D"
bpmnElement="_12026FED-3D13-4409-9397-6F84D9323F3D">
+ <dc:Bounds height="56" width="56" x="543.0377358490566" y="229"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A"
bpmnElement="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <dc:Bounds height="56" width="56" x="125" y="178"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D"
bpmnElement="_F2534445-E1CB-494C-85CD-DEAB2BB9852D">
+ <dc:Bounds height="102" width="154" x="261" y="155"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1"
bpmnElement="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <dc:Bounds height="102" width="154" x="495" y="155"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__98C40A0D-04B1-4456-8D80-64DF4671BEF7"
bpmnElement="_98C40A0D-04B1-4456-8D80-64DF4671BEF7">
+ <dc:Bounds height="56" width="56" x="729" y="178"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__C02E8C5F-5134-47A5-9784-45821DB66B5D"
bpmnElement="_C02E8C5F-5134-47A5-9784-45821DB66B5D">
+ <dc:Bounds height="102" width="154" x="494.0377358490566" y="359"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__05B85A9D-4A6F-4E21-8362-6EB555D91A1F"
bpmnElement="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <dc:Bounds height="56" width="56" x="729" y="382"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__12026FED-3D13-4409-9397-6F84D9323F3D_to_shape__C02E8C5F-5134-47A5-9784-45821DB66B5D"
bpmnElement="_7F20517C-28E8-46CE-9B44-E8A92AE86F46">
+ <di:waypoint x="571.0377358490566" y="257"/>
+ <di:waypoint x="571.0377358490566" y="410"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A_to_shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D"
bpmnElement="_B8E3DEBF-5404-411A-A162-D491F4665110">
+ <di:waypoint x="153" y="206"/>
+ <di:waypoint x="338" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D_to_shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1"
bpmnElement="_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D">
+ <di:waypoint x="338" y="206"/>
+ <di:waypoint x="572" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1_to_shape__98C40A0D-04B1-4456-8D80-64DF4671BEF7"
bpmnElement="_07F44C66-4DC9-4AC2-A602-8F55F844552F">
+ <di:waypoint x="572" y="206"/>
+ <di:waypoint x="757" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__C02E8C5F-5134-47A5-9784-45821DB66B5D_to_shape__05B85A9D-4A6F-4E21-8362-6EB555D91A1F"
bpmnElement="_039B7A29-CE0D-4005-BF21-8A9DFF314E8A">
+ <di:waypoint x="571.0377358490566" y="410"/>
+ <di:waypoint x="806" y="382"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_9LPSYf3JED6fs7MmJp2RPQ</bpmn2:source>
+ <bpmn2:target>_9LPSYf3JED6fs7MmJp2RPQ</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingSyncServiceTask.bpmn2
b/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingSyncServiceTask.bpmn2
new file mode 100644
index 000000000..28953f755
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/main/resources/FailingSyncServiceTask.bpmn2
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+-->
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" id="_2CgXoPx1ED6K-LBr7SyN5Q"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www. [...]
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_PriorityInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_CommentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_DescriptionInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_CreatedByInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_GroupIdInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_ContentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotStartedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotCompletedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotStartedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_NotCompletedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessageType" structureRef=""/>
+ <bpmn2:itemDefinition
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessageType" structureRef=""/>
+ <bpmn2:message id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessage"
itemRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessageType"/>
+ <bpmn2:message id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessage"
itemRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessageType"/>
+ <bpmn2:interface id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceInterface"
name="org.kie.kogito.FailingService"
implementationRef="org.kie.kogito.FailingService">
+ <bpmn2:operation
id="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceOperation" name="fail"
implementationRef="fail">
+
<bpmn2:inMessageRef>_C02E8C5F-5134-47A5-9784-45821DB66B5D_InMessage</bpmn2:inMessageRef>
+
<bpmn2:outMessageRef>_C02E8C5F-5134-47A5-9784-45821DB66B5D_OutMessage</bpmn2:outMessageRef>
+ </bpmn2:operation>
+ </bpmn2:interface>
+ <bpmn2:collaboration id="_FF02FE20-E553-49B4-9DE2-FA8BD0EF9CEF"
name="Default Collaboration">
+ <bpmn2:participant id="_15A5D729-0781-497C-8512-8E43531AB35B" name="Pool
Participant" processRef="FailingSyncServiceTask"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="FailingSyncServiceTask" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="FailingSyncServiceTask"
isExecutable="true" processType="Public">
+ <bpmn2:sequenceFlow id="_039B7A29-CE0D-4005-BF21-8A9DFF314E8A"
sourceRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D"
targetRef="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_07F44C66-4DC9-4AC2-A602-8F55F844552F"
sourceRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1"
targetRef="_98C40A0D-04B1-4456-8D80-64DF4671BEF7"/>
+ <bpmn2:sequenceFlow id="_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D"
sourceRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D"
targetRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1"/>
+ <bpmn2:sequenceFlow id="_B8E3DEBF-5404-411A-A162-D491F4665110"
sourceRef="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A"
targetRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D"/>
+ <bpmn2:sequenceFlow id="_7F20517C-28E8-46CE-9B44-E8A92AE86F46"
sourceRef="_12026FED-3D13-4409-9397-6F84D9323F3D"
targetRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D"/>
+ <bpmn2:endEvent id="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <bpmn2:incoming>_039B7A29-CE0D-4005-BF21-8A9DFF314E8A</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:serviceTask id="_C02E8C5F-5134-47A5-9784-45821DB66B5D"
drools:serviceimplementation="Java"
drools:serviceinterface="org.kie.kogito.FailingService"
drools:serviceoperation="fail" name="Service Task" implementation="Java"
operationRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D_ServiceOperation">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Service Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_7F20517C-28E8-46CE-9B44-E8A92AE86F46</bpmn2:incoming>
+ <bpmn2:outgoing>_039B7A29-CE0D-4005-BF21-8A9DFF314E8A</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:endEvent id="_98C40A0D-04B1-4456-8D80-64DF4671BEF7">
+ <bpmn2:incoming>_07F44C66-4DC9-4AC2-A602-8F55F844552F</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:userTask id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1" name="User
Task">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[User Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D</bpmn2:incoming>
+ <bpmn2:outgoing>_07F44C66-4DC9-4AC2-A602-8F55F844552F</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX" drools:dtype="Object"
itemSubjectRef="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputXItem"
name="TaskName"/>
+ <bpmn2:dataInput
id="_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX"
drools:dtype="Object"
itemSubjectRef="__E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputXItem"
name="Skippable"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[Task]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_E2424AB3-6F2A-4624-B451-C126EE9EABA1_TaskNameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_E2424AB3-6F2A-4624-B451-C126EE9EABA1_SkippableInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:potentialOwner id="_2ChlwPx1ED6K-LBr7SyN5Q">
+ <bpmn2:resourceAssignmentExpression id="_2CiM0Px1ED6K-LBr7SyN5Q">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:scriptTask id="_F2534445-E1CB-494C-85CD-DEAB2BB9852D" name="Script
Task" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Script Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_B8E3DEBF-5404-411A-A162-D491F4665110</bpmn2:incoming>
+ <bpmn2:outgoing>_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("This is Script Task");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <bpmn2:outgoing>_B8E3DEBF-5404-411A-A162-D491F4665110</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:boundaryEvent id="_12026FED-3D13-4409-9397-6F84D9323F3D"
drools:dockerinfo="48.0377358490566^74|" drools:boundaryca="true"
attachedToRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <bpmn2:outgoing>_7F20517C-28E8-46CE-9B44-E8A92AE86F46</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration
xsi:type="bpmn2:tFormalExpression">PT2S</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="FailingSyncServiceTask">
+ <bpmndi:BPMNShape id="shape__12026FED-3D13-4409-9397-6F84D9323F3D"
bpmnElement="_12026FED-3D13-4409-9397-6F84D9323F3D">
+ <dc:Bounds height="56" width="56" x="543.0377358490566" y="229"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A"
bpmnElement="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <dc:Bounds height="56" width="56" x="125" y="178"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D"
bpmnElement="_F2534445-E1CB-494C-85CD-DEAB2BB9852D">
+ <dc:Bounds height="102" width="154" x="261" y="155"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1"
bpmnElement="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <dc:Bounds height="102" width="154" x="495" y="155"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__98C40A0D-04B1-4456-8D80-64DF4671BEF7"
bpmnElement="_98C40A0D-04B1-4456-8D80-64DF4671BEF7">
+ <dc:Bounds height="56" width="56" x="729" y="178"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__C02E8C5F-5134-47A5-9784-45821DB66B5D"
bpmnElement="_C02E8C5F-5134-47A5-9784-45821DB66B5D">
+ <dc:Bounds height="102" width="154" x="494.0377358490566" y="359"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__05B85A9D-4A6F-4E21-8362-6EB555D91A1F"
bpmnElement="_05B85A9D-4A6F-4E21-8362-6EB555D91A1F">
+ <dc:Bounds height="56" width="56" x="729" y="382"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__12026FED-3D13-4409-9397-6F84D9323F3D_to_shape__C02E8C5F-5134-47A5-9784-45821DB66B5D"
bpmnElement="_7F20517C-28E8-46CE-9B44-E8A92AE86F46">
+ <di:waypoint x="571.0377358490566" y="257"/>
+ <di:waypoint x="571.0377358490566" y="410"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A_to_shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D"
bpmnElement="_B8E3DEBF-5404-411A-A162-D491F4665110">
+ <di:waypoint x="153" y="206"/>
+ <di:waypoint x="338" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__F2534445-E1CB-494C-85CD-DEAB2BB9852D_to_shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1"
bpmnElement="_0803D3FC-9FB9-4ED9-8A8C-419FC11F219D">
+ <di:waypoint x="338" y="206"/>
+ <di:waypoint x="572" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__E2424AB3-6F2A-4624-B451-C126EE9EABA1_to_shape__98C40A0D-04B1-4456-8D80-64DF4671BEF7"
bpmnElement="_07F44C66-4DC9-4AC2-A602-8F55F844552F">
+ <di:waypoint x="572" y="206"/>
+ <di:waypoint x="757" y="206"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__C02E8C5F-5134-47A5-9784-45821DB66B5D_to_shape__05B85A9D-4A6F-4E21-8362-6EB555D91A1F"
bpmnElement="_039B7A29-CE0D-4005-BF21-8A9DFF314E8A">
+ <di:waypoint x="571.0377358490566" y="410"/>
+ <di:waypoint x="806" y="382"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_90604C7E-7A0A-4AEB-B4F7-AA775BA3F43A">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_F2534445-E1CB-494C-85CD-DEAB2BB9852D">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_E2424AB3-6F2A-4624-B451-C126EE9EABA1">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_C02E8C5F-5134-47A5-9784-45821DB66B5D">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_2CgXoPx1ED6K-LBr7SyN5Q</bpmn2:source>
+ <bpmn2:target>_2CgXoPx1ED6K-LBr7SyN5Q</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/apps-integration-tests/integration-tests-jobs/src/main/resources/application.properties
b/apps-integration-tests/integration-tests-jobs/src/main/resources/application.properties
new file mode 100644
index 000000000..338911e06
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/main/resources/application.properties
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+# Disable OIDC (required by data-index but not used in tests)
+quarkus.oidc.enabled=false
+
+# Disable Kogito dev services
+quarkus.kogito.devservices.enabled=false
+
+# Persistence Configuration
+kogito.persistence.type=jdbc
+kie.flyway.enabled=true
+
+# H2 Database Configuration
+quarkus.datasource.db-kind=h2
+quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb;NON_KEYWORDS=VALUE,KEY;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
+quarkus.datasource.username=sa
+quarkus.datasource.password=
+
+# Hibernate Configuration
+quarkus.hibernate-orm.database.generation=none
+quarkus.hibernate-orm.validate-in-dev-mode=false
diff --git
a/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingAsyncServiceTaskIT.java
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingAsyncServiceTaskIT.java
new file mode 100644
index 000000000..f79c77a06
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingAsyncServiceTaskIT.java
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+package org.kie.kogito;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.path.json.JsonPath;
+
+import static io.restassured.RestAssured.given;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static
org.kie.kogito.FailingServiceTestUtil.FAILING_ASYNC_SERVICE_TASK_PROCESS_ID;
+import static org.kie.kogito.FailingServiceTestUtil.POLL_DELAY;
+import static org.kie.kogito.FailingServiceTestUtil.POLL_INTERVAL;
+import static
org.kie.kogito.FailingServiceTestUtil.SERVICE_TASK_NODE_DEFINTION_ID;
+import static org.kie.kogito.FailingServiceTestUtil.TIMEOUT;
+import static
org.kie.kogito.FailingServiceTestUtil.USER_TASK_NODE_DEFINTION_ID;
+import static org.kie.kogito.FailingServiceTestUtil.executeGraphQLQuery;
+import static org.kie.kogito.FailingServiceTestUtil.getQuery;
+
+@QuarkusIntegrationTest
+class FailingAsyncServiceTaskIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testFailingAsyncServiceTask() {
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .when()
+ .post("/" + FAILING_ASYNC_SERVICE_TASK_PROCESS_ID)
+ .then()
+ .statusCode(201)
+ .body("id", notNullValue())
+ .extract()
+ .path("id");
+
+ String query = getQuery(processInstanceId);
+ JsonPath resultBefore = executeGraphQLQuery(query);
+
+ // Verify initial state
+ List<Map<String, Object>> processesBefore =
resultBefore.get("data.ProcessInstances");
+ assertThat(processesBefore).isNotEmpty();
+
+ Map<String, Object> processBefore = processesBefore.get(0);
+ assertThat(processBefore.get("id")).isEqualTo(processInstanceId);
+
assertThat(processBefore.get("processId")).isEqualTo(FAILING_ASYNC_SERVICE_TASK_PROCESS_ID);
+ assertThat(processBefore.get("state")).isEqualTo("ACTIVE");
+ assertThat(processBefore.get("error")).isNull();
+
+ List<Map<String, Object>> nodesBefore =
resultBefore.get("data.ProcessInstances[0].nodes");
+ assertThat(nodesBefore).hasSize(3);
+
+ Map<String, Object> userTaskNodeBefore = nodesBefore.stream()
+ .filter(node ->
USER_TASK_NODE_DEFINTION_ID.equals(node.get("definitionId")))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("User task node not
found"));
+ String userTaskNodeInstanceId = (String) userTaskNodeBefore.get("id");
+
+ List<Map<String, Object>> jobsBefore = resultBefore.get("data.Jobs");
+ assertThat(jobsBefore).hasSize(1);
+
+ Map<String, Object> jobBefore = jobsBefore.get(0);
+
assertThat(jobBefore.get("processInstanceId")).isEqualTo(processInstanceId);
+
assertThat(jobBefore.get("nodeInstanceId")).isEqualTo(userTaskNodeInstanceId);
+ assertThat(jobBefore.get("status")).isIn("SCHEDULED", "RETRY");
+
+ // After 2s Boundary Timer triggers
+ JsonPath resultAfter = await()
+ .pollDelay(POLL_DELAY)
+ .atMost(TIMEOUT)
+ .pollInterval(POLL_INTERVAL)
+ .until(() -> {
+ JsonPath result = executeGraphQLQuery(query);
+
+ List<Map<String, Object>> processes =
result.get("data.ProcessInstances");
+ if (processes != null && !processes.isEmpty() &&
"ERROR".equals(processes.get(0).get("state"))) {
+ return result;
+ }
+ return null;
+ }, Objects::nonNull);
+
+ // Verify final state
+ List<Map<String, Object>> processesAfter =
resultAfter.get("data.ProcessInstances");
+ assertThat(processesAfter).isNotEmpty();
+
+ Map<String, Object> processAfter = processesAfter.get(0);
+ assertThat(processAfter.get("id")).isEqualTo(processInstanceId);
+ assertThat(processAfter.get("state")).isEqualTo("ERROR");
+
+ Map<String, Object> error = (Map<String, Object>)
processAfter.get("error");
+ assertThat(error).isNotNull();
+
assertThat(error.get("nodeDefinitionId")).isEqualTo(SERVICE_TASK_NODE_DEFINTION_ID);
+ assertThat(error.get("message")).asString().contains("Failed Service
Task");
+
+ List<Map<String, Object>> nodesAfter =
resultAfter.get("data.ProcessInstances[0].nodes");
+ assertThat(nodesAfter).isNotEmpty();
+
+ // Verify service task node is NOT present after error due to
transaction rollback
+ boolean serviceTaskNodePresent = nodesAfter.stream()
+ .anyMatch(node ->
SERVICE_TASK_NODE_DEFINTION_ID.equals(node.get("definitionId")));
+ assertThat(serviceTaskNodePresent)
+ .as("Service task node should not be persisted due to
transaction rollback")
+ .isFalse();
+
+ List<Map<String, Object>> jobsAfter = resultAfter.get("data.Jobs");
+ assertThat(jobsAfter).hasSize(2);
+
+ Map<String, Object> userTaskJob = jobsAfter.stream()
+ .filter(job ->
userTaskNodeInstanceId.equals(job.get("nodeInstanceId")))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("User task job not
found"));
+ assertThat(userTaskJob.get("status")).isEqualTo("EXECUTED");
+
assertThat(userTaskJob.get("processInstanceId")).isEqualTo(processInstanceId);
+
+ Map<String, Object> errorJob = jobsAfter.stream()
+ .filter(job -> "ERROR".equals(job.get("status")))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("Error job not found"));
+
assertThat(errorJob.get("processInstanceId")).isEqualTo(processInstanceId);
+ }
+}
diff --git
a/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingServiceTestUtil.java
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingServiceTestUtil.java
new file mode 100644
index 000000000..f57382aea
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingServiceTestUtil.java
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+package org.kie.kogito;
+
+import java.time.Duration;
+
+import io.restassured.http.ContentType;
+import io.restassured.path.json.JsonPath;
+
+import static io.restassured.RestAssured.given;
+
+public final class FailingServiceTestUtil {
+
+ public static final String FAILING_SYNC_SERVICE_TASK_PROCESS_ID =
"FailingSyncServiceTask";
+ public static final String FAILING_ASYNC_SERVICE_TASK_PROCESS_ID =
"FailingAsyncServiceTask";
+
+ public static final String SERVICE_TASK_NODE_DEFINTION_ID =
"_C02E8C5F-5134-47A5-9784-45821DB66B5D";
+ public static final String USER_TASK_NODE_DEFINTION_ID =
"_E2424AB3-6F2A-4624-B451-C126EE9EABA1";
+
+ public static final Duration TIMEOUT = Duration.ofSeconds(10);
+ public static final Duration POLL_DELAY = Duration.ofSeconds(3);
+ public static final Duration POLL_INTERVAL = Duration.ofMillis(500);
+
+ private FailingServiceTestUtil() {
+ }
+
+ public static JsonPath executeGraphQLQuery(String query) {
+ return given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .body(query)
+ .when()
+ .post("/graphql")
+ .then()
+ .statusCode(200)
+ .extract()
+ .jsonPath();
+ }
+
+ public static String getQuery(String processInstanceId) {
+ return String.format(
+ "{ \"query\": \"{ " +
+ "ProcessInstances(where: { id: { equal: \\\"%s\\\" }
}) { " +
+ "id, processId, state, " +
+ "error { nodeDefinitionId, nodeInstanceId, message },
" +
+ "nodes { id, type, enter, exit, definitionId,
cancelType, errorMessage } " +
+ "}, " +
+ "Jobs(where: { processInstanceId: { equal: \\\"%s\\\"
} }) { " +
+ "processInstanceId, nodeInstanceId, status " +
+ "} " +
+ "}\" }",
+ processInstanceId, processInstanceId);
+ }
+}
diff --git
a/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingSyncServiceTaskIT.java
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingSyncServiceTaskIT.java
new file mode 100644
index 000000000..2033ba9f6
--- /dev/null
+++
b/apps-integration-tests/integration-tests-jobs/src/test/java/org/kie/kogito/FailingSyncServiceTaskIT.java
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ */
+package org.kie.kogito;
+
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.path.json.JsonPath;
+
+import static io.restassured.RestAssured.given;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static
org.kie.kogito.FailingServiceTestUtil.FAILING_SYNC_SERVICE_TASK_PROCESS_ID;
+import static org.kie.kogito.FailingServiceTestUtil.TIMEOUT;
+import static
org.kie.kogito.FailingServiceTestUtil.USER_TASK_NODE_DEFINTION_ID;
+import static org.kie.kogito.FailingServiceTestUtil.executeGraphQLQuery;
+import static org.kie.kogito.FailingServiceTestUtil.getQuery;
+
+@QuarkusIntegrationTest
+class FailingSyncServiceTaskIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testFailingSyncServiceTask() {
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .when()
+ .post("/" + FAILING_SYNC_SERVICE_TASK_PROCESS_ID)
+ .then()
+ .statusCode(201)
+ .body("id", notNullValue())
+ .extract()
+ .path("id");
+
+ String query = getQuery(processInstanceId);
+ JsonPath resultBefore = executeGraphQLQuery(query);
+
+ // Verify initial state
+ List<Map<String, Object>> processesBefore =
resultBefore.get("data.ProcessInstances");
+ assertThat(processesBefore).isNotEmpty();
+
+ Map<String, Object> processBefore = processesBefore.get(0);
+ assertThat(processBefore.get("id")).isEqualTo(processInstanceId);
+
assertThat(processBefore.get("processId")).isEqualTo(FAILING_SYNC_SERVICE_TASK_PROCESS_ID);
+ assertThat(processBefore.get("state")).isEqualTo("ACTIVE");
+ assertThat(processBefore.get("error")).isNull();
+
+ List<Map<String, Object>> nodesBefore =
resultBefore.get("data.ProcessInstances[0].nodes");
+ assertThat(nodesBefore).hasSize(3);
+
+ Map<String, Object> userTaskNodeBefore = nodesBefore.stream()
+ .filter(node ->
USER_TASK_NODE_DEFINTION_ID.equals(node.get("definitionId")))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("User task node not
found"));
+
+ String userTaskNodeInstanceId = (String) userTaskNodeBefore.get("id");
+ assertThat(userTaskNodeBefore.get("type")).isEqualTo("HumanTaskNode");
+ assertThat(userTaskNodeBefore.get("enter")).isNotNull();
+ assertThat(userTaskNodeBefore.get("exit")).isNull();
+ assertThat(userTaskNodeBefore.get("cancelType")).isNull();
+ assertThat(userTaskNodeBefore.get("errorMessage")).isNull();
+
+ List<Map<String, Object>> jobsBefore = resultBefore.get("data.Jobs");
+ assertThat(jobsBefore).isNotEmpty();
+
+ Map<String, Object> jobBefore = jobsBefore.get(0);
+
assertThat(jobBefore.get("processInstanceId")).isEqualTo(processInstanceId);
+
assertThat(jobBefore.get("nodeInstanceId")).isEqualTo(userTaskNodeInstanceId);
+ assertThat(jobBefore.get("status")).isIn("SCHEDULED", "RETRY");
+
+ // After 2s Boundary Timer triggers
+ JsonPath resultAfter = await()
+ .pollDelay(Duration.ofSeconds(3))
+ .atMost(TIMEOUT)
+ .pollInterval(Duration.ofMillis(500))
+ .until(() -> {
+ JsonPath result = executeGraphQLQuery(query);
+
+ List<Map<String, Object>> processes =
result.get("data.ProcessInstances");
+ if (processes != null && !processes.isEmpty() &&
"ERROR".equals(processes.get(0).get("state"))) {
+ return result;
+ }
+ return null;
+ }, Objects::nonNull);
+
+ // Verify final state
+ List<Map<String, Object>> processesAfter =
resultAfter.get("data.ProcessInstances");
+ assertThat(processesAfter).isNotEmpty();
+
+ Map<String, Object> processAfter = processesAfter.get(0);
+ assertThat(processAfter.get("id")).isEqualTo(processInstanceId);
+ assertThat(processAfter.get("state")).isEqualTo("ERROR");
+
+ Map<String, Object> error = (Map<String, Object>)
processAfter.get("error");
+ assertThat(error).isNotNull();
+
assertThat(error.get("nodeDefinitionId")).isEqualTo(USER_TASK_NODE_DEFINTION_ID);
+
assertThat(error.get("nodeInstanceId")).isEqualTo(userTaskNodeInstanceId);
+ assertThat(error.get("message")).asString().contains("Failed Service
Task");
+
+ List<Map<String, Object>> nodesAfter =
resultAfter.get("data.ProcessInstances[0].nodes");
+ assertThat(nodesAfter).hasSize(3);
+
+ Map<String, Object> userTaskNodeAfter = nodesAfter.stream()
+ .filter(node ->
USER_TASK_NODE_DEFINTION_ID.equals(node.get("definitionId")))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("User task node not
found"));
+
+
assertThat(userTaskNodeAfter.get("id")).isEqualTo(userTaskNodeInstanceId);
+ assertThat(userTaskNodeAfter.get("cancelType")).isEqualTo("ERROR");
+
assertThat(userTaskNodeAfter.get("errorMessage")).asString().contains("Failed
Service Task");
+
+ List<Map<String, Object>> jobsAfter = resultAfter.get("data.Jobs");
+ assertThat(jobsAfter).isNotEmpty();
+
+ Map<String, Object> jobAfter = jobsAfter.get(0);
+ assertThat(jobAfter.get("status")).isIn("ERROR");
+
assertThat(jobAfter.get("processInstanceId")).isEqualTo(processInstanceId);
+
assertThat(jobAfter.get("nodeInstanceId")).isEqualTo(userTaskNodeInstanceId);
+ }
+}
diff --git a/apps-integration-tests/pom.xml b/apps-integration-tests/pom.xml
index 1eeb04e6d..d1ff03275 100644
--- a/apps-integration-tests/pom.xml
+++ b/apps-integration-tests/pom.xml
@@ -36,6 +36,7 @@
<modules>
<module>integration-tests-data-index-service</module>
+ <module>integration-tests-jobs</module>
<module>integration-tests-jobs-service</module>
</modules>
diff --git
a/jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/integrations/ErrorHandlingJobTimeoutInterceptor.java
b/jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/integrations/ErrorHandlingJobTimeoutInterceptor.java
index 4f15cff92..8e1308bab 100644
---
a/jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/integrations/ErrorHandlingJobTimeoutInterceptor.java
+++
b/jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/integrations/ErrorHandlingJobTimeoutInterceptor.java
@@ -51,12 +51,13 @@ public class ErrorHandlingJobTimeoutInterceptor implements
JobTimeoutInterceptor
public JobTimeoutExecution call() throws Exception {
JobTimeoutExecution execution = callable.call();
if (execution.getJobDetails() != null
- &&
(JobStatus.ERROR.equals(execution.getJobDetails().getStatus()) ||
(JobStatus.RETRY.equals(execution.getJobDetails().getStatus()) &&
execution.getException() != null))) {
+ &&
JobStatus.ERROR.equals(execution.getJobDetails().getStatus())
+ && execution.getException() != null) {
if (exceptionHandlers.isEmpty()) {
LOG.warn("there was an error in job {} but not handler
were registered", execution.getJobDetails());
} else {
LOG.error("there was error in job {}. Handling error
{}", execution.getJobDetails(), execution.getException().getMessage());
- exceptionHandlers.stream().forEach(e ->
e.handle(execution.getException()));
+ exceptionHandlers.forEach(e ->
e.handle(execution.getException()));
}
}
return execution;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]