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-examples.git
The following commit(s) were added to refs/heads/main by this push:
new e553034ad [incubator-kie-issues#2154] Process usertasks WS-HumanTask
Lifecycle Example (#2142)
e553034ad is described below
commit e553034ad092e3a947cc84b02266ad619a6b85bd
Author: Deepak Joseph <[email protected]>
AuthorDate: Tue Dec 16 21:49:40 2025 +0530
[incubator-kie-issues#2154] Process usertasks WS-HumanTask Lifecycle
Example (#2142)
* Process usertasks WS-HumanTask Lifecycle Example
* custom lifecycle fixes
---
kogito-quarkus-examples/pom.xml | 1 +
.../travels/usertasks/CustomUserTaskLifeCycle.java | 15 +
.../README.md | 198 +++++++++++++
.../docker-compose.yml | 80 ++++++
.../docker-compose/pgadmin/pgpass | 2 +
.../docker-compose/pgadmin/servers.json | 14 +
.../docker-compose/sql/init.sql | 38 +++
.../docs/images/manager_process.png | Bin 0 -> 6066 bytes
.../images/ws_human_task_usertask_lifecycle.png | Bin 0 -> 162046 bytes
.../mvnw | 310 +++++++++++++++++++++
.../mvnw.cmd | 182 ++++++++++++
.../pom.xml | 214 ++++++++++++++
.../META-INF/processSVG/manager_approval.svg | 1 +
.../src/main/resources/application.properties | 105 +++++++
.../src/main/resources/manager_approval.bpmn | 138 +++++++++
.../travels/usertasks/CustomUserTaskLifeCycle.java | 15 +
16 files changed, 1313 insertions(+)
diff --git a/kogito-quarkus-examples/pom.xml b/kogito-quarkus-examples/pom.xml
index 04b21b10a..81ce22651 100644
--- a/kogito-quarkus-examples/pom.xml
+++ b/kogito-quarkus-examples/pom.xml
@@ -100,6 +100,7 @@
<module>process-usertasks-timer-quarkus</module>
<module>process-usertasks-with-security-oidc-quarkus</module>
<module>process-usertasks-with-security-quarkus</module>
+ <module>process-usertasks-ws-humantask-lifecycle-quarkus</module>
<module>rules-incubation-api-quarkus</module>
<module>rules-legacy-quarkus-example</module>
<module>rules-legacy-scesim-quarkus-example</module>
diff --git
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
index 0bd8682f6..1a5ddd1a6 100644
---
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
+++
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
@@ -94,6 +94,21 @@ public class CustomUserTaskLifeCycle implements
UserTaskLifeCycle {
return transitions.stream().filter(t ->
t.source().equals(userTaskInstance.getStatus())).toList();
}
+ @Override
+ public String startTransition() {
+ return ACTIVATE;
+ }
+
+ @Override
+ public String reassignTransition() {
+ return RELEASE;
+ }
+
+ @Override
+ public String abortTransition() {
+ return SKIP;
+ }
+
@Override
public Optional<UserTaskTransitionToken> transition(UserTaskInstance
userTaskInstance, UserTaskTransitionToken userTaskTransitionToken,
IdentityProvider identityProvider) {
checkPermission(userTaskInstance, identityProvider);
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md
new file mode 100644
index 000000000..5ed3be93d
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md
@@ -0,0 +1,198 @@
+# Process Usertasks orchestration with Web Service-HumanTask Lifecycle
+
+## Description
+
+This example depicts a simple process with a usertask `Manager Approval`. The
usertask lifecycle implementation
+chosen is Web Service-HumanTask Lifecycle(WS-HumanTask) which is based on the
Web Service-HumanTask specification.
+
+This example shows, how to work with WS-HumanTask lifecycle.
+
+<p align="center"><img width=75% height=50%
src="docs/images/manager_process.png"></p>
+
+To enable WS-HumanTask Lifecycle as the default Usertask Lifecycle
implementation, please add below property to the
+application.properties file.
+
+```properties
+kogito.usertasks.lifecycle=ws-human-task
+```
+
+Along with `ws-human-task`, we also support the default lifecycle `kogito` and
`custom` user provided lifecycles.
+
+## Build and run
+
+### Prerequisites
+
+You will need:
+- Java 17+ installed
+- Environment variable JAVA_HOME set accordingly
+- Maven 3.9.6+ installed
+
+### Running in Dev Mode
+
+```sh
+mvn clean package quarkus:dev
+```
+
+NOTE: With dev mode of Quarkus you can take advantage of hot reload for
business assets like processes, rules, decision tables and java code. No need
to redeploy or restart your running application.
+
+### Running as Containers
+
+First, build the example running the following command on a Terminal:
+
+```shell
+mvn clean package -Pcontainer
+```
+
+This will build this example's Quarkus application and create a Docker image
that will be used in the
+`docker-compose` template.
+
+Run the below command to start the entire application:
+
+```shell
+PROJECT_VERSION=999-SNAPSHOT docker compose up
+```
+
+Here we are passing `PROJECT_VERSION` property to identify the image by tag.
+
+### Web Service-HumanTask Lifecycle
+
+The lifecycle diagram of Web Services-HumanTask is given below:
+
+<p style="text-align: center;"><img width=75% height=50%
src="docs/images/ws_human_task_usertask_lifecycle.png"></p>
+
+The current Default Usertask Lifecycle (kogito) lacks full WS-HumanTask
(WS-HT) lifecycle support. This
+implementation supports only a limited subset of WS-HT features. The WS-HT
lifecycle is based on the WS-HumanTask
+[specification](https://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html),
section 4.10 Human Task
+Behavior and State Transitions. Please refer the link for more information.
+
+### Submit a request to start new Manager Approval
+
+To start the process, send a request to
`http://localhost:8080/manager_approval` using below command
+
+Complete curl command can be found below:
+
+```sh
+curl -X POST "http://localhost:8080/manager_approval" \
+ -H "Accept: application/json" \
+ -H "Content-Type: application/json"
+```
+
+### Find pending usertasks
+
+The usertask is assigned to `john` or `dave`. Use below command to fetch the
usertasks:
+
+```sh
+curl -X GET 'http://localhost:8080/usertasks/instance?user=john'
+```
+
+Note the `id` field will be used in the subsequent requests. If we want to
reuse the taskId, export it to a
+variable by running below command:
+
+```sh
+export taskId=$(curl -X GET
'http://localhost:8080/usertasks/instance?user=john' | jq --raw-output
'.[0].id')
+```
+The response also denote that the usertask is currently in `Ready` state. Also
under `metadata`, we could also see
+that the lifecyle the usertask is associated with. In our case it is
`"Lifecycle":"ws-human-task"`
+
+### Find allowed transitions
+
+Let's try to get a list of allowed transitions at this point. For that, please
run below command:
+
+```sh
+curl -X GET
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=john"
+```
+
+### Transitioning usertasks
+
+Let's move the task to `Reserved` state by `claim`ing the task. To do that run:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=john" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "claim"
+ }'
+```
+
+From the response we can see that the usertask has transition from `Ready` to
`Reserved` state. Also, note that the
+usertask is now assigned to an actual owner: `john`
+
+We could use the same GET transitions API to list out the possible transitions.
+
+Let's delegate the task to `mark`. To do that, run the below command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=john" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "delegate",
+ "data": {
+ "DELEGATED_USER": "mark"
+ }
+ }'
+```
+
+Now the task is stilk kept in `Reserved` state, but the actual owner is
changed to `mark`. The user is also added to
+the list of potential owners.
+
+Let's `start` the task. To do that, run the below command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=mark" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "start"
+ }'
+```
+
+Notice that we have started the task as `mark`. Now the task state changes
from `Reserved` to `InProgress`.
+
+If we apply `stop` transition the task moves from `InProgress` to `Reserved`
state. To do that run below command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=mark" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "stop"
+ }'
+```
+
+We could also use `forward` transition which can be used to forward the
usertask to a list of potential users. To do
+that run below command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=mark" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "forward",
+ "data": {
+ "FORWARDED_USERS": ["adam", "carl"]
+ }
+ }'
+```
+
+From the response we could see that the task is transitioned to `Ready` state.
User `mark` is now replaced from the
+list of potential owners with `adam` and `carl`. Also, the actual owner is
removed.
+
+Let's directly `start` the task from `Ready` state by running below command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=adam" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "start"
+ }'
+```
+
+We can apply other terminal transitions also to the usertask. Let's `complete`
the usertask by running the below
+command:
+
+```sh
+curl -X POST
"http://localhost:8080/usertasks/instance/${taskId}/transition?user=adam" \
+ -H "content-type: application/json" \
+ -d '{
+ "transitionId": "complete"
+ }'
+```
+
+Now the process is completed successfully.
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose.yml
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose.yml
new file mode 100644
index 000000000..c4c640677
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose.yml
@@ -0,0 +1,80 @@
+# Copyright IBM Corp. 2025.
+#
+# 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.
+#
+
+services:
+ postgres:
+ container_name: process-usertasks-ws-humantask-lifecycle-quarkus-postgres
+ image: postgres:16.8-alpine3.21
+ ports:
+ - "5432:5432"
+ volumes:
+ - ./docker-compose/sql:/docker-entrypoint-initdb.d:Z
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
+ timeout: 45s
+ interval: 10s
+ retries: 50
+ environment:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+
+ pgadmin:
+ container_name: process-usertasks-ws-humantask-lifecycle-quarkus-pgadmin
+ image: dpage/pgadmin4:9.1
+ ports:
+ - 8055:80
+ depends_on:
+ - postgres
+ volumes:
+ - ./docker-compose/pgadmin/servers.json:/pgadmin4/servers.json
+ - ./docker-compose/pgadmin/pgpass:/pgadmin4/pgpass
+ entrypoint: >
+ /bin/sh -c "
+ cp -f /pgadmin4/pgpass /var/lib/pgadmin/;
+ chmod 600 /var/lib/pgadmin/pgpass;
+ /entrypoint.sh
+ "
+ environment:
+ PGADMIN_DEFAULT_EMAIL: [email protected]
+ PGADMIN_DEFAULT_PASSWORD: pass
+ PGADMIN_CONFIG_SERVER_MODE: "False"
+ PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
+ GUNICORN_ACCESS_LOGFILE: "/dev/null"
+
+ process-usertasks-ws-humantask-lifecycle-quarkus:
+ container_name: process-usertasks-ws-humantask-lifecycle-quarkus
+ image:
dev.local/apache/process-usertasks-ws-humantask-lifecycle-quarkus:${PROJECT_VERSION}
+ ports:
+ - "8080:8080"
+ depends_on:
+ postgres:
+ condition: service_healthy
+ environment:
+ QUARKUS_HTTP_CORS_ORIGINS: "/.*/"
+ QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kie"
+ QUARKUS_DATASOURCE_REACTIVE_URL: "postgresql://postgres:5432/kie"
+ QUARKUS_DATASOURCE_USERNAME: kie-user
+ QUARKUS_DATASOURCE_PASSWORD: kie-pass
+ QUARKUS_DATASOURCE_DB_KIND: postgresql
+ KOGITO_JOBS_SERVICE_URL: http://127.0.0.1:8080
+ KOGITO_SERVICE_URL: http://127.0.0.1:8080
+ KOGITO_DATAINDEX_HTTP_URL: http://127.0.0.1:8080
+ extra_hosts:
+ - "127.0.0.1:host-gateway"
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/pgpass
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/pgpass
new file mode 100644
index 000000000..258eaaadb
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/pgpass
@@ -0,0 +1,2 @@
+postgres:5432:kie:kie-user:kie-pass
+postgres:5432:postgres:kie-user:kie-pass
\ No newline at end of file
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/servers.json
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/servers.json
new file mode 100644
index 000000000..9214b4035
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/pgadmin/servers.json
@@ -0,0 +1,14 @@
+{
+ "Servers": {
+ "1": {
+ "Name": "kie",
+ "Group": "Servers",
+ "Host": "postgres",
+ "Port": 5432,
+ "MaintenanceDB": "kie",
+ "Username": "kie-user",
+ "SSLMode": "disable",
+ "PassFile": "/var/lib/pgadmin/pgpass"
+ }
+ }
+}
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/sql/init.sql
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/sql/init.sql
new file mode 100644
index 000000000..1cd31a126
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docker-compose/sql/init.sql
@@ -0,0 +1,38 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+CREATE ROLE "kie-user" WITH
+ LOGIN
+ SUPERUSER
+ INHERIT
+ CREATEDB
+ CREATEROLE
+ NOREPLICATION
+ PASSWORD 'kie-pass';
+
+CREATE DATABASE kie
+ WITH
+ OWNER = "kie-user"
+ ENCODING = 'UTF8'
+ LC_COLLATE = 'en_US.utf8'
+ LC_CTYPE = 'en_US.utf8'
+ TABLESPACE = pg_default
+ CONNECTION LIMIT = -1;
+
+GRANT ALL PRIVILEGES ON DATABASE postgres TO "kie-user";
+GRANT ALL PRIVILEGES ON DATABASE kie TO "kie-user";
+GRANT ALL PRIVILEGES ON DATABASE kie TO postgres;
\ No newline at end of file
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/manager_process.png
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/manager_process.png
new file mode 100644
index 000000000..812e910fb
Binary files /dev/null and
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/manager_process.png
differ
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/ws_human_task_usertask_lifecycle.png
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/ws_human_task_usertask_lifecycle.png
new file mode 100644
index 000000000..56ef61e33
Binary files /dev/null and
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/docs/images/ws_human_task_usertask_lifecycle.png
differ
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw
new file mode 100755
index 000000000..d2f0ea380
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to
/Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^
]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in
binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ else
+
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD
"$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath"
"$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ];
then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ];
then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader
"$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config")
$MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}"
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw.cmd
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw.cmd
new file mode 100644
index 000000000..b26ab24f0
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM
----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM
----------------------------------------------------------------------------
+
+@REM
----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM
----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd
ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another
setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder
".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto
endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do
set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set
DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN
("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from
Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in
binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET
DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and
[string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object
System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol =
[Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%',
'%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS%
-classpath %WRAPPER_JAR%
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER%
%MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd
ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/pom.xml
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/pom.xml
new file mode 100644
index 000000000..ec3c9ac45
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/pom.xml
@@ -0,0 +1,214 @@
+<?xml version="1.0" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+-->
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.kie.kogito.examples</groupId>
+ <artifactId>kogito-quarkus-examples</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>process-usertasks-ws-humantask-lifecycle-quarkus</artifactId>
+ <name>Kogito Example :: Process Usertasks With Web Service HumanTask
Lifecycle</name>
+ <description>Kogito user tasks orchestration with Web Service HumanTask
life cycle - Quarkus</description>
+
+ <properties>
+ <quarkus-plugin.version>3.20.3</quarkus-plugin.version>
+
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
+ <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
+ <quarkus.platform.version>3.20.3</quarkus.platform.version>
+ <kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
+ <kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
+
<kogito-apps.bom.artifact-id>kogito-apps-bom</kogito-apps.bom.artifact-id>
+ <kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${quarkus.platform.group-id}</groupId>
+ <artifactId>${quarkus.platform.artifact-id}</artifactId>
+ <version>${quarkus.platform.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>${kogito.bom.group-id}</groupId>
+ <artifactId>${kogito.bom.artifact-id}</artifactId>
+ <version>${kogito.bom.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>${kogito.bom.group-id}</groupId>
+ <artifactId>${kogito-apps.bom.artifact-id}</artifactId>
+ <version>${kogito.bom.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>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-openapi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-health</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-with-drools-quarkus</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-process-management</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-jobs-management</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-process-svg</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-source-files</artifactId>
+ </dependency>
+
+ <!-- Persistence -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+
+ <!-- Data-Index Addon -->
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ </dependency>
+
+ <!-- Jobs Service -->
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-jobs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>jobs-service-storage-jpa</artifactId>
+ </dependency>
+
+ <!-- Data Audit -->
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-audit-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-audit</artifactId>
+ </dependency>
+
+ <!-- User Task persistence -->
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-addons-quarkus-usertask-storage-jpa</artifactId>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>container</id>
+ <properties>
+ <quarkus.profile>container</quarkus.profile>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-container-image-jib</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-postgresql</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>dev</id>
+ <properties>
+ <quarkus.profile>dev</quarkus.profile>
+ </properties>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>${quarkus.platform.group-id}</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${quarkus-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/META-INF/processSVG/manager_approval.svg
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/META-INF/processSVG/manager_approval.svg
new file mode 100644
index 000000000..a5936b0d1
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/META-INF/processSVG/manager_approval.svg
@@ -0,0 +1 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="738" height="473" viewBox="0
0 738 473"><defs/><g transform="matrix(1,0,0,1,0,0)"><g><g><g><path fill="none"
stroke="#d3d3d3" paint-order="fill stroke markers" d=" M 0 0 L 1200 0"
stroke-miterlimit="10" stroke-opacity="0.8" stroke-dasharray="5"/></g><g><path
fill="none" stroke="#d3d3d3" paint-order="fill stroke markers" d=" M 0 0 L 0
800" stroke-miterlimit="10" stroke-opacity="0.8" str [...]
\ No newline at end of file
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/application.properties
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/application.properties
new file mode 100644
index 000000000..e797956ee
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/application.properties
@@ -0,0 +1,105 @@
+#
+# 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.
+#
+
+###############
+# Persistence #
+###############
+
+# Apache KIE provides a separate Flyway subsystem that allows Kogito's
internal tables to be created and migrated
+# without interfering with your application's Flyway, if you're using it.
+#
+# This property enables running this isolated Flyway mechanism automatically
when the application starts.
+# If you want more control over when/how/who executes changes to your
database, disable it and run the SQL scripts manually.
+kie.flyway.enabled=true
+
+# Tells the Kogito runtime what kind of persistence is configured.
+kogito.persistence.type=jdbc
+
+# Default DS
+quarkus.datasource.db-kind=postgresql
+quarkus.datasource.username=kie-user
+quarkus.datasource.password=kie-pass
+quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:postgresql://0.0.0.0:5432/kie}
+quarkus.datasource.reactive.url=${QUARKUS_DATASOURCE_REACTIVE_URL:postgresql://0.0.0.0:5432/kie}
+
+# Development DS
+%dev.quarkus.datasource.db-kind=h2
+%dev.quarkus.datasource.username=kie
+%dev.quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
+
+# Disabling Hibernate schema generation
+quarkus.hibernate-orm.database.generation=none
+quarkus.hibernate-orm.validate-in-dev-mode=false
+
+############
+# Security #
+############
+
+# Keeping it disabled for simplicity.
+
+quarkus.oidc.enabled=false
+kogito.auth.enabled=false
+
+####################
+# Containerization #
+####################
+
+# Profile to pack this example into a container image.
+# To use it run a Maven build with the `container` profile (-Pcontainer)
+
+%container.quarkus.container-image.build=true
+%container.quarkus.container-image.push=false
+%container.quarkus.container-image.group=apache
+%container.quarkus.container-image.registry=dev.local
+%container.quarkus.container-image.tag=${project.version}
+%container.quarkus.container-image.name=process-usertasks-ws-humantask-lifecycle-quarkus
+
+############
+# Services #
+############
+
+# These properties are residual from Distributed Architecture, where
Data-Index, Data-Audit,
+# and Jobs Service are external to the Kogito Runtime application.
+#
+# They are still necessary, but won't be anymore in future releases.
+
+kogito.service.url=http://0.0.0.0:8080
+kogito.jobs-service.url=http://0.0.0.0:8080
+kogito.data-index.url=http://0.0.0.0:8080
+
+###############
+# Development #
+###############
+
+# Swagger Dev UI configuration.
+# More at https://quarkus.io/guides/openapi-swaggerui
+
+quarkus.http.cors=true
+quarkus.http.cors.origins=*
+quarkus.dev-ui.cors.enabled=false
+quarkus.smallrye-openapi.path=/docs/openapi.json
+quarkus.http.test-port=0
+quarkus.swagger-ui.always-include=true
+quarkus.kogito.data-index.graphql.ui.always-include=true
+
+# Disable Dev services
+quarkus.kogito.devservices.enabled=false
+
+# Usertasks Lifecycle Implementation
+kogito.usertasks.lifecycle=ws-human-task
diff --git
a/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/manager_approval.bpmn
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/manager_approval.bpmn
new file mode 100644
index 000000000..acea4bf89
--- /dev/null
+++
b/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/src/main/resources/manager_approval.bpmn
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="_y0aX0LFyED6Ae9W0xNKSNg"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www. [...]
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_PriorityInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_CommentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_DescriptionInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_CreatedByInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_GroupIdInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_ContentInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_NotStartedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_NotCompletedReassignInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_NotStartedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_NotCompletedNotifyInputXItem"
structureRef="Object"/>
+ <bpmn2:itemDefinition
id="__9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputXItem"
structureRef="String"/>
+ <bpmn2:collaboration id="_C6B45EE5-E0E6-4AE5-BD62-C42962A610C5"
name="Default Collaboration">
+ <bpmn2:participant id="_943D59E2-682F-4AC1-B1B3-AE333BBA8B77" name="Pool
Participant" processRef="manager_approval"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="manager_approval" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="manager_approval"
isExecutable="true" processType="Public">
+ <bpmn2:sequenceFlow id="_83BF2651-5518-45E0-886E-95441CA99F67"
sourceRef="_9A250209-CB4E-476F-B39F-E269EA31D4E0"
targetRef="_ADC02793-8CF3-4E11-95DD-3C8649DABDDC"/>
+ <bpmn2:sequenceFlow id="_811931F2-2E40-4D08-8C67-9DC6A28F9B20"
sourceRef="_6FED8BB3-C2EB-4518-BA08-8A94B9958644"
targetRef="_9A250209-CB4E-476F-B39F-E269EA31D4E0"/>
+ <bpmn2:endEvent id="_ADC02793-8CF3-4E11-95DD-3C8649DABDDC">
+ <bpmn2:incoming>_83BF2651-5518-45E0-886E-95441CA99F67</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:userTask id="_9A250209-CB4E-476F-B39F-E269EA31D4E0" name="Manager
Approval">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Manager Approval]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_811931F2-2E40-4D08-8C67-9DC6A28F9B20</bpmn2:incoming>
+ <bpmn2:outgoing>_83BF2651-5518-45E0-886E-95441CA99F67</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputX" drools:dtype="Object"
itemSubjectRef="__9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputXItem"
name="TaskName"/>
+ <bpmn2:dataInput id="_9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputX"
drools:dtype="String"
itemSubjectRef="__9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputXItem"
name="name"/>
+ <bpmn2:dataInput
id="_9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputX"
drools:dtype="Object"
itemSubjectRef="__9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputXItem"
name="Skippable"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[Task]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_9A250209-CB4E-476F-B39F-E269EA31D4E0_TaskNameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[name]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_9A250209-CB4E-476F-B39F-E269EA31D4E0_nameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[true]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_9A250209-CB4E-476F-B39F-E269EA31D4E0_SkippableInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:potentialOwner id="_y0bl8LFyED6Ae9W0xNKSNg">
+ <bpmn2:resourceAssignmentExpression id="_y0bl8bFyED6Ae9W0xNKSNg">
+ <bpmn2:formalExpression>john</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ <bpmn2:potentialOwner id="_y0bl8rFyED6Ae9W0xNKSNg">
+ <bpmn2:resourceAssignmentExpression id="_y0bl87FyED6Ae9W0xNKSNg">
+ <bpmn2:formalExpression>dave</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:startEvent id="_6FED8BB3-C2EB-4518-BA08-8A94B9958644">
+ <bpmn2:outgoing>_811931F2-2E40-4D08-8C67-9DC6A28F9B20</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="manager_approval">
+ <bpmndi:BPMNShape id="shape__6FED8BB3-C2EB-4518-BA08-8A94B9958644"
bpmnElement="_6FED8BB3-C2EB-4518-BA08-8A94B9958644">
+ <dc:Bounds height="56" width="56" x="297" y="344"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__9A250209-CB4E-476F-B39F-E269EA31D4E0"
bpmnElement="_9A250209-CB4E-476F-B39F-E269EA31D4E0">
+ <dc:Bounds height="102" width="154" x="413" y="321"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__ADC02793-8CF3-4E11-95DD-3C8649DABDDC"
bpmnElement="_ADC02793-8CF3-4E11-95DD-3C8649DABDDC">
+ <dc:Bounds height="56" width="56" x="632" y="344"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__6FED8BB3-C2EB-4518-BA08-8A94B9958644_to_shape__9A250209-CB4E-476F-B39F-E269EA31D4E0"
bpmnElement="_811931F2-2E40-4D08-8C67-9DC6A28F9B20">
+ <di:waypoint x="325" y="372"/>
+ <di:waypoint x="490" y="372"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__9A250209-CB4E-476F-B39F-E269EA31D4E0_to_shape__ADC02793-8CF3-4E11-95DD-3C8649DABDDC"
bpmnElement="_83BF2651-5518-45E0-886E-95441CA99F67">
+ <di:waypoint x="490" y="372"/>
+ <di:waypoint x="660" y="372"/>
+ </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="_6FED8BB3-C2EB-4518-BA08-8A94B9958644">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_9A250209-CB4E-476F-B39F-E269EA31D4E0">
+ <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>_y0aX0LFyED6Ae9W0xNKSNg</bpmn2:source>
+ <bpmn2:target>_y0aX0LFyED6Ae9W0xNKSNg</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
index ab6c2c3a5..9bd69f8d6 100644
---
a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
+++
b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
@@ -93,6 +93,21 @@ public class CustomUserTaskLifeCycle implements
UserTaskLifeCycle {
return transitions.stream().filter(t ->
t.source().equals(userTaskInstance.getStatus())).toList();
}
+ @Override
+ public String startTransition() {
+ return ACTIVATE;
+ }
+
+ @Override
+ public String reassignTransition() {
+ return RELEASE;
+ }
+
+ @Override
+ public String abortTransition() {
+ return SKIP;
+ }
+
@Override
public Optional<UserTaskTransitionToken> transition(UserTaskInstance
userTaskInstance, UserTaskTransitionToken userTaskTransitionToken,
IdentityProvider identityProvider) {
checkPermission(userTaskInstance, identityProvider);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]