You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by mw...@apache.org on 2026/02/20 17:21:59 UTC
(incubator-kie-kogito-runtimes) branch main updated: [incubator-kie-issues#2258] Verify that exceptions raised in event listeners cause transaction rollback (#4201)
This is an automated email from the ASF dual-hosted git repository.
mweiler pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new 02d5b5f82a [incubator-kie-issues#2258] Verify that exceptions raised in event listeners cause transaction rollback (#4201)
02d5b5f82a is described below
commit 02d5b5f82a363b5755c67d0157a1a69a195f27c1
Author: Abhiram Gundala <16...@users.noreply.github.com>
AuthorDate: Fri Feb 20 12:21:55 2026 -0500
[incubator-kie-issues#2258] Verify that exceptions raised in event listeners cause transaction rollback (#4201)
* Event listeners tx rollback IT test
* fix 1
* Added event listener rollback Springboot IT Test
* transaction rollback it tests
* removed svg's
* removed svg's
---
.../pom.xml | 146 +++++
.../src/main/java/org/acme/CandidateData.java | 104 +++
.../org/acme/FailingUserTaskEventListener.java | 57 ++
.../src/main/java/org/acme/Offer.java | 54 ++
.../src/main/resources/NewHiringOffer.dmn | 181 ++++++
.../src/main/resources/application.properties | 36 +
.../src/main/resources/hiring.bpmn | 723 +++++++++++++++++++++
.../it/UserTaskTransactionRollbackIT.java | 129 ++++
quarkus/integration-tests/pom.xml | 1 +
.../pom.xml | 136 ++++
.../src/main/java/org/acme/CandidateData.java | 104 +++
.../org/acme/FailingUserTaskEventListener.java | 54 ++
.../src/main/java/org/acme/Offer.java | 54 ++
.../kie/kogito/it/KogitoSpringbootApplication.java | 31 +
.../src/main/resources/NewHiringOffer.dmn | 181 ++++++
.../src/main/resources/application.properties | 29 +
.../src/main/resources/hiring.bpmn | 723 +++++++++++++++++++++
.../it/UserTaskTransactionRollbackIT.java | 140 ++++
springboot/integration-tests/pom.xml | 1 +
19 files changed, 2884 insertions(+)
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/pom.xml b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/pom.xml
new file mode 100644
index 0000000000..870671c5ba
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/pom.xml
@@ -0,0 +1,146 @@
+<?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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ 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">
+ <parent>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-integration-tests</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>integration-tests-quarkus-usertask-listeners-rollback</artifactId>
+ <name>Kogito :: Integration Tests :: Quarkus :: User Task Listeners :: Rollback</name>
+
+ <properties>
+ <java.module.name>org.jbpm.usertask.transaction.rollback.it</java.module.name>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-with-drools-quarkus</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-addons-quarkus-usertask-storage-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-arc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-postgresql</artifactId>
+ </dependency>
+ <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.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-test-utils</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- hack for CI to work -->
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-quarkus-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-addons-quarkus-usertask-storage-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/CandidateData.java b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/CandidateData.java
new file mode 100644
index 0000000000..9bd46cd043
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/CandidateData.java
@@ -0,0 +1,104 @@
+/*
+ * 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.acme;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class CandidateData {
+
+ private String name;
+
+ private String lastName;
+
+ private String email;
+
+ private Integer experience;
+
+ private List<String> skills;
+
+ public CandidateData() {
+ }
+
+ public CandidateData(String name, String lastName, String email, Integer experience, List<String> skills) {
+ this.name = name;
+ this.lastName = lastName;
+ this.email = email;
+ this.experience = experience;
+ this.skills = skills;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getExperience() {
+ return experience;
+ }
+
+ public void setExperience(Integer experience) {
+ this.experience = experience;
+ }
+
+ public List<String> getSkills() {
+ return skills;
+ }
+
+ public void setSkills(List<String> skills) {
+ this.skills = skills;
+ }
+
+ @JsonIgnore
+ public String getFullName() {
+ return name + " " + lastName;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "CandidateData{" +
+ "name='" + name + '\'' +
+ ", lastName='" + lastName + '\'' +
+ ", email='" + email + '\'' +
+ ", experience=" + experience +
+ ", skills=" + skills +
+ '}';
+ }
+}
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/FailingUserTaskEventListener.java b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/FailingUserTaskEventListener.java
new file mode 100644
index 0000000000..c016b28b31
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/FailingUserTaskEventListener.java
@@ -0,0 +1,57 @@
+/*
+ * 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.acme;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.kie.kogito.usertask.UserTaskEventListener;
+import org.kie.kogito.usertask.events.UserTaskStateEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+
+// A test listener demonstrates transactional behavior of UserTaskEventListener, it will throw a RuntimeException when a task transitions to "Completed" status and verifies that the transaction rolls back, leaving the task in its previous state.
+
+@ApplicationScoped
+public class FailingUserTaskEventListener implements UserTaskEventListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(FailingUserTaskEventListener.class);
+ private static final String PREFIX = ">>>>> [FAILING-LISTENER] ";
+
+ @Inject
+ @ConfigProperty(name = "app.listener.fail-on-complete", defaultValue = "false")
+ boolean failOnComplete;
+
+ @Override
+ public void onUserTaskState(UserTaskStateEvent event) {
+ String newStatus = event.getNewStatus() != null ? event.getNewStatus().getName() : null;
+
+ LOGGER.info(PREFIX + "onUserTaskState: taskName={}, newStatus={}, failOnComplete={}",
+ event.getUserTaskInstance().getTaskName(),
+ newStatus,
+ failOnComplete);
+
+ if (failOnComplete && "Completed".equals(newStatus)) {
+ throw new RuntimeException("Simulated external system failure. " +
+ "Transaction should rollback and task should remain in previous state.");
+ }
+ }
+}
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/Offer.java b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/Offer.java
new file mode 100644
index 0000000000..2ecd435ff8
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/java/org/acme/Offer.java
@@ -0,0 +1,54 @@
+/*
+ * 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.acme;
+
+public class Offer {
+
+ private String category;
+
+ private Integer salary;
+
+ public Offer() {
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public Integer getSalary() {
+ return salary;
+ }
+
+ public void setSalary(Integer salary) {
+ this.salary = salary;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "Offer{" +
+ "category='" + category + '\'' +
+ ", salary=" + salary +
+ '}';
+ }
+}
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/NewHiringOffer.dmn b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/NewHiringOffer.dmn
new file mode 100644
index 0000000000..4c5129af03
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/NewHiringOffer.dmn
@@ -0,0 +1,181 @@
+<?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.
+ -->
+<dmn:definitions xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/" xmlns="https://kiegroup.org/dmn/_0DCC505E-71B4-4C29-8848-4006623FE51A" xmlns:feel="https://www.omg.org/spec/DMN/20230324/FEEL/" xmlns:kie="https://kie.org/dmn/extensions/1.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_5CC0238C-2BB4-4C9F-BC94-B8E8A00F0210" name="New Hiring Offer" typeLanguage= [...]
+ <dmn:extensionElements />
+ <dmn:itemDefinition id="_91B22404-81DF-44E7-9084-6416BF211BCC" name="tCandidateData" isCollection="false">
+ <dmn:itemComponent id="_657BB44B-D8B2-490A-B383-F63EF31E781E" name="name" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_F004E7F6-6993-4CA2-8029-C3A87C8A15A8" name="lastName" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_E9314196-BF96-4014-9548-2BB15D125B34" name="email" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_D554122C-2BF1-4F1C-AAF2-DC7EBB72E817" name="experience" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_03ACF59E-4EC6-4C79-AE55-427BD51429BD" name="skills" isCollection="true">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:itemDefinition id="_76F919CD-3E75-4EE2-AD60-FB0627E0DA54" name="tOffer" isCollection="false">
+ <dmn:itemComponent id="_C4ABF342-EEB6-4CA6-AAC1-7C6D50A1DD02" name="salary" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_3C2A61B7-AD85-4AF3-B904-51038920EF93" name="category" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ <dmn:allowedValues kie:constraintType="enumeration" id="_8C8338A1-7CA6-48D8-AECB-3D5082333316">
+ <dmn:text>"Software Engineer", "Senior Software Engineer", "Software Architect"</dmn:text>
+ </dmn:allowedValues>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:inputData id="_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" name="CandidateData">
+ <dmn:extensionElements />
+ <dmn:variable id="_EF5D30F7-00BF-47E2-9655-D1D21B799F5C" name="CandidateData" typeRef="tCandidateData" />
+ </dmn:inputData>
+ <dmn:decision id="_26299D78-4931-4077-A636-1364B97AB94F" name="Offer">
+ <dmn:extensionElements />
+ <dmn:variable id="_1C79A32D-6535-4209-9840-D4FF6FF52CA9" name="Offer" typeRef="tOffer" />
+ <dmn:informationRequirement id="_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF">
+ <dmn:requiredInput href="#_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" />
+ </dmn:informationRequirement>
+ <dmn:context id="_6CF8329F-A45C-4FC8-AEDD-F2DA34BCD9CC">
+ <dmn:contextEntry id="_7BAF16CF-A059-47EC-90E5-0142B3238EDF">
+ <dmn:variable id="_F97FBBC2-9B78-4280-8053-B5089E422B35" name="SalaryBonus" typeRef="number" />
+ <dmn:literalExpression id="_DE5ECE12-3B62-497F-9A5F-8DFE8D5B440B">
+ <dmn:text>count(CandidateData.skills) * 150</dmn:text>
+ </dmn:literalExpression>
+ </dmn:contextEntry>
+ <dmn:contextEntry id="_8E5C8FDE-04E1-41BB-9115-7D1D00C07096">
+ <dmn:variable id="_CE19A7DC-A559-482A-93A8-38786291B11C" name="Offer" typeRef="tOffer" />
+ <dmn:decisionTable id="_839000A0-8C02-4FD7-A079-9DCA9C2D9C67" hitPolicy="UNIQUE" preferredOrientation="Rule-as-Row">
+ <dmn:input id="_2003EFC0-4A87-43FA-80B1-25C14F0AB2FF">
+ <dmn:inputExpression id="_663F281B-8A30-44DC-9DA5-B141831D552B" typeRef="number">
+ <dmn:text>CandidateData.experience</dmn:text>
+ </dmn:inputExpression>
+ </dmn:input>
+ <dmn:output id="_BCCDA650-A716-4BA4-9B3D-4CD8AE93CB79" name="category" typeRef="string">
+ <dmn:outputValues kie:constraintType="enumeration" id="_78F5B0AC-CE91-4BEC-8B26-121FF0C0BC2A">
+ <dmn:text>"Software Engineer", "Senior Software Engineer", "Software Architect"</dmn:text>
+ </dmn:outputValues>
+ </dmn:output>
+ <dmn:output id="_FF119A4B-E564-438A-99D9-4D1B26E519F1" name="salary" typeRef="number" />
+ <dmn:annotation name="annotation-1" />
+ <dmn:rule id="_2E67A292-D088-4ED7-AC9D-A7D85C3B6188">
+ <dmn:inputEntry id="_5082A566-8E83-4441-B446-A69E5BE4D81E">
+ <dmn:text>[0..5)</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_BF300CEA-9C67-4A48-9E63-781B94552D6F">
+ <dmn:text>"Software Engineer"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_7B4EBA06-D280-436F-80E6-B6631BED7E8F">
+ <dmn:text>30000 + SalaryBonus </dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_1322663C-FAD9-48BA-A893-8076ED7D2D55">
+ <dmn:inputEntry id="_6801EF6E-ED61-41DF-9810-7D9118A1F611">
+ <dmn:text>[5..10)</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_43E9D87D-ECE5-4298-B98A-9E69D93B967B">
+ <dmn:text>"Senior Software Engineer"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_CF868CA5-C53A-4ECD-9167-5C55F858FF7F">
+ <dmn:text>40000 + SalaryBonus</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_1104ED9E-0910-40F9-A0C3-911BF018C545">
+ <dmn:inputEntry id="_3D058456-EA96-4D78-9BF1-9AEDF3755C47">
+ <dmn:text>>=10</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_061D4DC8-069B-43C7-9200-C20D11692D8F">
+ <dmn:text>"Software Architect"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_C7269E79-EE4D-440C-99F7-C5F474F15E2F">
+ <dmn:text>50000 + SalaryBonus</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ </dmn:decisionTable>
+ </dmn:contextEntry>
+ <dmn:contextEntry id="_485585EE-E5AB-4770-906D-9308415C3273">
+ <dmn:literalExpression id="_3676400A-0460-43CC-A96A-B28B460E4D19">
+ <dmn:text>Offer</dmn:text>
+ </dmn:literalExpression>
+ </dmn:contextEntry>
+ </dmn:context>
+ </dmn:decision>
+ <dmndi:DMNDI>
+ <dmndi:DMNDiagram id="_C1A40C3F-E161-41CE-9ED5-BA9F449CF495" name="DRG" useAlternativeInputDataShape="false">
+ <di:extension>
+ <kie:ComponentsWidthsExtension>
+ <kie:ComponentWidths dmnElementRef="_6CF8329F-A45C-4FC8-AEDD-F2DA34BCD9CC">
+ <kie:width>50</kie:width>
+ <kie:width>120</kie:width>
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_DE5ECE12-3B62-497F-9A5F-8DFE8D5B440B">
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_839000A0-8C02-4FD7-A079-9DCA9C2D9C67">
+ <kie:width>50</kie:width>
+ <kie:width>175</kie:width>
+ <kie:width>104</kie:width>
+ <kie:width>437</kie:width>
+ <kie:width>140</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_3676400A-0460-43CC-A96A-B28B460E4D19">
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ </kie:ComponentsWidthsExtension>
+ </di:extension>
+ <dmndi:DMNShape id="dmnshape-drg-_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" dmnElementRef="_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" isCollapsed="false">
+ <dmndi:DMNStyle id="_BC196EFB-61E2-4BCE-B8AA-348283ACAAED">
+ <dmndi:FillColor red="255" green="255" blue="255" />
+ <dmndi:StrokeColor red="0" green="0" blue="0" />
+ <dmndi:FontColor red="0" green="0" blue="0" />
+ </dmndi:DMNStyle>
+ <dc:Bounds x="380" y="380" width="137" height="58" />
+ <dmndi:DMNLabel id="_EE9C98AF-FBB0-42D7-AF55-430D317D37AE" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="dmnshape-drg-_26299D78-4931-4077-A636-1364B97AB94F" dmnElementRef="_26299D78-4931-4077-A636-1364B97AB94F" isCollapsed="false">
+ <dmndi:DMNStyle id="_1D23D537-6AE9-4903-84BE-2824FAF0C260">
+ <dmndi:FillColor red="255" green="255" blue="255" />
+ <dmndi:StrokeColor red="0" green="0" blue="0" />
+ <dmndi:FontColor red="0" green="0" blue="0" />
+ </dmndi:DMNStyle>
+ <dc:Bounds x="379" y="165" width="100" height="50" />
+ <dmndi:DMNLabel id="_CFDE3114-4DE5-4D71-879C-9AB9BFA93CED" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="dmnedge-drg-_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF" dmnElementRef="_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF">
+ <di:waypoint x="448.5" y="409" />
+ <di:waypoint x="429" y="215" />
+ </dmndi:DMNEdge>
+ </dmndi:DMNDiagram>
+ </dmndi:DMNDI>
+</dmn:definitions>
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/application.properties b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/application.properties
new file mode 100644
index 0000000000..3c2d95bd58
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/application.properties
@@ -0,0 +1,36 @@
+#
+# 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.
+#
+
+quarkus.datasource.db-kind=postgresql
+quarkus.datasource.devservices.image-name=mirror.gcr.io/postgres:15.9-alpine3.20
+# Disable container reuse to ensure a clean database on every test run
+#quarkus.datasource.devservices.reuse=false
+
+kogito.persistence.type=jdbc
+
+quarkus.hibernate-orm.database.generation=none
+
+kie.flyway.enabled=true
+
+# Logging
+quarkus.log.category."org.acme".level=INFO
+
+# Transaction rollback test configuration
+# Set to true to simulate external system failure in UserTaskEventListener
+app.listener.fail-on-complete=true
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/hiring.bpmn b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/hiring.bpmn
new file mode 100644
index 0000000000..d1fb69a082
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/main/resources/hiring.bpmn
@@ -0,0 +1,723 @@
+<?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="_GkSCkOLcED2WTfkvITaMPg" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www. [...]
+ <bpmn2:itemDefinition id="_hr_approvalItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="_it_approvalItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="_candidateDataItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="_offerItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_PriorityInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_CommentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_DescriptionInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_CreatedByInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_GroupIdInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_ContentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotStartedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotCompletedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotStartedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotCompletedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerInputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveInputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerOutputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_PriorityInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_CommentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_DescriptionInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_CreatedByInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_GroupIdInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_ContentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotStartedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotStartedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_offerInputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveInputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_decisionInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" structureRef="String" />
+ <bpmn2:collaboration id="_1A528EBE-C0BD-4F45-9DD2-5333CEF62989" name="Default Collaboration">
+ <bpmn2:participant id="_96B91710-26C5-4C8A-86FA-BE71FE6CA65D" name="Pool Participant" processRef="hiring" />
+ </bpmn2:collaboration>
+ <bpmn2:process id="hiring" drools:packageName="org.acme" drools:version="1.0" drools:adHoc="false" name="hiring" isExecutable="true" processType="Public">
+ <bpmn2:extensionElements>
+ <drools:import name="org.acme.CandidateData" />
+ <drools:import name="org.acme.Offer" />
+ </bpmn2:extensionElements>
+ <bpmn2:property id="hr_approval" itemSubjectRef="_hr_approvalItem" name="hr_approval">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>internal</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="it_approval" itemSubjectRef="_it_approvalItem" name="it_approval">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>internal</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="candidateData" itemSubjectRef="_candidateDataItem" name="candidateData">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>input</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="offer" itemSubjectRef="_offerItem" name="offer">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>output</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:startEvent id="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <bpmn2:outgoing>_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1">
+ <bpmn2:incoming>_7DDA574A-C220-4FEF-9784-22EF8052EDEC</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <bpmn2:incoming>_527D3164-4989-4D2C-B80B-9BA9D4C8FB89</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" drools:dg="_94172225-E124-4F14-98DA-C3D62C11254A" gatewayDirection="Converging" default="_94172225-E124-4F14-98DA-C3D62C11254A">
+ <bpmn2:incoming>_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9</bpmn2:incoming>
+ <bpmn2:incoming>_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E</bpmn2:incoming>
+ <bpmn2:incoming>_C6E61C53-FD35-4347-B69E-30AA93AE4404</bpmn2:incoming>
+ <bpmn2:outgoing>_94172225-E124-4F14-98DA-C3D62C11254A</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" drools:dg="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6" gatewayDirection="Diverging" default="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6">
+ <bpmn2:incoming>_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287</bpmn2:incoming>
+ <bpmn2:outgoing>_C6E61C53-FD35-4347-B69E-30AA93AE4404</bpmn2:outgoing>
+ <bpmn2:outgoing>_59F9A0E6-7F9C-43A9-8920-5B40A91169E6</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="_B9662806-84F3-4444-AD62-4790CDA7C85D" drools:dg="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E" gatewayDirection="Diverging" default="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E">
+ <bpmn2:incoming>_C62F7EFB-A009-450A-81C7-57D36F0DF766</bpmn2:incoming>
+ <bpmn2:outgoing>_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E</bpmn2:outgoing>
+ <bpmn2:outgoing>_B11455DE-F77A-4251-A85B-4C66636E3CD9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67" name="Send Offer to Candidate" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Send Offer to Candidate</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_B11455DE-F77A-4251-A85B-4C66636E3CD9</bpmn2:incoming>
+ <bpmn2:outgoing>_7DDA574A-C220-4FEF-9784-22EF8052EDEC</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("To: " + candidateData.getEmail());
+System.out.println("Subject: Congratulations you made it!");
+System.out.println("Dear " + candidateData.getFullName() + ", we are happy to tell you that you've successfully went through the hiring process. You'll find the final Offer details in attached.");
+System.out.println("Job Category: " + offer.getCategory());
+System.out.println("Base salary: " + offer.getSalary());
+System.out.println("###################################");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" name="Log Offer" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Log Offer</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5</bpmn2:incoming>
+ <bpmn2:outgoing>_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("Generated offer for candidate: " + candidateData.getFullName());
+System.out.println("Job Category: " + offer.getCategory());
+System.out.println("Base salary: " + offer.getSalary());
+System.out.println("###################################");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_4B7FF147-F096-435B-8CAF-48318EF786B0" name="Application denied" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Application denied</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_94172225-E124-4F14-98DA-C3D62C11254A</bpmn2:incoming>
+ <bpmn2:outgoing>_527D3164-4989-4D2C-B80B-9BA9D4C8FB89</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("Candidate " + candidateData.getFullName() + " don't meet the requirements for the position but we'll keep it on records for the future!");
+System.out.println("###################################");
+</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_834B21EF-9229-44F8-A5DB-D96EBB39A347" name="Send notification HR Interview avoided" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Send notification HR Interview avoided</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_7B41F971-C74D-4036-8A5E-EFF81C37986A</bpmn2:incoming>
+ <bpmn2:outgoing>_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("HR Interview have been avoided after reasonable time");
+System.out.println("###################################");
+</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045" name="New Hiring" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>New Hiring</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A</bpmn2:incoming>
+ <bpmn2:outgoing>_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("New Hiring has been created for candidate: " + candidateData.getFullName());
+
+kcontext.setVariable("hr_approval", false);
+kcontext.setVariable("it_approval", false);</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:userTask id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" name="IT Interview">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>IT Interview</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_A76C6603-0406-423C-940B-3403948DCA1F</bpmn2:incoming>
+ <bpmn2:outgoing>_C62F7EFB-A009-450A-81C7-57D36F0DF766</bpmn2:outgoing>
+ <bpmn2:ioSpecification id="_6FC9E6B4-A575-4C1C-86CD-386442F188B4">
+ <bpmn2:dataInput id="_D1823A94-7744-473F-AEEE-B62C6563809D" name="TaskName" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_75462A99-0F93-4D66-AB3B-9C3A1738ECCD" name="candidate" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" />
+ <bpmn2:dataInput id="_F2BD98F6-D760-462C-90BE-147EAB651156" name="offer" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:dataInput id="_76949448-B933-45D5-BE42-31130828DC2A" name="approve" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataInput id="_94A0F292-1399-4A53-837E-081C557FBB69" name="Skippable" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_037D4CF4-AF7B-4A6C-98AD-E87912453AEF" name="GroupId" drools:dtype="String" itemSubjectRef="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" />
+ <bpmn2:dataOutput name="approve" id="_46FFF990-580D-410E-B6E2-5D7C42C59B09" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:inputSet id="_2CB5E38B-3B16-41FB-AC93-F7D40B71C94E">
+ <bpmn2:dataInputRefs>_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_75462A99-0F93-4D66-AB3B-9C3A1738ECCD</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F2BD98F6-D760-462C-90BE-147EAB651156</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_76949448-B933-45D5-BE42-31130828DC2A</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet id="_47263929-D77C-4ACB-9772-16ECF58D9A5F">
+ <bpmn2:dataOutputRefs>_46FFF990-580D-410E-B6E2-5D7C42C59B09</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation id="_896B591F-4DCC-426E-AB7B-967668497149">
+ <bpmn2:targetRef>_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:targetRef>
+ <bpmn2:assignment id="_4991529E-948B-48E8-9661-841E5FE86281">
+ <bpmn2:from id="_EAD1A545-B1D9-4776-9564-4B3F8377D482" xsi:type="tFormalExpression">ITInterview</bpmn2:from>
+ <bpmn2:to id="_DCCC34D4-DD02-480D-BCC8-FD4D81F0824F">_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_28662BA3-0536-437B-933C-AF6552CA6BAA">
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_75462A99-0F93-4D66-AB3B-9C3A1738ECCD</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_880CA2F4-BFFB-4678-BBC7-A63D9651A10E">
+ <bpmn2:sourceRef>offer</bpmn2:sourceRef>
+ <bpmn2:targetRef>_F2BD98F6-D760-462C-90BE-147EAB651156</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_8CF9AECD-DC14-4929-A877-A2B27D6F7C53">
+ <bpmn2:sourceRef>it_approval</bpmn2:sourceRef>
+ <bpmn2:targetRef>_76949448-B933-45D5-BE42-31130828DC2A</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_3803DA3A-D389-47DF-8B13-D44EE40A913F">
+ <bpmn2:targetRef>_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:targetRef>
+ <bpmn2:assignment id="_D068E85D-26BC-450F-A62F-6A30D5AC2062">
+ <bpmn2:from id="_C2E34901-138C-4CCA-B62B-55D33814B623" xsi:type="tFormalExpression">false</bpmn2:from>
+ <bpmn2:to id="_BB4F4BC0-2895-49C4-9307-1F92DD5B4ECD">_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_89940E71-7420-49D4-98D4-8FDFEB3C21A7">
+ <bpmn2:targetRef>_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:targetRef>
+ <bpmn2:assignment id="_C58297F7-9BDF-4864-9D28-B6D3A58E8B93">
+ <bpmn2:from id="_9A6C1BFE-106B-4A90-AEB9-BD9D426569E2" xsi:type="tFormalExpression">it-manager</bpmn2:from>
+ <bpmn2:to id="_E60F2812-81A7-45A3-A214-2A5F71DE5A82">_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation id="_4CFF8002-188B-41D2-ACAA-E456F5F07EFB">
+ <bpmn2:sourceRef>_46FFF990-580D-410E-B6E2-5D7C42C59B09</bpmn2:sourceRef>
+ <bpmn2:targetRef>it_approval</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner id="_GkVs8OLcED2WTfkvITaMPg">
+ <bpmn2:resourceAssignmentExpression id="_GkVs8eLcED2WTfkvITaMPg">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:userTask id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" name="HR Interview">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>HR Interview</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383</bpmn2:incoming>
+ <bpmn2:outgoing>_A76C6603-0406-423C-940B-3403948DCA1F</bpmn2:outgoing>
+ <bpmn2:ioSpecification id="_F994466D-63CC-44DC-82EF-E22A68DDC85F">
+ <bpmn2:dataInput id="_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB" name="TaskName" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_44053373-49DB-4515-9819-D243354097FC" name="candidate" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" />
+ <bpmn2:dataInput id="_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1" name="offer" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:dataInput id="_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE" name="approve" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataInput id="_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC" name="Skippable" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_E61F4C75-B8F3-45DB-BC79-A6B39B731CED" name="GroupId" drools:dtype="String" itemSubjectRef="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" />
+ <bpmn2:dataOutput name="approve" id="_B31D890F-BD6D-40AC-978B-B642A6B316CB" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataOutput name="offer" id="_D4105129-A2B3-44AE-8867-A37645E553A9" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:inputSet id="_A49D3F8C-F054-45C3-8235-A1DD53EB9365">
+ <bpmn2:dataInputRefs>_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_44053373-49DB-4515-9819-D243354097FC</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet id="_BE7FDF88-34A8-41DC-89CD-90E097AE2C1D">
+ <bpmn2:dataOutputRefs>_B31D890F-BD6D-40AC-978B-B642A6B316CB</bpmn2:dataOutputRefs>
+ <bpmn2:dataOutputRefs>_D4105129-A2B3-44AE-8867-A37645E553A9</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation id="_7C3B3595-D215-4550-A7A7-1883F97A8447">
+ <bpmn2:targetRef>_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:targetRef>
+ <bpmn2:assignment id="_E5D3CA25-DC74-4D84-A392-D54477BBD69D">
+ <bpmn2:from id="_D5CEDA84-47AB-45AD-AD28-D4582D51CD0C" xsi:type="tFormalExpression">HRInterview</bpmn2:from>
+ <bpmn2:to id="_0AA907D6-399E-4908-9DE6-008774725686">_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_EB1E888D-4100-4F9A-9835-14A51EDF96D7">
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_44053373-49DB-4515-9819-D243354097FC</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_177962C4-0773-4F5E-AB80-2C7DC84C2D30">
+ <bpmn2:sourceRef>offer</bpmn2:sourceRef>
+ <bpmn2:targetRef>_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_05F8D01A-AFFC-4A46-AB7F-A0F4D82D65CA">
+ <bpmn2:sourceRef>hr_approval</bpmn2:sourceRef>
+ <bpmn2:targetRef>_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_0B23A795-CD83-49A7-8396-5B9AAB1C953D">
+ <bpmn2:targetRef>_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:targetRef>
+ <bpmn2:assignment id="_7BF0345A-B7A7-4075-AD87-AB1BCBC1B42F">
+ <bpmn2:from id="_4F3CFEC0-D9C5-406C-9165-9449A98F8D96" xsi:type="tFormalExpression">false</bpmn2:from>
+ <bpmn2:to id="_FCE297CF-3E6D-42C7-AD48-08194FF625CC">_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_274C0103-826A-4866-8AC2-29241AED043A">
+ <bpmn2:targetRef>_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:targetRef>
+ <bpmn2:assignment id="_9C31F87F-DE46-4DF6-8127-9721902AF038">
+ <bpmn2:from id="_9C6C6FCE-CC7F-4B0B-BE8B-673D7F740D72" xsi:type="tFormalExpression">hr-manager</bpmn2:from>
+ <bpmn2:to id="_B8921C20-F811-462A-BFEB-33C3783F3851">_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation id="_62565A24-35CF-4079-B871-AA4134D8EEA9">
+ <bpmn2:sourceRef>_B31D890F-BD6D-40AC-978B-B642A6B316CB</bpmn2:sourceRef>
+ <bpmn2:targetRef>hr_approval</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:dataOutputAssociation id="_C7F68046-8C8E-4B48-9134-D02E35486689">
+ <bpmn2:sourceRef>_D4105129-A2B3-44AE-8867-A37645E553A9</bpmn2:sourceRef>
+ <bpmn2:targetRef>offer</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner id="_GkVs8uLcED2WTfkvITaMPg">
+ <bpmn2:resourceAssignmentExpression id="_GkVs8-LcED2WTfkvITaMPg">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:businessRuleTask id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" name="Generate base offer" implementation="http://www.jboss.org/drools/dmn">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Generate base offer</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_59F9A0E6-7F9C-43A9-8920-5B40A91169E6</bpmn2:incoming>
+ <bpmn2:outgoing>_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputXItem" name="fileName" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputXItem" name="namespace" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputXItem" name="model" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" name="CandidateData" />
+ <bpmn2:dataOutput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" name="Offer" />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">NewHiringOffer.dmn</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">https://kie.apache.org/dmn/_C3BAEB39-B8F7-4BAA-A20A-1627BE84771B</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">New Hiring Offer</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>offer</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:boundaryEvent id="_116F3C54-A10E-4952-9E08-1CACE74CED0B" drools:dockerinfo="59.2^74|" drools:boundaryca="true" attachedToRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <bpmn2:outgoing>_7B41F971-C74D-4036-8A5E-EFF81C37986A</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT180S</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="_7DDA574A-C220-4FEF-9784-22EF8052EDEC" sourceRef="_940F2A0C-8CC6-4ECA-B504-49363AF68B67" targetRef="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" />
+ <bpmn2:sequenceFlow id="_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5" sourceRef="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" targetRef="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" />
+ <bpmn2:sequenceFlow id="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89" sourceRef="_4B7FF147-F096-435B-8CAF-48318EF786B0" targetRef="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue>true</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_94172225-E124-4F14-98DA-C3D62C11254A" sourceRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" targetRef="_4B7FF147-F096-435B-8CAF-48318EF786B0" />
+ <bpmn2:sequenceFlow id="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6" sourceRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" targetRef="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" />
+ <bpmn2:sequenceFlow id="_C6E61C53-FD35-4347-B69E-30AA93AE4404" sourceRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="http://www.java.com/java">return candidateData.getExperience() < 1 || candidateData.getSkills().size() == 0;</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_B11455DE-F77A-4251-A85B-4C66636E3CD9" sourceRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" targetRef="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="http://www.java.com/java">return hr_approval && it_approval;</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E" sourceRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" />
+ <bpmn2:sequenceFlow id="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9" sourceRef="_834B21EF-9229-44F8-A5DB-D96EBB39A347" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" />
+ <bpmn2:sequenceFlow id="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287" sourceRef="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045" targetRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" />
+ <bpmn2:sequenceFlow id="_C62F7EFB-A009-450A-81C7-57D36F0DF766" sourceRef="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" targetRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" />
+ <bpmn2:sequenceFlow id="_A76C6603-0406-423C-940B-3403948DCA1F" sourceRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" targetRef="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" />
+ <bpmn2:sequenceFlow id="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383" sourceRef="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" targetRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" />
+ <bpmn2:sequenceFlow id="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A" sourceRef="_1639F738-45F3-4CD6-A80E-CCEBAA605D56" targetRef="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.source">
+ <drools:metaValue>true</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_7B41F971-C74D-4036-8A5E-EFF81C37986A" sourceRef="_116F3C54-A10E-4952-9E08-1CACE74CED0B" targetRef="_834B21EF-9229-44F8-A5DB-D96EBB39A347" />
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram id="_7320242F-3185-4921-89AC-2CAACF8B49BE">
+ <bpmndi:BPMNPlane bpmnElement="hiring" id="_DF10B693-655F-4DA0-9802-ED2D4E31A101">
+ <bpmndi:BPMNShape id="shape__116F3C54-A10E-4952-9E08-1CACE74CED0B" bpmnElement="_116F3C54-A10E-4952-9E08-1CACE74CED0B">
+ <dc:Bounds height="56" width="56" x="860.2" y="86.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__1639F738-45F3-4CD6-A80E-CCEBAA605D56" bpmnElement="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <dc:Bounds height="56" width="56" x="71.99999999999999" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6" bpmnElement="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <dc:Bounds height="102" width="154" x="801" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E" bpmnElement="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E">
+ <dc:Bounds height="102" width="154" x="984.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045" bpmnElement="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <dc:Bounds height="102" width="154" x="162.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__834B21EF-9229-44F8-A5DB-D96EBB39A347" bpmnElement="_834B21EF-9229-44F8-A5DB-D96EBB39A347">
+ <dc:Bounds height="102" width="154" x="811.75" y="197.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B9662806-84F3-4444-AD62-4790CDA7C85D" bpmnElement="_B9662806-84F3-4444-AD62-4790CDA7C85D">
+ <dc:Bounds height="56" width="56" x="1164.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" bpmnElement="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04">
+ <dc:Bounds height="56" width="56" x="343.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7">
+ <dc:Bounds height="56" width="56" x="1164.75" y="392.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__4B7FF147-F096-435B-8CAF-48318EF786B0" bpmnElement="_4B7FF147-F096-435B-8CAF-48318EF786B0">
+ <dc:Bounds height="102" width="154" x="1263.75" y="369.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__457DC13A-0AEC-4390-A860-5CCFFB67B366" bpmnElement="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <dc:Bounds height="56" width="56" x="1468.75" y="392.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" bpmnElement="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A">
+ <dc:Bounds height="102" width="154" x="435.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" bpmnElement="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1">
+ <dc:Bounds height="56" width="56" x="1468.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" bpmnElement="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C">
+ <dc:Bounds height="102" width="154" x="618.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67" bpmnElement="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <dc:Bounds height="102" width="154" x="1263.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge_shape__116F3C54-A10E-4952-9E08-1CACE74CED0B_to_shape__834B21EF-9229-44F8-A5DB-D96EBB39A347" bpmnElement="_7B41F971-C74D-4036-8A5E-EFF81C37986A">
+ <di:waypoint x="888.2" y="114.00000000000006" />
+ <di:waypoint x="888.75" y="248.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__1639F738-45F3-4CD6-A80E-CCEBAA605D56_to_shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045" bpmnElement="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A">
+ <di:waypoint x="99.99999999999999" y="91.00000000000006" />
+ <di:waypoint x="162.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C_to_shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6" bpmnElement="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383">
+ <di:waypoint x="695.75" y="63.00000000000006" />
+ <di:waypoint x="801" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6_to_shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E" bpmnElement="_A76C6603-0406-423C-940B-3403948DCA1F">
+ <di:waypoint x="878" y="63.00000000000006" />
+ <di:waypoint x="984.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_to_shape__B9662806-84F3-4444-AD62-4790CDA7C85D" bpmnElement="_C62F7EFB-A009-450A-81C7-57D36F0DF766">
+ <di:waypoint x="1138.75" y="63.00000000000006" />
+ <di:waypoint x="1164.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045_to_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" bpmnElement="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287">
+ <di:waypoint x="316.75" y="63.00000000000006" />
+ <di:waypoint x="343.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__834B21EF-9229-44F8-A5DB-D96EBB39A347_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9">
+ <di:waypoint x="888.75" y="248.00000000000006" />
+ <di:waypoint x="1164.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B9662806-84F3-4444-AD62-4790CDA7C85D_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E">
+ <di:waypoint x="1192.75" y="91.00000000000006" />
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B9662806-84F3-4444-AD62-4790CDA7C85D_to_shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67" bpmnElement="_B11455DE-F77A-4251-A85B-4C66636E3CD9">
+ <di:waypoint x="1220.75" y="63.00000000000006" />
+ <di:waypoint x="1263.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_C6E61C53-FD35-4347-B69E-30AA93AE4404">
+ <di:waypoint x="371.75" y="91.00000000000006" />
+ <di:waypoint x="371.75" y="420.00000811728415" />
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04_to_shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" bpmnElement="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6">
+ <di:waypoint x="371.75" y="63.00000000000006" />
+ <di:waypoint x="435.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7_to_shape__4B7FF147-F096-435B-8CAF-48318EF786B0" bpmnElement="_94172225-E124-4F14-98DA-C3D62C11254A">
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ <di:waypoint x="1263.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__4B7FF147-F096-435B-8CAF-48318EF786B0_to_shape__457DC13A-0AEC-4390-A860-5CCFFB67B366" bpmnElement="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89">
+ <di:waypoint x="1340.75" y="420.00000000000006" />
+ <di:waypoint x="1545.75" y="392.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_to_shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" bpmnElement="_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5">
+ <di:waypoint x="512.75" y="63.00000000000006" />
+ <di:waypoint x="695.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67_to_shape__6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" bpmnElement="_7DDA574A-C220-4FEF-9784-22EF8052EDEC">
+ <di:waypoint x="1340.75" y="63.00000000000006" />
+ <di:waypoint x="1496.75" y="63.00000000000006" />
+ </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="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters elementRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <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="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E">
+ <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="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <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="_834B21EF-9229-44F8-A5DB-D96EBB39A347">
+ <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="_4B7FF147-F096-435B-8CAF-48318EF786B0">
+ <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="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A">
+ <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="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C">
+ <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="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <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>_GkSCkOLcED2WTfkvITaMPg</bpmn2:source>
+ <bpmn2:target>_GkSCkOLcED2WTfkvITaMPg</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git a/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java
new file mode 100644
index 0000000000..4a66cda94b
--- /dev/null
+++ b/quarkus/integration-tests/integration-tests-quarkus-usertask-listeners-rollback/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java
@@ -0,0 +1,129 @@
+/*
+ * 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.jbpm.usertask.transaction.it;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.testcontainers.quarkus.PostgreSqlQuarkusTestResource;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.emptyOrNullString;
+
+/**
+ * Integration test to verify that UserTaskEventListener exceptions cause transaction rollback.
+ *
+ * This test verifies that when a UserTaskEventListener throws an exception during task completion,
+ * the transaction is rolled back and the task remains in its previous state (Reserved instead of Completed).
+ *
+ * The FailingUserTaskEventListener is configured via application.properties with:
+ * app.listener.fail-on-complete=true
+ */
+@QuarkusIntegrationTest
+@QuarkusTestResource(value = PostgreSqlQuarkusTestResource.class, restrictToAnnotatedClass = true)
+public class UserTaskTransactionRollbackIT {
+
+ private static final String PROCESS_ID = "hiring";
+ private static final String HIRING_ENDPOINT = "/" + PROCESS_ID;
+ private static final String USER_TASKS_ENDPOINT = "/usertasks/instance";
+ private static final String USER_TASKS_INSTANCE_ENDPOINT = USER_TASKS_ENDPOINT + "/{taskId}";
+ private static final String USER_TASKS_TRANSITION_ENDPOINT = USER_TASKS_INSTANCE_ENDPOINT + "/transition";
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ public void testListenerExceptionCausesTransactionRollback() {
+ // 1. Start a hiring process
+ Map<String, Object> candidateData = Map.of(
+ "name", "Jon",
+ "lastName", "Snow",
+ "email", "jon@snow.org",
+ "experience", 5,
+ "skills", List.of("Java", "Kogito"));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .body(Map.of("candidateData", candidateData))
+ .when()
+ .post(HIRING_ENDPOINT)
+ .then()
+ .statusCode(201)
+ .body("id", not(emptyOrNullString()))
+ .extract()
+ .path("id");
+
+ System.out.println("Started process instance with ID: " + processInstanceId);
+
+ // 2. Get the HR Interview task
+ String taskId = given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_ENDPOINT)
+ .then()
+ .statusCode(200)
+ .body("$.size()", is(1))
+ .extract()
+ .path("[0].id");
+
+ // 3. Verify task is in Reserved state
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_INSTANCE_ENDPOINT, taskId)
+ .then()
+ .statusCode(200)
+ .body("status.name", equalTo("Reserved"))
+ .body("taskName", equalTo("HRInterview"));
+
+ // 4. Try to complete the task - FailingUserTaskEventListener will throw exception
+ // The transaction should rollback, returning 500 error
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .body(Map.of("transitionId", "complete", "data", Map.of("approve", true)))
+ .when()
+ .post(USER_TASKS_TRANSITION_ENDPOINT, taskId)
+ .then()
+ .statusCode(500); // Expecting error due to listener exception
+
+ // 5. Verify the task is Still in Reserved state (transaction rolled back)
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_INSTANCE_ENDPOINT, taskId)
+ .then()
+ .statusCode(200)
+ .body("status.name", equalTo("Reserved")); // Should still be Reserved, not Completed
+ }
+}
diff --git a/quarkus/integration-tests/pom.xml b/quarkus/integration-tests/pom.xml
index 10b7c20be5..401c189750 100644
--- a/quarkus/integration-tests/pom.xml
+++ b/quarkus/integration-tests/pom.xml
@@ -49,6 +49,7 @@
<module>integration-tests-quarkus-processes-reactive</module>
<module>integration-tests-quarkus-processes-persistence</module>
<module>integration-tests-quarkus-usertasks</module>
+ <module>integration-tests-quarkus-usertask-listeners-rollback</module>
<module>integration-tests-quarkus-wshumantasks</module>
<module>integration-tests-quarkus-source-files</module>
</modules>
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/pom.xml b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/pom.xml
new file mode 100644
index 0000000000..172aab5db4
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/pom.xml
@@ -0,0 +1,136 @@
+<?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.
+ -->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-spring-boot-integration-tests</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>integration-tests-springboot-usertask-listeners-rollback-it</artifactId>
+ <name>Kogito :: Integration Tests :: Spring Boot :: User Task Listeners :: Rollback</name>
+
+ <properties>
+ <java.module.name>integration.tests.springboot.usertask.listeners.rollback.it</java.module.name>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-spring-boot-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-spring-boot-starter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-springboot-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-addons-springboot-usertask-storage-jpa</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-springboot-process-management</artifactId>
+ </dependency>
+
+ <!-- test related -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-spring-boot-test-utils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${version.compiler.plugin}</version>
+ <configuration>
+ <release>${maven.compiler.release}</release>
+ </configuration>
+ <executions>
+ <execution>
+ <id>pre-kogito-generate-model</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generateModel</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/CandidateData.java b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/CandidateData.java
new file mode 100644
index 0000000000..9bd46cd043
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/CandidateData.java
@@ -0,0 +1,104 @@
+/*
+ * 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.acme;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class CandidateData {
+
+ private String name;
+
+ private String lastName;
+
+ private String email;
+
+ private Integer experience;
+
+ private List<String> skills;
+
+ public CandidateData() {
+ }
+
+ public CandidateData(String name, String lastName, String email, Integer experience, List<String> skills) {
+ this.name = name;
+ this.lastName = lastName;
+ this.email = email;
+ this.experience = experience;
+ this.skills = skills;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getExperience() {
+ return experience;
+ }
+
+ public void setExperience(Integer experience) {
+ this.experience = experience;
+ }
+
+ public List<String> getSkills() {
+ return skills;
+ }
+
+ public void setSkills(List<String> skills) {
+ this.skills = skills;
+ }
+
+ @JsonIgnore
+ public String getFullName() {
+ return name + " " + lastName;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "CandidateData{" +
+ "name='" + name + '\'' +
+ ", lastName='" + lastName + '\'' +
+ ", email='" + email + '\'' +
+ ", experience=" + experience +
+ ", skills=" + skills +
+ '}';
+ }
+}
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/FailingUserTaskEventListener.java b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/FailingUserTaskEventListener.java
new file mode 100644
index 0000000000..e0278d7564
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/FailingUserTaskEventListener.java
@@ -0,0 +1,54 @@
+/*
+ * 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.acme;
+
+import org.kie.kogito.usertask.UserTaskEventListener;
+import org.kie.kogito.usertask.events.UserTaskStateEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+// demonstrates transactional behavior of UserTaskEventListener, it will throw a RuntimeException when a task transitions to "Completed" status and verifies that the transaction rolls back, leaving the task in its previous state.
+
+@Component
+public class FailingUserTaskEventListener implements UserTaskEventListener {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(FailingUserTaskEventListener.class);
+ private static final String PREFIX = ">>>>> [FAILING-LISTENER] ";
+
+ @Value("${app.listener.fail-on-complete:false}")
+ boolean failOnComplete;
+
+ @Override
+ public void onUserTaskState(UserTaskStateEvent event) {
+ String newStatus = event.getNewStatus() != null ? event.getNewStatus().getName() : null;
+
+ LOGGER.info(PREFIX + "onUserTaskState: taskName={}, newStatus={}, failOnComplete={}",
+ event.getUserTaskInstance().getTaskName(),
+ newStatus,
+ failOnComplete);
+
+ if (failOnComplete && "Completed".equals(newStatus)) {
+ throw new RuntimeException("Simulated external system failure. " +
+ "Transaction should rollback and task should remain in previous state.");
+ }
+ }
+}
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/Offer.java b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/Offer.java
new file mode 100644
index 0000000000..2ecd435ff8
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/acme/Offer.java
@@ -0,0 +1,54 @@
+/*
+ * 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.acme;
+
+public class Offer {
+
+ private String category;
+
+ private Integer salary;
+
+ public Offer() {
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public Integer getSalary() {
+ return salary;
+ }
+
+ public void setSalary(Integer salary) {
+ this.salary = salary;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "Offer{" +
+ "category='" + category + '\'' +
+ ", salary=" + salary +
+ '}';
+ }
+}
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/kie/kogito/it/KogitoSpringbootApplication.java b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/kie/kogito/it/KogitoSpringbootApplication.java
new file mode 100644
index 0000000000..b877c4d79b
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/java/org/kie/kogito/it/KogitoSpringbootApplication.java
@@ -0,0 +1,31 @@
+/*
+ * 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.it;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**", "org.acme.**" })
+public class KogitoSpringbootApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(KogitoSpringbootApplication.class, args);
+ }
+}
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/NewHiringOffer.dmn b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/NewHiringOffer.dmn
new file mode 100644
index 0000000000..4c5129af03
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/NewHiringOffer.dmn
@@ -0,0 +1,181 @@
+<?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.
+ -->
+<dmn:definitions xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/" xmlns="https://kiegroup.org/dmn/_0DCC505E-71B4-4C29-8848-4006623FE51A" xmlns:feel="https://www.omg.org/spec/DMN/20230324/FEEL/" xmlns:kie="https://kie.org/dmn/extensions/1.0" xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_5CC0238C-2BB4-4C9F-BC94-B8E8A00F0210" name="New Hiring Offer" typeLanguage= [...]
+ <dmn:extensionElements />
+ <dmn:itemDefinition id="_91B22404-81DF-44E7-9084-6416BF211BCC" name="tCandidateData" isCollection="false">
+ <dmn:itemComponent id="_657BB44B-D8B2-490A-B383-F63EF31E781E" name="name" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_F004E7F6-6993-4CA2-8029-C3A87C8A15A8" name="lastName" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_E9314196-BF96-4014-9548-2BB15D125B34" name="email" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_D554122C-2BF1-4F1C-AAF2-DC7EBB72E817" name="experience" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_03ACF59E-4EC6-4C79-AE55-427BD51429BD" name="skills" isCollection="true">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:itemDefinition id="_76F919CD-3E75-4EE2-AD60-FB0627E0DA54" name="tOffer" isCollection="false">
+ <dmn:itemComponent id="_C4ABF342-EEB6-4CA6-AAC1-7C6D50A1DD02" name="salary" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_3C2A61B7-AD85-4AF3-B904-51038920EF93" name="category" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ <dmn:allowedValues kie:constraintType="enumeration" id="_8C8338A1-7CA6-48D8-AECB-3D5082333316">
+ <dmn:text>"Software Engineer", "Senior Software Engineer", "Software Architect"</dmn:text>
+ </dmn:allowedValues>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:inputData id="_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" name="CandidateData">
+ <dmn:extensionElements />
+ <dmn:variable id="_EF5D30F7-00BF-47E2-9655-D1D21B799F5C" name="CandidateData" typeRef="tCandidateData" />
+ </dmn:inputData>
+ <dmn:decision id="_26299D78-4931-4077-A636-1364B97AB94F" name="Offer">
+ <dmn:extensionElements />
+ <dmn:variable id="_1C79A32D-6535-4209-9840-D4FF6FF52CA9" name="Offer" typeRef="tOffer" />
+ <dmn:informationRequirement id="_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF">
+ <dmn:requiredInput href="#_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" />
+ </dmn:informationRequirement>
+ <dmn:context id="_6CF8329F-A45C-4FC8-AEDD-F2DA34BCD9CC">
+ <dmn:contextEntry id="_7BAF16CF-A059-47EC-90E5-0142B3238EDF">
+ <dmn:variable id="_F97FBBC2-9B78-4280-8053-B5089E422B35" name="SalaryBonus" typeRef="number" />
+ <dmn:literalExpression id="_DE5ECE12-3B62-497F-9A5F-8DFE8D5B440B">
+ <dmn:text>count(CandidateData.skills) * 150</dmn:text>
+ </dmn:literalExpression>
+ </dmn:contextEntry>
+ <dmn:contextEntry id="_8E5C8FDE-04E1-41BB-9115-7D1D00C07096">
+ <dmn:variable id="_CE19A7DC-A559-482A-93A8-38786291B11C" name="Offer" typeRef="tOffer" />
+ <dmn:decisionTable id="_839000A0-8C02-4FD7-A079-9DCA9C2D9C67" hitPolicy="UNIQUE" preferredOrientation="Rule-as-Row">
+ <dmn:input id="_2003EFC0-4A87-43FA-80B1-25C14F0AB2FF">
+ <dmn:inputExpression id="_663F281B-8A30-44DC-9DA5-B141831D552B" typeRef="number">
+ <dmn:text>CandidateData.experience</dmn:text>
+ </dmn:inputExpression>
+ </dmn:input>
+ <dmn:output id="_BCCDA650-A716-4BA4-9B3D-4CD8AE93CB79" name="category" typeRef="string">
+ <dmn:outputValues kie:constraintType="enumeration" id="_78F5B0AC-CE91-4BEC-8B26-121FF0C0BC2A">
+ <dmn:text>"Software Engineer", "Senior Software Engineer", "Software Architect"</dmn:text>
+ </dmn:outputValues>
+ </dmn:output>
+ <dmn:output id="_FF119A4B-E564-438A-99D9-4D1B26E519F1" name="salary" typeRef="number" />
+ <dmn:annotation name="annotation-1" />
+ <dmn:rule id="_2E67A292-D088-4ED7-AC9D-A7D85C3B6188">
+ <dmn:inputEntry id="_5082A566-8E83-4441-B446-A69E5BE4D81E">
+ <dmn:text>[0..5)</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_BF300CEA-9C67-4A48-9E63-781B94552D6F">
+ <dmn:text>"Software Engineer"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_7B4EBA06-D280-436F-80E6-B6631BED7E8F">
+ <dmn:text>30000 + SalaryBonus </dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_1322663C-FAD9-48BA-A893-8076ED7D2D55">
+ <dmn:inputEntry id="_6801EF6E-ED61-41DF-9810-7D9118A1F611">
+ <dmn:text>[5..10)</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_43E9D87D-ECE5-4298-B98A-9E69D93B967B">
+ <dmn:text>"Senior Software Engineer"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_CF868CA5-C53A-4ECD-9167-5C55F858FF7F">
+ <dmn:text>40000 + SalaryBonus</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_1104ED9E-0910-40F9-A0C3-911BF018C545">
+ <dmn:inputEntry id="_3D058456-EA96-4D78-9BF1-9AEDF3755C47">
+ <dmn:text>>=10</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_061D4DC8-069B-43C7-9200-C20D11692D8F">
+ <dmn:text>"Software Architect"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_C7269E79-EE4D-440C-99F7-C5F474F15E2F">
+ <dmn:text>50000 + SalaryBonus</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text></dmn:text>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ </dmn:decisionTable>
+ </dmn:contextEntry>
+ <dmn:contextEntry id="_485585EE-E5AB-4770-906D-9308415C3273">
+ <dmn:literalExpression id="_3676400A-0460-43CC-A96A-B28B460E4D19">
+ <dmn:text>Offer</dmn:text>
+ </dmn:literalExpression>
+ </dmn:contextEntry>
+ </dmn:context>
+ </dmn:decision>
+ <dmndi:DMNDI>
+ <dmndi:DMNDiagram id="_C1A40C3F-E161-41CE-9ED5-BA9F449CF495" name="DRG" useAlternativeInputDataShape="false">
+ <di:extension>
+ <kie:ComponentsWidthsExtension>
+ <kie:ComponentWidths dmnElementRef="_6CF8329F-A45C-4FC8-AEDD-F2DA34BCD9CC">
+ <kie:width>50</kie:width>
+ <kie:width>120</kie:width>
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_DE5ECE12-3B62-497F-9A5F-8DFE8D5B440B">
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_839000A0-8C02-4FD7-A079-9DCA9C2D9C67">
+ <kie:width>50</kie:width>
+ <kie:width>175</kie:width>
+ <kie:width>104</kie:width>
+ <kie:width>437</kie:width>
+ <kie:width>140</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths dmnElementRef="_3676400A-0460-43CC-A96A-B28B460E4D19">
+ <kie:width>926</kie:width>
+ </kie:ComponentWidths>
+ </kie:ComponentsWidthsExtension>
+ </di:extension>
+ <dmndi:DMNShape id="dmnshape-drg-_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" dmnElementRef="_59F676A7-D122-4FAB-8ABB-F1E0CC997C08" isCollapsed="false">
+ <dmndi:DMNStyle id="_BC196EFB-61E2-4BCE-B8AA-348283ACAAED">
+ <dmndi:FillColor red="255" green="255" blue="255" />
+ <dmndi:StrokeColor red="0" green="0" blue="0" />
+ <dmndi:FontColor red="0" green="0" blue="0" />
+ </dmndi:DMNStyle>
+ <dc:Bounds x="380" y="380" width="137" height="58" />
+ <dmndi:DMNLabel id="_EE9C98AF-FBB0-42D7-AF55-430D317D37AE" />
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="dmnshape-drg-_26299D78-4931-4077-A636-1364B97AB94F" dmnElementRef="_26299D78-4931-4077-A636-1364B97AB94F" isCollapsed="false">
+ <dmndi:DMNStyle id="_1D23D537-6AE9-4903-84BE-2824FAF0C260">
+ <dmndi:FillColor red="255" green="255" blue="255" />
+ <dmndi:StrokeColor red="0" green="0" blue="0" />
+ <dmndi:FontColor red="0" green="0" blue="0" />
+ </dmndi:DMNStyle>
+ <dc:Bounds x="379" y="165" width="100" height="50" />
+ <dmndi:DMNLabel id="_CFDE3114-4DE5-4D71-879C-9AB9BFA93CED" />
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="dmnedge-drg-_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF" dmnElementRef="_87BE8DEF-9B4D-45EC-8E59-6CD9D0613DCF">
+ <di:waypoint x="448.5" y="409" />
+ <di:waypoint x="429" y="215" />
+ </dmndi:DMNEdge>
+ </dmndi:DMNDiagram>
+ </dmndi:DMNDI>
+</dmn:definitions>
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/application.properties b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/application.properties
new file mode 100644
index 0000000000..1549ebb9f9
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/application.properties
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+kogito.persistence.type=jdbc
+
+kie.flyway.enabled=true
+spring.flyway.enabled=false
+
+# Logging
+logging.level.org.acme=INFO
+
+# Transaction rollback test configuration
+# Set to true to simulate external system failure in UserTaskEventListener
+app.listener.fail-on-complete=true
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/hiring.bpmn b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/hiring.bpmn
new file mode 100644
index 0000000000..d1fb69a082
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/main/resources/hiring.bpmn
@@ -0,0 +1,723 @@
+<?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="_GkSCkOLcED2WTfkvITaMPg" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www. [...]
+ <bpmn2:itemDefinition id="_hr_approvalItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="_it_approvalItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="_candidateDataItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="_offerItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_PriorityInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_CommentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_DescriptionInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_CreatedByInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_GroupIdInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_ContentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotStartedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotCompletedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotStartedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_NotCompletedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerInputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveInputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerOutputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_PriorityInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_CommentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_DescriptionInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_CreatedByInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_GroupIdInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_ContentInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotStartedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedReassignInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotStartedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" structureRef="Object" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_offerInputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveInputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" structureRef="Boolean" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_decisionInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" structureRef="org.acme.CandidateData" />
+ <bpmn2:itemDefinition id="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" structureRef="org.acme.Offer" />
+ <bpmn2:itemDefinition id="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" structureRef="String" />
+ <bpmn2:collaboration id="_1A528EBE-C0BD-4F45-9DD2-5333CEF62989" name="Default Collaboration">
+ <bpmn2:participant id="_96B91710-26C5-4C8A-86FA-BE71FE6CA65D" name="Pool Participant" processRef="hiring" />
+ </bpmn2:collaboration>
+ <bpmn2:process id="hiring" drools:packageName="org.acme" drools:version="1.0" drools:adHoc="false" name="hiring" isExecutable="true" processType="Public">
+ <bpmn2:extensionElements>
+ <drools:import name="org.acme.CandidateData" />
+ <drools:import name="org.acme.Offer" />
+ </bpmn2:extensionElements>
+ <bpmn2:property id="hr_approval" itemSubjectRef="_hr_approvalItem" name="hr_approval">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>internal</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="it_approval" itemSubjectRef="_it_approvalItem" name="it_approval">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>internal</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="candidateData" itemSubjectRef="_candidateDataItem" name="candidateData">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>input</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="offer" itemSubjectRef="_offerItem" name="offer">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue>output</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:startEvent id="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <bpmn2:outgoing>_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1">
+ <bpmn2:incoming>_7DDA574A-C220-4FEF-9784-22EF8052EDEC</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <bpmn2:incoming>_527D3164-4989-4D2C-B80B-9BA9D4C8FB89</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" drools:dg="_94172225-E124-4F14-98DA-C3D62C11254A" gatewayDirection="Converging" default="_94172225-E124-4F14-98DA-C3D62C11254A">
+ <bpmn2:incoming>_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9</bpmn2:incoming>
+ <bpmn2:incoming>_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E</bpmn2:incoming>
+ <bpmn2:incoming>_C6E61C53-FD35-4347-B69E-30AA93AE4404</bpmn2:incoming>
+ <bpmn2:outgoing>_94172225-E124-4F14-98DA-C3D62C11254A</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" drools:dg="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6" gatewayDirection="Diverging" default="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6">
+ <bpmn2:incoming>_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287</bpmn2:incoming>
+ <bpmn2:outgoing>_C6E61C53-FD35-4347-B69E-30AA93AE4404</bpmn2:outgoing>
+ <bpmn2:outgoing>_59F9A0E6-7F9C-43A9-8920-5B40A91169E6</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="_B9662806-84F3-4444-AD62-4790CDA7C85D" drools:dg="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E" gatewayDirection="Diverging" default="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E">
+ <bpmn2:incoming>_C62F7EFB-A009-450A-81C7-57D36F0DF766</bpmn2:incoming>
+ <bpmn2:outgoing>_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E</bpmn2:outgoing>
+ <bpmn2:outgoing>_B11455DE-F77A-4251-A85B-4C66636E3CD9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67" name="Send Offer to Candidate" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Send Offer to Candidate</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_B11455DE-F77A-4251-A85B-4C66636E3CD9</bpmn2:incoming>
+ <bpmn2:outgoing>_7DDA574A-C220-4FEF-9784-22EF8052EDEC</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("To: " + candidateData.getEmail());
+System.out.println("Subject: Congratulations you made it!");
+System.out.println("Dear " + candidateData.getFullName() + ", we are happy to tell you that you've successfully went through the hiring process. You'll find the final Offer details in attached.");
+System.out.println("Job Category: " + offer.getCategory());
+System.out.println("Base salary: " + offer.getSalary());
+System.out.println("###################################");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" name="Log Offer" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Log Offer</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5</bpmn2:incoming>
+ <bpmn2:outgoing>_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("Generated offer for candidate: " + candidateData.getFullName());
+System.out.println("Job Category: " + offer.getCategory());
+System.out.println("Base salary: " + offer.getSalary());
+System.out.println("###################################");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_4B7FF147-F096-435B-8CAF-48318EF786B0" name="Application denied" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Application denied</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_94172225-E124-4F14-98DA-C3D62C11254A</bpmn2:incoming>
+ <bpmn2:outgoing>_527D3164-4989-4D2C-B80B-9BA9D4C8FB89</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("Candidate " + candidateData.getFullName() + " don't meet the requirements for the position but we'll keep it on records for the future!");
+System.out.println("###################################");
+</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_834B21EF-9229-44F8-A5DB-D96EBB39A347" name="Send notification HR Interview avoided" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Send notification HR Interview avoided</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_7B41F971-C74D-4036-8A5E-EFF81C37986A</bpmn2:incoming>
+ <bpmn2:outgoing>_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("###################################");
+System.out.println("HR Interview have been avoided after reasonable time");
+System.out.println("###################################");
+</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045" name="New Hiring" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>New Hiring</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A</bpmn2:incoming>
+ <bpmn2:outgoing>_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("New Hiring has been created for candidate: " + candidateData.getFullName());
+
+kcontext.setVariable("hr_approval", false);
+kcontext.setVariable("it_approval", false);</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:userTask id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" name="IT Interview">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>IT Interview</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_A76C6603-0406-423C-940B-3403948DCA1F</bpmn2:incoming>
+ <bpmn2:outgoing>_C62F7EFB-A009-450A-81C7-57D36F0DF766</bpmn2:outgoing>
+ <bpmn2:ioSpecification id="_6FC9E6B4-A575-4C1C-86CD-386442F188B4">
+ <bpmn2:dataInput id="_D1823A94-7744-473F-AEEE-B62C6563809D" name="TaskName" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_75462A99-0F93-4D66-AB3B-9C3A1738ECCD" name="candidate" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" />
+ <bpmn2:dataInput id="_F2BD98F6-D760-462C-90BE-147EAB651156" name="offer" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:dataInput id="_76949448-B933-45D5-BE42-31130828DC2A" name="approve" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataInput id="_94A0F292-1399-4A53-837E-081C557FBB69" name="Skippable" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_037D4CF4-AF7B-4A6C-98AD-E87912453AEF" name="GroupId" drools:dtype="String" itemSubjectRef="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" />
+ <bpmn2:dataOutput name="approve" id="_46FFF990-580D-410E-B6E2-5D7C42C59B09" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:inputSet id="_2CB5E38B-3B16-41FB-AC93-F7D40B71C94E">
+ <bpmn2:dataInputRefs>_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_75462A99-0F93-4D66-AB3B-9C3A1738ECCD</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F2BD98F6-D760-462C-90BE-147EAB651156</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_76949448-B933-45D5-BE42-31130828DC2A</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet id="_47263929-D77C-4ACB-9772-16ECF58D9A5F">
+ <bpmn2:dataOutputRefs>_46FFF990-580D-410E-B6E2-5D7C42C59B09</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation id="_896B591F-4DCC-426E-AB7B-967668497149">
+ <bpmn2:targetRef>_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:targetRef>
+ <bpmn2:assignment id="_4991529E-948B-48E8-9661-841E5FE86281">
+ <bpmn2:from id="_EAD1A545-B1D9-4776-9564-4B3F8377D482" xsi:type="tFormalExpression">ITInterview</bpmn2:from>
+ <bpmn2:to id="_DCCC34D4-DD02-480D-BCC8-FD4D81F0824F">_D1823A94-7744-473F-AEEE-B62C6563809D</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_28662BA3-0536-437B-933C-AF6552CA6BAA">
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_75462A99-0F93-4D66-AB3B-9C3A1738ECCD</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_880CA2F4-BFFB-4678-BBC7-A63D9651A10E">
+ <bpmn2:sourceRef>offer</bpmn2:sourceRef>
+ <bpmn2:targetRef>_F2BD98F6-D760-462C-90BE-147EAB651156</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_8CF9AECD-DC14-4929-A877-A2B27D6F7C53">
+ <bpmn2:sourceRef>it_approval</bpmn2:sourceRef>
+ <bpmn2:targetRef>_76949448-B933-45D5-BE42-31130828DC2A</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_3803DA3A-D389-47DF-8B13-D44EE40A913F">
+ <bpmn2:targetRef>_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:targetRef>
+ <bpmn2:assignment id="_D068E85D-26BC-450F-A62F-6A30D5AC2062">
+ <bpmn2:from id="_C2E34901-138C-4CCA-B62B-55D33814B623" xsi:type="tFormalExpression">false</bpmn2:from>
+ <bpmn2:to id="_BB4F4BC0-2895-49C4-9307-1F92DD5B4ECD">_94A0F292-1399-4A53-837E-081C557FBB69</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_89940E71-7420-49D4-98D4-8FDFEB3C21A7">
+ <bpmn2:targetRef>_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:targetRef>
+ <bpmn2:assignment id="_C58297F7-9BDF-4864-9D28-B6D3A58E8B93">
+ <bpmn2:from id="_9A6C1BFE-106B-4A90-AEB9-BD9D426569E2" xsi:type="tFormalExpression">it-manager</bpmn2:from>
+ <bpmn2:to id="_E60F2812-81A7-45A3-A214-2A5F71DE5A82">_037D4CF4-AF7B-4A6C-98AD-E87912453AEF</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation id="_4CFF8002-188B-41D2-ACAA-E456F5F07EFB">
+ <bpmn2:sourceRef>_46FFF990-580D-410E-B6E2-5D7C42C59B09</bpmn2:sourceRef>
+ <bpmn2:targetRef>it_approval</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner id="_GkVs8OLcED2WTfkvITaMPg">
+ <bpmn2:resourceAssignmentExpression id="_GkVs8eLcED2WTfkvITaMPg">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:userTask id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" name="HR Interview">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>HR Interview</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383</bpmn2:incoming>
+ <bpmn2:outgoing>_A76C6603-0406-423C-940B-3403948DCA1F</bpmn2:outgoing>
+ <bpmn2:ioSpecification id="_F994466D-63CC-44DC-82EF-E22A68DDC85F">
+ <bpmn2:dataInput id="_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB" name="TaskName" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_44053373-49DB-4515-9819-D243354097FC" name="candidate" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" />
+ <bpmn2:dataInput id="_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1" name="offer" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:dataInput id="_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE" name="approve" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataInput id="_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC" name="Skippable" drools:dtype="Object" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_NotCompletedNotifyInputXItem" />
+ <bpmn2:dataInput id="_E61F4C75-B8F3-45DB-BC79-A6B39B731CED" name="GroupId" drools:dtype="String" itemSubjectRef="_3FB3C55B-E669-4960-BB50-57B6FF2DDB5E" />
+ <bpmn2:dataOutput name="approve" id="_B31D890F-BD6D-40AC-978B-B642A6B316CB" drools:dtype="Boolean" itemSubjectRef="__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputXItem" />
+ <bpmn2:dataOutput name="offer" id="_D4105129-A2B3-44AE-8867-A37645E553A9" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" />
+ <bpmn2:inputSet id="_A49D3F8C-F054-45C3-8235-A1DD53EB9365">
+ <bpmn2:dataInputRefs>_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_44053373-49DB-4515-9819-D243354097FC</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet id="_BE7FDF88-34A8-41DC-89CD-90E097AE2C1D">
+ <bpmn2:dataOutputRefs>_B31D890F-BD6D-40AC-978B-B642A6B316CB</bpmn2:dataOutputRefs>
+ <bpmn2:dataOutputRefs>_D4105129-A2B3-44AE-8867-A37645E553A9</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation id="_7C3B3595-D215-4550-A7A7-1883F97A8447">
+ <bpmn2:targetRef>_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:targetRef>
+ <bpmn2:assignment id="_E5D3CA25-DC74-4D84-A392-D54477BBD69D">
+ <bpmn2:from id="_D5CEDA84-47AB-45AD-AD28-D4582D51CD0C" xsi:type="tFormalExpression">HRInterview</bpmn2:from>
+ <bpmn2:to id="_0AA907D6-399E-4908-9DE6-008774725686">_95E7BCF6-4759-4BB9-882C-7DBE0F0630DB</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_EB1E888D-4100-4F9A-9835-14A51EDF96D7">
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_44053373-49DB-4515-9819-D243354097FC</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_177962C4-0773-4F5E-AB80-2C7DC84C2D30">
+ <bpmn2:sourceRef>offer</bpmn2:sourceRef>
+ <bpmn2:targetRef>_3AFD68BC-1E0F-4664-B9F3-D95AC40170D1</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_05F8D01A-AFFC-4A46-AB7F-A0F4D82D65CA">
+ <bpmn2:sourceRef>hr_approval</bpmn2:sourceRef>
+ <bpmn2:targetRef>_BFAD0D35-27F1-4B4D-8E96-ED14B429A7DE</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_0B23A795-CD83-49A7-8396-5B9AAB1C953D">
+ <bpmn2:targetRef>_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:targetRef>
+ <bpmn2:assignment id="_7BF0345A-B7A7-4075-AD87-AB1BCBC1B42F">
+ <bpmn2:from id="_4F3CFEC0-D9C5-406C-9165-9449A98F8D96" xsi:type="tFormalExpression">false</bpmn2:from>
+ <bpmn2:to id="_FCE297CF-3E6D-42C7-AD48-08194FF625CC">_FAF5AF15-9BE2-4426-B001-BF7F174CF8CC</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation id="_274C0103-826A-4866-8AC2-29241AED043A">
+ <bpmn2:targetRef>_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:targetRef>
+ <bpmn2:assignment id="_9C31F87F-DE46-4DF6-8127-9721902AF038">
+ <bpmn2:from id="_9C6C6FCE-CC7F-4B0B-BE8B-673D7F740D72" xsi:type="tFormalExpression">hr-manager</bpmn2:from>
+ <bpmn2:to id="_B8921C20-F811-462A-BFEB-33C3783F3851">_E61F4C75-B8F3-45DB-BC79-A6B39B731CED</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation id="_62565A24-35CF-4079-B871-AA4134D8EEA9">
+ <bpmn2:sourceRef>_B31D890F-BD6D-40AC-978B-B642A6B316CB</bpmn2:sourceRef>
+ <bpmn2:targetRef>hr_approval</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:dataOutputAssociation id="_C7F68046-8C8E-4B48-9134-D02E35486689">
+ <bpmn2:sourceRef>_D4105129-A2B3-44AE-8867-A37645E553A9</bpmn2:sourceRef>
+ <bpmn2:targetRef>offer</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner id="_GkVs8uLcED2WTfkvITaMPg">
+ <bpmn2:resourceAssignmentExpression id="_GkVs8-LcED2WTfkvITaMPg">
+ <bpmn2:formalExpression>jdoe</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:businessRuleTask id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" name="Generate base offer" implementation="http://www.jboss.org/drools/dmn">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue>Generate base offer</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_59F9A0E6-7F9C-43A9-8920-5B40A91169E6</bpmn2:incoming>
+ <bpmn2:outgoing>_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputXItem" name="fileName" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputXItem" name="namespace" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX" drools:dtype="java.lang.String" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputXItem" name="model" />
+ <bpmn2:dataInput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX" drools:dtype="org.acme.CandidateData" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputXItem" name="CandidateData" />
+ <bpmn2:dataOutput id="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX" drools:dtype="org.acme.Offer" itemSubjectRef="__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputXItem" name="Offer" />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">NewHiringOffer.dmn</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">https://kie.apache.org/dmn/_C3BAEB39-B8F7-4BAA-A20A-1627BE84771B</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression">New Hiring Offer</bpmn2:from>
+ <bpmn2:to xsi:type="bpmn2:tFormalExpression">_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX</bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>candidateData</bpmn2:sourceRef>
+ <bpmn2:targetRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>offer</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:boundaryEvent id="_116F3C54-A10E-4952-9E08-1CACE74CED0B" drools:dockerinfo="59.2^74|" drools:boundaryca="true" attachedToRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <bpmn2:outgoing>_7B41F971-C74D-4036-8A5E-EFF81C37986A</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT180S</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="_7DDA574A-C220-4FEF-9784-22EF8052EDEC" sourceRef="_940F2A0C-8CC6-4ECA-B504-49363AF68B67" targetRef="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" />
+ <bpmn2:sequenceFlow id="_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5" sourceRef="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" targetRef="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" />
+ <bpmn2:sequenceFlow id="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89" sourceRef="_4B7FF147-F096-435B-8CAF-48318EF786B0" targetRef="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue>true</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_94172225-E124-4F14-98DA-C3D62C11254A" sourceRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" targetRef="_4B7FF147-F096-435B-8CAF-48318EF786B0" />
+ <bpmn2:sequenceFlow id="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6" sourceRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" targetRef="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" />
+ <bpmn2:sequenceFlow id="_C6E61C53-FD35-4347-B69E-30AA93AE4404" sourceRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="http://www.java.com/java">return candidateData.getExperience() < 1 || candidateData.getSkills().size() == 0;</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_B11455DE-F77A-4251-A85B-4C66636E3CD9" sourceRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" targetRef="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="http://www.java.com/java">return hr_approval && it_approval;</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E" sourceRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" />
+ <bpmn2:sequenceFlow id="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9" sourceRef="_834B21EF-9229-44F8-A5DB-D96EBB39A347" targetRef="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" />
+ <bpmn2:sequenceFlow id="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287" sourceRef="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045" targetRef="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" />
+ <bpmn2:sequenceFlow id="_C62F7EFB-A009-450A-81C7-57D36F0DF766" sourceRef="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" targetRef="_B9662806-84F3-4444-AD62-4790CDA7C85D" />
+ <bpmn2:sequenceFlow id="_A76C6603-0406-423C-940B-3403948DCA1F" sourceRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" targetRef="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E" />
+ <bpmn2:sequenceFlow id="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383" sourceRef="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" targetRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6" />
+ <bpmn2:sequenceFlow id="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A" sourceRef="_1639F738-45F3-4CD6-A80E-CCEBAA605D56" targetRef="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.source">
+ <drools:metaValue>true</drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_7B41F971-C74D-4036-8A5E-EFF81C37986A" sourceRef="_116F3C54-A10E-4952-9E08-1CACE74CED0B" targetRef="_834B21EF-9229-44F8-A5DB-D96EBB39A347" />
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram id="_7320242F-3185-4921-89AC-2CAACF8B49BE">
+ <bpmndi:BPMNPlane bpmnElement="hiring" id="_DF10B693-655F-4DA0-9802-ED2D4E31A101">
+ <bpmndi:BPMNShape id="shape__116F3C54-A10E-4952-9E08-1CACE74CED0B" bpmnElement="_116F3C54-A10E-4952-9E08-1CACE74CED0B">
+ <dc:Bounds height="56" width="56" x="860.2" y="86.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__1639F738-45F3-4CD6-A80E-CCEBAA605D56" bpmnElement="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <dc:Bounds height="56" width="56" x="71.99999999999999" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6" bpmnElement="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <dc:Bounds height="102" width="154" x="801" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E" bpmnElement="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E">
+ <dc:Bounds height="102" width="154" x="984.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045" bpmnElement="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <dc:Bounds height="102" width="154" x="162.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__834B21EF-9229-44F8-A5DB-D96EBB39A347" bpmnElement="_834B21EF-9229-44F8-A5DB-D96EBB39A347">
+ <dc:Bounds height="102" width="154" x="811.75" y="197.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B9662806-84F3-4444-AD62-4790CDA7C85D" bpmnElement="_B9662806-84F3-4444-AD62-4790CDA7C85D">
+ <dc:Bounds height="56" width="56" x="1164.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" bpmnElement="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04">
+ <dc:Bounds height="56" width="56" x="343.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7">
+ <dc:Bounds height="56" width="56" x="1164.75" y="392.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__4B7FF147-F096-435B-8CAF-48318EF786B0" bpmnElement="_4B7FF147-F096-435B-8CAF-48318EF786B0">
+ <dc:Bounds height="102" width="154" x="1263.75" y="369.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__457DC13A-0AEC-4390-A860-5CCFFB67B366" bpmnElement="_457DC13A-0AEC-4390-A860-5CCFFB67B366">
+ <dc:Bounds height="56" width="56" x="1468.75" y="392.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" bpmnElement="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A">
+ <dc:Bounds height="102" width="154" x="435.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" bpmnElement="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1">
+ <dc:Bounds height="56" width="56" x="1468.75" y="35.00000000000006" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" bpmnElement="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C">
+ <dc:Bounds height="102" width="154" x="618.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67" bpmnElement="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <dc:Bounds height="102" width="154" x="1263.75" y="12.000000000000057" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge_shape__116F3C54-A10E-4952-9E08-1CACE74CED0B_to_shape__834B21EF-9229-44F8-A5DB-D96EBB39A347" bpmnElement="_7B41F971-C74D-4036-8A5E-EFF81C37986A">
+ <di:waypoint x="888.2" y="114.00000000000006" />
+ <di:waypoint x="888.75" y="248.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__1639F738-45F3-4CD6-A80E-CCEBAA605D56_to_shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045" bpmnElement="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A">
+ <di:waypoint x="99.99999999999999" y="91.00000000000006" />
+ <di:waypoint x="162.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C_to_shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6" bpmnElement="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383">
+ <di:waypoint x="695.75" y="63.00000000000006" />
+ <di:waypoint x="801" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B8C4F63C-81AD-4291-9C1B-84967277EEF6_to_shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E" bpmnElement="_A76C6603-0406-423C-940B-3403948DCA1F">
+ <di:waypoint x="878" y="63.00000000000006" />
+ <di:waypoint x="984.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__8962C15F-55EC-46F7-B926-5D5A1FD8D35E_to_shape__B9662806-84F3-4444-AD62-4790CDA7C85D" bpmnElement="_C62F7EFB-A009-450A-81C7-57D36F0DF766">
+ <di:waypoint x="1138.75" y="63.00000000000006" />
+ <di:waypoint x="1164.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__5BDBE48C-CC83-46A9-9D56-F846F8FC1045_to_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04" bpmnElement="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287">
+ <di:waypoint x="316.75" y="63.00000000000006" />
+ <di:waypoint x="343.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__834B21EF-9229-44F8-A5DB-D96EBB39A347_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9">
+ <di:waypoint x="888.75" y="248.00000000000006" />
+ <di:waypoint x="1164.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B9662806-84F3-4444-AD62-4790CDA7C85D_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E">
+ <di:waypoint x="1192.75" y="91.00000000000006" />
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__B9662806-84F3-4444-AD62-4790CDA7C85D_to_shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67" bpmnElement="_B11455DE-F77A-4251-A85B-4C66636E3CD9">
+ <di:waypoint x="1220.75" y="63.00000000000006" />
+ <di:waypoint x="1263.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04_to_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7" bpmnElement="_C6E61C53-FD35-4347-B69E-30AA93AE4404">
+ <di:waypoint x="371.75" y="91.00000000000006" />
+ <di:waypoint x="371.75" y="420.00000811728415" />
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__A51A809E-03C0-4EA7-91F1-7B3C5E29AD04_to_shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A" bpmnElement="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6">
+ <di:waypoint x="371.75" y="63.00000000000006" />
+ <di:waypoint x="435.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__30C8C01B-4149-4AE5-8D86-D27D57BCA8E7_to_shape__4B7FF147-F096-435B-8CAF-48318EF786B0" bpmnElement="_94172225-E124-4F14-98DA-C3D62C11254A">
+ <di:waypoint x="1192.75" y="420.00000000000006" />
+ <di:waypoint x="1263.75" y="420.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__4B7FF147-F096-435B-8CAF-48318EF786B0_to_shape__457DC13A-0AEC-4390-A860-5CCFFB67B366" bpmnElement="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89">
+ <di:waypoint x="1340.75" y="420.00000000000006" />
+ <di:waypoint x="1545.75" y="392.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_to_shape__57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C" bpmnElement="_9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5">
+ <di:waypoint x="512.75" y="63.00000000000006" />
+ <di:waypoint x="695.75" y="63.00000000000006" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__940F2A0C-8CC6-4ECA-B504-49363AF68B67_to_shape__6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1" bpmnElement="_7DDA574A-C220-4FEF-9784-22EF8052EDEC">
+ <di:waypoint x="1340.75" y="63.00000000000006" />
+ <di:waypoint x="1496.75" y="63.00000000000006" />
+ </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="_1639F738-45F3-4CD6-A80E-CCEBAA605D56">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters elementRef="_B8C4F63C-81AD-4291-9C1B-84967277EEF6">
+ <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="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E">
+ <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="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045">
+ <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="_834B21EF-9229-44F8-A5DB-D96EBB39A347">
+ <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="_4B7FF147-F096-435B-8CAF-48318EF786B0">
+ <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="_F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A">
+ <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="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C">
+ <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="_940F2A0C-8CC6-4ECA-B504-49363AF68B67">
+ <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>_GkSCkOLcED2WTfkvITaMPg</bpmn2:source>
+ <bpmn2:target>_GkSCkOLcED2WTfkvITaMPg</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git a/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java
new file mode 100644
index 0000000000..2df41d5733
--- /dev/null
+++ b/springboot/integration-tests/integration-tests-springboot-usertask-listeners-rollback-it/src/test/java/org/jbpm/usertask/transaction/it/UserTaskTransactionRollbackIT.java
@@ -0,0 +1,140 @@
+/*
+ * 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.jbpm.usertask.transaction.it;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.it.KogitoSpringbootApplication;
+import org.kie.kogito.testcontainers.springboot.PostgreSqlSpringBootTestResource;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.server.LocalServerPort;
+import org.springframework.test.context.ContextConfiguration;
+
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.emptyOrNullString;
+
+/**
+ * Integration test to verify that UserTaskEventListener exceptions cause transaction rollback.
+ *
+ * This test verifies that when a UserTaskEventListener throws an exception during task completion,
+ * the transaction is rolled back and the task remains in its previous state (Reserved instead of Completed).
+ *
+ * The FailingUserTaskEventListener is configured via application.properties with:
+ * app.listener.fail-on-complete=true
+ */
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class)
+@ContextConfiguration(initializers = PostgreSqlSpringBootTestResource.class)
+public class UserTaskTransactionRollbackIT {
+
+ private static final String PROCESS_ID = "hiring";
+ private static final String HIRING_ENDPOINT = "/" + PROCESS_ID;
+ private static final String USER_TASKS_ENDPOINT = "/usertasks/instance";
+ private static final String USER_TASKS_INSTANCE_ENDPOINT = USER_TASKS_ENDPOINT + "/{taskId}";
+ private static final String USER_TASKS_TRANSITION_ENDPOINT = USER_TASKS_INSTANCE_ENDPOINT + "/transition";
+
+ @LocalServerPort
+ int httpPort;
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @BeforeEach
+ void setPort() {
+ RestAssured.port = httpPort;
+ }
+
+ @Test
+ public void testListenerExceptionCausesTransactionRollback() {
+ // 1. Start a hiring process
+ Map<String, Object> candidateData = Map.of(
+ "name", "Jon",
+ "lastName", "Snow",
+ "email", "jon@snow.org",
+ "experience", 5,
+ "skills", List.of("Java", "Kogito"));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .body(Map.of("candidateData", candidateData))
+ .when()
+ .post(HIRING_ENDPOINT)
+ .then()
+ .statusCode(201)
+ .body("id", not(emptyOrNullString()))
+ .extract()
+ .path("id");
+
+ System.out.println("Started process instance with ID: " + processInstanceId);
+
+ // 2. Get the HR Interview task
+ String taskId = given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_ENDPOINT)
+ .then()
+ .statusCode(200)
+ .body("$.size()", is(1))
+ .extract()
+ .path("[0].id");
+
+ // 3. Verify task is in Reserved state
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_INSTANCE_ENDPOINT, taskId)
+ .then()
+ .statusCode(200)
+ .body("status.name", equalTo("Reserved"))
+ .body("taskName", equalTo("HRInterview"));
+
+ // 4. Try to complete the task - FailingUserTaskEventListener will throw exception
+ // The transaction should rollback, returning 500 error
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .body(Map.of("transitionId", "complete", "data", Map.of("approve", true)))
+ .when()
+ .post(USER_TASKS_TRANSITION_ENDPOINT, taskId)
+ .then()
+ .statusCode(500); // Expecting error due to listener exception
+
+ // 5. Verify the task is Still in Reserved state (transaction rolled back)
+ given()
+ .contentType(ContentType.JSON)
+ .queryParam("user", "jdoe")
+ .when()
+ .get(USER_TASKS_INSTANCE_ENDPOINT, taskId)
+ .then()
+ .statusCode(200)
+ .body("status.name", equalTo("Reserved")) // Should still be Reserved, not Completed
+ .body("taskName", equalTo("HRInterview"));
+ }
+}
diff --git a/springboot/integration-tests/pom.xml b/springboot/integration-tests/pom.xml
index 34e53387c3..d39f56167f 100644
--- a/springboot/integration-tests/pom.xml
+++ b/springboot/integration-tests/pom.xml
@@ -43,6 +43,7 @@
<module>integration-tests-springboot-processes-it</module>
<module>integration-tests-springboot-processes-persistence-it</module>
<module>integration-tests-springboot-usertasks-it</module>
+ <module>integration-tests-springboot-usertask-listeners-rollback-it</module>
<module>integration-tests-springboot-wshumantasks-it</module>
</modules>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org