target variable are used to configure {@link AbstractTaskMessageSend} activities for
- * sending Task resource messages
+ * Values from the target variable are used to configure
+ * {@link dev.dsf.bpe.v1.activity.AbstractTaskMessageSend} activities for sending Task resource messages
*
- * @see Variables#createTarget(String, String, String, String)
- * @see Variables#createTarget(String, String, String)
- * @see Variables#setTarget(dev.dsf.bpe.v1.variables.Target)
- * @see Variables#getTarget()
+ * @see dev.dsf.bpe.v1.variables.Variables#createTarget(String, String, String, String)
+ * @see dev.dsf.bpe.v1.variables.Variables#createTarget(String, String, String)
+ * @see dev.dsf.bpe.v1.variables.Variables#setTarget(dev.dsf.bpe.v1.variables.Target)
+ * @see dev.dsf.bpe.v1.variables.Variables#getTarget()
*/
public static final String TARGET = "target";
@@ -45,10 +43,10 @@ private BpmnExecutionVariables()
* The targets variable is typically used to iterate over {@link Target} variables in multi instance
* send/receive tasks or multi instance subprocesses
*
- * @see Variables#createTargets(java.util.List)
- * @see Variables#createTargets(dev.dsf.bpe.v1.variables.Target...)
- * @see Variables#setTargets(dev.dsf.bpe.v1.variables.Targets)
- * @see Variables#getTargets()
+ * @see dev.dsf.bpe.v1.variables.Variables#createTargets(java.util.List)
+ * @see dev.dsf.bpe.v1.variables.Variables#createTargets(dev.dsf.bpe.v1.variables.Target...)
+ * @see dev.dsf.bpe.v1.variables.Variables#setTargets(dev.dsf.bpe.v1.variables.Targets)
+ * @see dev.dsf.bpe.v1.variables.Variables#getTargets()
*/
public static final String TARGETS = "targets";
@@ -63,10 +61,10 @@ private BpmnExecutionVariables()
/**
* Value of the alternativeBusinessKey variable is used to correlated incoming Task resource to a
* waiting process instance if an alternative business-key was created for a communication target. See corresponding
- * protected method in {@link AbstractTaskMessageSend} on how to create and use an alternative
- * business-key.
+ * protected method in {@link dev.dsf.bpe.v1.activity.AbstractTaskMessageSend} on how to create and use
+ * an alternative business-key.
*
- * @see AbstractTaskMessageSend
+ * @see dev.dsf.bpe.v1.activity.AbstractTaskMessageSend
*/
public static final String ALTERNATIVE_BUSINESS_KEY = "alternativeBusinessKey";
}
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/constants/CodeSystems.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/constants/CodeSystems.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/constants/CodeSystems.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/constants/CodeSystems.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/constants/NamingSystems.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/constants/NamingSystems.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/constants/NamingSystems.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/constants/NamingSystems.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/documentation/ProcessDocumentation.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/documentation/ProcessDocumentation.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/documentation/ProcessDocumentation.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/documentation/ProcessDocumentation.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/EndpointProvider.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/EndpointProvider.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/EndpointProvider.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/EndpointProvider.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/FhirWebserviceClientProvider.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/FhirWebserviceClientProvider.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/FhirWebserviceClientProvider.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/FhirWebserviceClientProvider.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/MailService.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/MailService.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/MailService.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/MailService.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/OrganizationProvider.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/OrganizationProvider.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/OrganizationProvider.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/OrganizationProvider.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/QuestionnaireResponseHelper.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/QuestionnaireResponseHelper.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/QuestionnaireResponseHelper.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/QuestionnaireResponseHelper.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/TaskHelper.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/TaskHelper.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/service/TaskHelper.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/service/TaskHelper.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Target.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Target.java
similarity index 92%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Target.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Target.java
index f85d6b44a..67f73b18a 100644
--- a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Target.java
+++ b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Target.java
@@ -15,12 +15,10 @@
*/
package dev.dsf.bpe.v1.variables;
-import dev.dsf.bpe.v1.constants.BpmnExecutionVariables;
-
/**
* Specifies a communication target for FHIR Task resources.
*
- * @see BpmnExecutionVariables#TARGET
+ * @see dev.dsf.bpe.v1.constants.BpmnExecutionVariables#TARGET
* @see Variables#createTarget(String, String, String, String)
* @see Variables#createTarget(String, String, String)
* @see Targets
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Targets.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Targets.java
similarity index 95%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Targets.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Targets.java
index ae2448d2f..c0115fcfa 100644
--- a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/bpe/v1/variables/Targets.java
+++ b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/bpe/v1/variables/Targets.java
@@ -18,12 +18,10 @@
import java.util.Collection;
import java.util.List;
-import dev.dsf.bpe.v1.constants.BpmnExecutionVariables;
-
/**
* Specifies a list of communication targets for FHIR Task resources.
*
- * @see BpmnExecutionVariables#TARGETS
+ * @see dev.dsf.bpe.v1.constants.BpmnExecutionVariables#TARGETS
* @see Variables#createTargets(List)
* @see Variables#createTargets(Target...)
* @see Target
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/DsfOpenIdCredentials.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/DsfOpenIdCredentials.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/DsfOpenIdCredentials.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/DsfOpenIdCredentials.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/DsfRole.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/DsfRole.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/DsfRole.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/DsfRole.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/Identity.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/Identity.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/Identity.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/Identity.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/OrganizationIdentity.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/OrganizationIdentity.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/OrganizationIdentity.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/OrganizationIdentity.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/PractitionerIdentity.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/PractitionerIdentity.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/common/auth/conf/PractitionerIdentity.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/common/auth/conf/PractitionerIdentity.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/All.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/All.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/All.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/All.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Organization.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Organization.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Organization.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Organization.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelper.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelper.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelper.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelper.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelperImpl.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelperImpl.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelperImpl.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/ProcessAuthorizationHelperImpl.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Recipient.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Recipient.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Recipient.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Recipient.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Requester.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Requester.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Requester.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Requester.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Role.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Role.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/Role.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/Role.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/WithAuthorization.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/WithAuthorization.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/process/WithAuthorization.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/process/WithAuthorization.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/read/ReadAccessHelper.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/read/ReadAccessHelper.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/authorization/read/ReadAccessHelper.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/authorization/read/ReadAccessHelper.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/BasicFhirWebserviceClient.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/BasicFhirWebserviceClient.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/BasicFhirWebserviceClient.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/BasicFhirWebserviceClient.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/FhirWebserviceClient.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/FhirWebserviceClient.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/FhirWebserviceClient.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/FhirWebserviceClient.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnMinimal.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnMinimal.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnMinimal.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnMinimal.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnMinimalWithRetry.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnMinimalWithRetry.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnMinimalWithRetry.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnMinimalWithRetry.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnOutcome.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnOutcome.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnOutcome.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnOutcome.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnOutcomeWithRetry.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnOutcomeWithRetry.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnOutcomeWithRetry.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnOutcomeWithRetry.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnResource.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnResource.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/PreferReturnResource.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/PreferReturnResource.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/RetryClient.java b/dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/RetryClient.java
similarity index 100%
rename from dsf-bpe/dsf-bpe-process-api-v1/src/main/java/dev/dsf/fhir/client/RetryClient.java
rename to dsf-bpe/dsf-bpe-process-api-v1-base/src/main/java/dev/dsf/fhir/client/RetryClient.java
diff --git a/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml b/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml
index badea9901..abe5b4941 100644
--- a/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml
+++ b/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml
@@ -39,7 +39,7 @@
+ * Configure BPMN service tasks with an implementation of type 'Java class' with the fully qualified class name of the + * class extending this abstract implementation. + *
+ * Configure your service task implementation as a {@link Bean} in your spring {@link Configuration} class with scope
+ *
+ * Configure BPMN message send tasks, intermediate message throw events and message end event with an implementation of
+ * type 'Java class' with the fully qualified class name of the class extending this abstract implementation.
+ *
+ * Configure your service task implementation as a {@link Bean} in your spring {@link Configuration} class with scope
+ *
+ * Override this method to use a different mechanism for retrieving the value for instantiatesCanonical. For
+ * example via a process variable. Note: A non empty value e.g 'disable' still needs to be injected in the BPMN file
+ * in order to comply with the validation performed during plugin loading.
+ *
+ * @param execution
+ * not
+ * Override this method to use a different mechanism for retrieving the value for messageName. For example via a
+ * process variable. Note: A non empty value e.g 'disable' still needs to be injected in the BPMN file in order to
+ * comply with the validation performed during plugin loading.
+ *
+ * @param execution
+ * not
+ * Override this method to use a different mechanism for retrieving the value for profile. For example via a
+ * process variable. Note: A non empty value e.g 'disable' still needs to be injected in the BPMN file in order to
+ * comply with the validation performed during plugin loading.
+ *
+ * @param execution
+ * not
+ * Use this method in combination with overriding
+ * {@link #sendTask(DelegateExecution, Variables, Target, String, String, String, String, Stream)} to use an
+ * alternative business-key with the communication target.
+ *
+ *
+ *
+ *
+ * @param execution
+ * not
+ * BPMN user tasks need to define the form to be used with type 'Embedded or External Task Forms' and the canonical URL
+ * of the a {@link Questionnaire} resource as the form key.
+ *
+ * To modify the behavior of the listener, for example to set default values in the created 'in-progress'
+ * {@link QuestionnaireResponse}, extend this class, register it as a prototype {@link Bean} and specify the class name
+ * as a task listener with event type 'create' in the BPMN.
+ */
+public class DefaultUserTaskListener implements TaskListener, InitializingBean
+{
+ private static final Logger logger = LoggerFactory.getLogger(DefaultUserTaskListener.class);
+
+ private final ProcessPluginApi api;
+
+ /**
+ * @param api
+ * not
+ * A not
+ * A not "prototype".
+ *
+ * @see ProcessPluginDefinition#getSpringConfigurations()
+ */
+public abstract class AbstractServiceDelegate implements JavaDelegate, InitializingBean
+{
+ private static final Logger logger = LoggerFactory.getLogger(AbstractServiceDelegate.class);
+
+ protected final ProcessPluginApi api;
+
+ /**
+ * @param api
+ * not null
+ */
+ public AbstractServiceDelegate(ProcessPluginApi api)
+ {
+ this.api = api;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception
+ {
+ Objects.requireNonNull(api, "api");
+ }
+
+ @Override
+ public final void execute(DelegateExecution execution) throws Exception
+ {
+ final Variables variables = api.getVariables(execution);
+
+ try
+ {
+ logger.trace("Execution of task with id='{}'", execution.getCurrentActivityId());
+
+ doExecute(execution, variables);
+ }
+ // Error boundary event, do not stop process execution
+ catch (BpmnError error)
+ {
+ logger.debug("Error while executing service delegate {}", getClass().getName(), error);
+ logger.error(
+ "Process {} encountered error boundary event in step {} for task {}, error-code: {}, message: {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()), error.getErrorCode(),
+ error.getMessage());
+
+ throw error;
+ }
+ // Not an error boundary event, stop process execution
+ catch (Exception exception)
+ {
+ logger.debug("Error while executing service delegate {}", getClass().getName(), exception);
+ logger.error("Process {} has fatal error in step {} for task {}, reason: {} - {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()),
+ exception.getClass().getName(), exception.getMessage());
+
+ String errorMessage = "Process " + execution.getProcessDefinitionId() + " has fatal error in step "
+ + execution.getActivityInstanceId() + ", reason: " + exception.getMessage();
+
+ updateFailedIfInprogress(variables.getTasks(), errorMessage);
+
+ // TODO evaluate throwing exception as alternative to stopping the process instance
+ execution.getProcessEngine().getRuntimeService().deleteProcessInstance(execution.getProcessInstanceId(),
+ exception.getMessage());
+ }
+ }
+
+ /**
+ * Implement this method to execute custom business logic within BPMN service tasks.
+ *
+ * @param execution
+ * Process instance information and variables
+ * @param variables
+ * DSF process variables
+ * @throws BpmnError
+ * Thrown when an error boundary event should be called
+ * @throws Exception
+ * Uncaught exceptions thrown by this method will result in Task status failed for all current
+ * in-progress Task resource with the exception message added as an error output. An exception
+ * (not {@link BpmnError}) thrown by this method will also result in the process instance stopping
+ * execution and being deleted.
+ */
+ protected abstract void doExecute(DelegateExecution execution, Variables variables) throws BpmnError, Exception;
+
+ private void updateFailedIfInprogress(List
+ *
+ * "prototype".
+ *
+ * @see ProcessPluginDefinition#getSpringConfigurations()
+ */
+public abstract class AbstractTaskMessageSend implements JavaDelegate, InitializingBean
+{
+ private static final Logger logger = LoggerFactory.getLogger(AbstractTaskMessageSend.class);
+
+ protected final ProcessPluginApi api;
+
+ // set via field injection
+ private FixedValue instantiatesCanonical;
+ private FixedValue messageName;
+ private FixedValue profile;
+
+ /**
+ * @param api
+ * not null
+ */
+ public AbstractTaskMessageSend(ProcessPluginApi api)
+ {
+ this.api = api;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception
+ {
+ Objects.requireNonNull(api, "api");
+ }
+
+ /**
+ * @param instantiatesCanonical
+ * not null
+ * @deprecated only for process engine field injection
+ */
+ @Deprecated
+ public final void setInstantiatesCanonical(FixedValue instantiatesCanonical)
+ {
+ this.instantiatesCanonical = instantiatesCanonical;
+ }
+
+ /**
+ * Retrieves the instantiatesCanonical value used for Task resources send by this class via the injected field
+ * instantiatesCanonical.
+ * null
+ * @param variables
+ * not null
+ * @return instantiatesCanonical value used for Task resources send by this class
+ */
+ protected String getInstantiatesCanonical(DelegateExecution execution, Variables variables)
+ {
+ return instantiatesCanonical == null ? null : instantiatesCanonical.getExpressionText();
+ }
+
+ /**
+ * @param messageName
+ * not null
+ * @deprecated only for process engine field injection
+ */
+ @Deprecated
+ public final void setMessageName(FixedValue messageName)
+ {
+ this.messageName = messageName;
+ }
+
+ /**
+ * Retrieves the messageName value used for Task resources send by this class via the injected field
+ * messageName.
+ * null
+ * @param variables
+ * not null
+ * @return messageName value used for Task resources send by this class
+ */
+ protected String getMessageName(DelegateExecution execution, Variables variables)
+ {
+ return messageName == null ? null : messageName.getExpressionText();
+ }
+
+ /**
+ * @param profile
+ * not null
+ * @deprecated only for process engine field injection
+ */
+ @Deprecated
+ public final void setProfile(FixedValue profile)
+ {
+ this.profile = profile;
+ }
+
+ /**
+ * Retrieves the profile value used for Task resources send by this class via the injected field profile.
+ * null
+ * @param variables
+ * not null
+ * @return profile value used for Task resources send by this class
+ */
+ protected String getProfile(DelegateExecution execution, Variables variables)
+ {
+ return profile == null ? null : profile.getExpressionText();
+ }
+
+ @Override
+ public final void execute(DelegateExecution execution) throws Exception
+ {
+ doExecute(execution, api.getVariables(execution));
+ }
+
+ protected void doExecute(DelegateExecution execution, Variables variables) throws Exception
+ {
+ final String instantiatesCanonical = getInstantiatesCanonical(execution, variables);
+ final String messageName = getMessageName(execution, variables);
+ final String profile = getProfile(execution, variables);
+ final String businessKey = execution.getBusinessKey();
+ final Target target = variables.getTarget();
+
+ try
+ {
+ sendTask(execution, variables, target, instantiatesCanonical, messageName, businessKey, profile,
+ getAdditionalInputParameters(execution, variables));
+ }
+ catch (Exception e)
+ {
+ String exceptionMessage = e.getMessage();
+ if (e instanceof WebApplicationException w && (e.getMessage() == null || e.getMessage().isBlank()))
+ {
+ StatusType statusInfo = w.getResponse().getStatusInfo();
+ exceptionMessage = statusInfo.getStatusCode() + " " + statusInfo.getReasonPhrase();
+ }
+
+ logger.debug("Error while sending Task", e);
+ String errorMessage = "Task " + instantiatesCanonical + " send failed [recipient: "
+ + target.getOrganizationIdentifierValue() + ", endpoint: " + target.getEndpointIdentifierValue()
+ + ", businessKey: " + businessKey
+ + (target.getCorrelationKey() == null ? "" : ", correlationKey: " + target.getCorrelationKey())
+ + ", message: " + messageName + ", error: " + e.getClass().getName() + " - " + exceptionMessage
+ + "]";
+ logger.warn(errorMessage);
+
+ if (execution.getBpmnModelElementInstance() instanceof IntermediateThrowEvent)
+ handleIntermediateThrowEventError(execution, variables, e, errorMessage);
+ else if (execution.getBpmnModelElementInstance() instanceof EndEvent)
+ handleEndEventError(execution, variables, e, errorMessage);
+ else if (execution.getBpmnModelElementInstance() instanceof SendTask)
+ handleSendTaskError(execution, variables, e, errorMessage);
+ else
+ logger.warn("Error handling for {} not implemented",
+ execution.getBpmnModelElementInstance().getClass().getName());
+ }
+ }
+
+ protected void handleIntermediateThrowEventError(DelegateExecution execution, Variables variables,
+ Exception exception, String errorMessage)
+ {
+ logger.debug("Error while executing Task message send {}", getClass().getName(), exception);
+ logger.error("Process {} has fatal error in step {} for task {}, reason: {} - {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()),
+ exception.getClass().getName(), exception.getMessage());
+
+ updateFailedIfInprogress(variables.getTasks(), errorMessage);
+
+ execution.getProcessEngine().getRuntimeService().deleteProcessInstance(execution.getProcessInstanceId(),
+ exception.getMessage());
+ }
+
+ protected void handleEndEventError(DelegateExecution execution, Variables variables, Exception exception,
+ String errorMessage)
+ {
+ logger.debug("Error while executing Task message send {}", getClass().getName(), exception);
+ logger.error("Process {} has fatal error in step {} for task {}, reason: {} - {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()),
+ exception.getClass().getName(), exception.getMessage());
+
+ updateFailedIfInprogress(variables.getTasks(), errorMessage);
+
+ // End event: No need to delete process instance
+ }
+
+ protected void handleSendTaskError(DelegateExecution execution, Variables variables, Exception exception,
+ String errorMessage)
+ {
+ Targets targets = variables.getTargets();
+
+ // if we are a multi instance message send task, remove target
+ if (targets != null && !targets.isEmpty())
+ {
+ Target target = variables.getTarget();
+ targets = targets.removeByEndpointIdentifierValue(target);
+ variables.setTargets(targets);
+
+ addErrorIfInprogress(variables.getTasks(), errorMessage);
+
+ logger.debug("Target organization {}, endpoint {} with error {} removed from target list",
+ target.getOrganizationIdentifierValue(), target.getEndpointIdentifierValue(),
+ exception.getMessage());
+ }
+
+ // if we are not a multi instance message send task or all sends have failed (targets emtpy)
+ else
+ {
+ logger.debug("Error while executing Task message send {}", getClass().getName(), exception);
+ logger.error("Process {} has fatal error in step {} for task {}, last reason: {} - {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()),
+ exception.getClass().getName(), exception.getMessage());
+
+ updateFailedIfInprogress(variables.getTasks(), errorMessage);
+
+ execution.getProcessEngine().getRuntimeService().deleteProcessInstance(execution.getProcessInstanceId(),
+ exception.getMessage());
+ }
+ }
+
+ private void addErrorIfInprogress(List
+ * @Override
+ * protected void sendTasksendTask(DelegateExecution execution, Variables variables, Target target,
+ * String instantiatesCanonical, String messageName, String businessKey, String profile,
+ * Stream<ParameterComponent> additionalInputParameters)
+ * {
+ * String alternativeBusinesKey = createAndSaveAlternativeBusinessKey();
+ * super.sendTask(execution, target, instantiatesUri, messageName, alternativeBusinesKey, profile,
+ * additionalInputParameters);
+ * }
+ *
+ *
+ * Return tasks from the target using the alternative business-key will correlate with this process instance.
+ * null
+ * @return the alternative business-key stored as variable {@link BpmnExecutionVariables#ALTERNATIVE_BUSINESS_KEY}
+ * @see Variables#setAlternativeBusinessKey(String)
+ */
+ protected final String createAndSaveAlternativeBusinessKey(DelegateExecution execution, Variables variables)
+ {
+ String alternativeBusinessKey = UUID.randomUUID().toString();
+ variables.setAlternativeBusinessKey(alternativeBusinessKey);
+ return alternativeBusinessKey;
+ }
+
+ /**
+ * @param execution
+ * not null
+ * @param variables
+ * not null
+ * @param target
+ * not null
+ * @param instantiatesCanonical
+ * not null, not empty
+ * @param messageName
+ * not null, not empty
+ * @param businessKey
+ * not null, not empty
+ * @param profile
+ * not null, not empty
+ * @param additionalInputParameters
+ * may be null
+ */
+ protected void sendTask(DelegateExecution execution, Variables variables, Target target,
+ String instantiatesCanonical, String messageName, String businessKey, String profile,
+ Stream
+ *
+ *
+ * @param client
+ * not
+ * @Override
+ * protected void doSend(FhirWebserviceClient client, Task task)
+ * {
+ * client.withMinimalReturn().withRetry(2).create(task);
+ * }
+ *
+ * null
+ * @param task
+ * not null
+ * @return id of created task
+ */
+ protected IdType doSend(FhirWebserviceClient client, Task task)
+ {
+ return client.withMinimalReturn().create(task);
+ }
+
+ protected Reference getRecipient(Target target)
+ {
+ return new Reference().setType(ResourceType.Organization.name())
+ .setIdentifier(OrganizationIdentifier.withValue(target.getOrganizationIdentifierValue()));
+ }
+
+ protected Reference getRequester()
+ {
+ return new Reference().setType(ResourceType.Organization.name())
+ .setIdentifier(api.getOrganizationProvider().getLocalOrganizationIdentifier()
+ .orElseThrow(() -> new IllegalStateException("Local organization identifier unknown")));
+ }
+}
diff --git a/dsf-bpe/dsf-bpe-process-api-v1-operaton/src/main/java/dev/dsf/bpe/v1/activity/DefaultUserTaskListener.java b/dsf-bpe/dsf-bpe-process-api-v1-operaton/src/main/java/dev/dsf/bpe/v1/activity/DefaultUserTaskListener.java
new file mode 100644
index 000000000..04b9c7e49
--- /dev/null
+++ b/dsf-bpe/dsf-bpe-process-api-v1-operaton/src/main/java/dev/dsf/bpe/v1/activity/DefaultUserTaskListener.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright 2018-2025 Heilbronn University of Applied Sciences
+ *
+ * Licensed 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 dev.dsf.bpe.v1.activity;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import org.hl7.fhir.r4.model.Bundle;
+import org.hl7.fhir.r4.model.CodeableConcept;
+import org.hl7.fhir.r4.model.Questionnaire;
+import org.hl7.fhir.r4.model.QuestionnaireResponse;
+import org.hl7.fhir.r4.model.Reference;
+import org.hl7.fhir.r4.model.ResourceType;
+import org.hl7.fhir.r4.model.StringType;
+import org.hl7.fhir.r4.model.Task;
+import org.hl7.fhir.r4.model.Task.TaskOutputComponent;
+import org.hl7.fhir.r4.model.Task.TaskStatus;
+import org.hl7.fhir.r4.model.Type;
+import org.operaton.bpm.engine.delegate.DelegateExecution;
+import org.operaton.bpm.engine.delegate.DelegateTask;
+import org.operaton.bpm.engine.delegate.TaskListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.annotation.Bean;
+
+import dev.dsf.bpe.v1.ProcessPluginApi;
+import dev.dsf.bpe.v1.constants.CodeSystems.BpmnMessage;
+import dev.dsf.bpe.v1.constants.CodeSystems.BpmnUserTask;
+import dev.dsf.bpe.v1.variables.Variables;
+
+/**
+ * Default {@link TaskListener} implementation. This listener will be added to user tasks if no other
+ * {@link TaskListener} is defined for the 'create' event type.
+ * null
+ */
+ public DefaultUserTaskListener(ProcessPluginApi api)
+ {
+ this.api = api;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception
+ {
+ Objects.requireNonNull(api, "api");
+ }
+
+ @Override
+ public final void notify(DelegateTask userTask)
+ {
+ final DelegateExecution execution = userTask.getExecution();
+ final Variables variables = api.getVariables(execution);
+
+ try
+ {
+ logger.trace("Execution of user task with id='{}'", execution.getCurrentActivityId());
+
+ String questionnaireUrlWithVersion = userTask.getBpmnModelElementInstance().getOperatonFormKey();
+ Questionnaire questionnaire = readQuestionnaire(questionnaireUrlWithVersion);
+
+ String businessKey = execution.getBusinessKey();
+ String userTaskId = userTask.getId();
+
+ QuestionnaireResponse questionnaireResponse = createDefaultQuestionnaireResponse(
+ questionnaireUrlWithVersion, businessKey, userTaskId);
+ transformQuestionnaireItemsToQuestionnaireResponseItems(questionnaireResponse, questionnaire);
+
+ beforeQuestionnaireResponseCreate(userTask, questionnaireResponse);
+ checkQuestionnaireResponse(questionnaireResponse);
+
+ QuestionnaireResponse created = api.getFhirWebserviceClientProvider().getLocalWebserviceClient()
+ .withRetryForever(60000).create(questionnaireResponse);
+
+ logger.info("Created QuestionnaireResponse for user task at {}, process waiting for it's completion",
+ api.getQuestionnaireResponseHelper().getLocalVersionlessAbsoluteUrl(created));
+
+ afterQuestionnaireResponseCreate(userTask, created);
+ }
+ catch (Exception exception)
+ {
+ logger.debug("Error while executing user task listener {}", getClass().getName(), exception);
+ logger.error("Process {} has fatal error in step {} for task {}, reason: {} - {}",
+ execution.getProcessDefinitionId(), execution.getActivityInstanceId(),
+ api.getTaskHelper().getLocalVersionlessAbsoluteUrl(variables.getStartTask()),
+ exception.getClass().getName(), exception.getMessage());
+
+ String errorMessage = "Process " + execution.getProcessDefinitionId() + " has fatal error in step "
+ + execution.getActivityInstanceId() + ", reason: " + exception.getMessage();
+
+ updateFailedIfInprogress(variables.getTasks(), errorMessage);
+
+ execution.getProcessEngine().getRuntimeService().deleteProcessInstance(execution.getProcessInstanceId(),
+ exception.getMessage());
+ }
+ }
+
+ private Questionnaire readQuestionnaire(String urlWithVersion)
+ {
+ Bundle search = api.getFhirWebserviceClientProvider().getLocalWebserviceClient().search(Questionnaire.class,
+ Map.of("url", Collections.singletonList(urlWithVersion)));
+
+ Listnull, user task on which this {@link QuestionnaireResponse} is based
+ * @param beforeCreate
+ * not null, containing an answer placeholder for every item in the corresponding
+ * {@link Questionnaire}
+ */
+ protected void beforeQuestionnaireResponseCreate(DelegateTask userTask, QuestionnaireResponse beforeCreate)
+ {
+ // Nothing to do in default behavior
+ }
+
+ /**
+ * Override this method to execute code after the {@link QuestionnaireResponse} resource has been created on the
+ * DSF FHIR server
+ *
+ * @param userTask
+ * not null, user task on which this {@link QuestionnaireResponse} is based
+ * @param afterCreate
+ * not null, created on the DSF FHIR server
+ */
+ protected void afterQuestionnaireResponseCreate(DelegateTask userTask, QuestionnaireResponse afterCreate)
+ {
+ // Nothing to do in default behavior
+ }
+
+ private void updateFailedIfInprogress(Listnull
+ */
+ void setAlternativeBusinessKey(String alternativeBusinessKey);
+
+ /**
+ * Creates a new {@link Target} object.
+ * null correlationKey should be used if return messages aka. Task resources
+ * from multiple organizations with the same message-name are expected in a following multi instance message receive
+ * task or intermediate message catch event in a multi instance subprocess.
+ * Note: The correlationKey needs to be set as a {@link BpmnExecutionVariables#CORRELATION_KEY} variable in the
+ * message receive task or intermediate message catch event of a subprocess before incoming messages aka. Task
+ * resources can be correlated. Within a BPMN file this can be accomplished by setting an input variable with name:
+ * {@link BpmnExecutionVariables#CORRELATION_KEY}, type: string or expression, and value:
+ * ${target.correlationKey}.
+ * null correlationKey should also be used when sending a message aka. Task
+ * resource back to an organization waiting for multiple returns.
+ *
+ * @param organizationIdentifierValue
+ * not null
+ * @param endpointIdentifierValue
+ * not null
+ * @param endpointAddress
+ * not null
+ * @param correlationKey
+ * not null if used for sending multiple messages and multiple messages with the same
+ * message-name are expected in return
+ * @return new {@link Target} object
+ * @see #createTarget(String, String, String)
+ * @see #setTarget(Target)
+ */
+ Target createTarget(String organizationIdentifierValue, String endpointIdentifierValue, String endpointAddress,
+ String correlationKey);
+
+ /**
+ * Creates a new {@link Target} object.
+ *
+ * See {@link #createTarget(String, String, String, String)} for sending a correlation-key for 1:n or n:1
+ * relationships.
+ *
+ * @param organizationIdentifierValue
+ * not null
+ * @param endpointIdentifierValue
+ * not null
+ * @param endpointAddress
+ * not null
+ * @return new {@link Target} object
+ * @see #createTarget(String, String, String, String)
+ * @see #setTarget(Target)
+ */
+ default Target createTarget(String organizationIdentifierValue, String endpointIdentifierValue,
+ String endpointAddress)
+ {
+ return createTarget(organizationIdentifierValue, endpointIdentifierValue, endpointAddress, null);
+ }
+
+ /**
+ * Sets execution variable {@link BpmnExecutionVariables#TARGET}
+ *
+ * @param target
+ * may be null
+ * @throws IllegalArgumentException
+ * if the given target object is not supported, meaning the object was not created by this
+ * {@link Variables} implementation
+ * @see #createTarget(String, String, String)
+ * @see #createTarget(String, String, String, String)
+ * @see #getTarget()
+ */
+ void setTarget(Target target) throws IllegalArgumentException;
+
+ /**
+ * Retrieves execution variable {@link BpmnExecutionVariables#TARGET}
+ *
+ * @return Execution variable {@link BpmnExecutionVariables#TARGET}, may be null
+ */
+ Target getTarget();
+
+ /**
+ * Creates a new target list.
+ *
+ * Use ${targets.entries} as a multi instance collection and target as
+ * the element variable to loop over this list in a multi instance task or subprocess.
+ *
+ * @param targets
+ * {@link Target} objects to incorporate into the created list
+ * @return a new target list
+ * @throws IllegalArgumentException
+ * if one of the given target objects is not supported, meaning the object was not created by
+ * this {@link Variables} implementation
+ * @see #createTarget(String, String, String)
+ * @see #createTarget(String, String, String, String)
+ * @see #setTargets(Targets)
+ */
+ default Targets createTargets(Target... targets)
+ {
+ return createTargets(Arrays.asList(targets));
+ }
+
+ /**
+ * Creates a new target list.
+ *
+ * Use ${targets.entries} as a multi instance collection and target as
+ * the element variable to loop over this list in a multi instance task or subprocess.
+ *
+ * @param targets
+ * {@link Target} objects to incorporate into the created list, may be null
+ * @return a new target list
+ * @throws IllegalArgumentException
+ * if one of the given target objects is not supported, meaning the object was not created by
+ * this {@link Variables} implementation
+ * @see #createTarget(String, String, String)
+ * @see #createTarget(String, String, String, String)
+ * @see #setTargets(Targets)
+ */
+ Targets createTargets(List extends Target> targets);
+
+ /**
+ * Sets execution variable {@link BpmnExecutionVariables#TARGETS}.
+ *
+ * Use ${targets.entries} as a multi instance collection and
+ *
+ * @param targets
+ * may be null
+ * @see #createTargets(List)
+ * @see #createTargets(Target...)
+ * @see #getTargets()
+ */
+ void setTargets(Targets targets);
+
+ /**
+ * Retrieves execution variable {@link BpmnExecutionVariables#TARGETS}
+ *
+ * @return Execution variable {@link BpmnExecutionVariables#TARGETS}, may be null
+ * @see #setTargets(Targets)
+ */
+ Targets getTargets();
+
+ /**
+ * Sets execution variable with the given variableName to the given FHIR {@link Resource} list
+ *
+ * @param variableName
+ * not null
+ * @param resources
+ */
+ void setResourceList(String variableName, List extends Resource> resources);
+
+ /**
+ * Retrieves FHIR {@link Resource} list execution variable with the given variableName
+ *
+ * @param null
+ * @return list of FHIR resources from execution variables for the given variableName, may be
+ * null
+ */
+ null
+ * @param resource
+ * may be null
+ */
+ void setResource(String variableName, Resource resource);
+
+ /**
+ * Retrieves FHIR {@link Resource} execution variable with the given variableName
+ *
+ * @param null
+ * @return value from execution variables for the given variableName, may be null
+ */
+ null
+ * @see #updateTask(Task)
+ * @see #getLatestTask()
+ * @see #getTasks()
+ */
+ Task getStartTask();
+
+ /**
+ * Returns the latest {@link Task} received by this process or subprocess via a intermediate message catch event or
+ * message receive task.
+ *
+ * @return Last received {@link Task} of the current process or subprocess, not null
+ * @see #updateTask(Task)
+ * @see #getStartTask()
+ * @see #getCurrentTasks()
+ */
+ Task getLatestTask();
+
+ /**
+ * @return All {@link Task} resources received
+ * @see #getCurrentTasks()
+ */
+ Listnull. Forces an update to the Task list variable used
+ * internally to track all received Task resources if the given task object is already part of this list.
+ *
+ * @param task
+ * may be null
+ * @see #getStartTask()
+ * @see #getLatestTask()
+ * @see #getTasks()
+ * @see #getCurrentTasks()
+ */
+ void updateTask(Task task);
+
+ /**
+ * @return Last received {@link QuestionnaireResponse}, null if nothing received yet
+ */
+ QuestionnaireResponse getLatestReceivedQuestionnaireResponse();
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link TypedValue}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getVariable(String)
+ * @see #setInteger(String, Integer)
+ * @see #setString(String, String)
+ * @see #setBoolean(String, Boolean)
+ * @see #setByteArray(String, byte[])
+ * @see #setDate(String, Date)
+ * @see #setLong(String, Long)
+ * @see #setShort(String, Short)
+ * @see #setDouble(String, Double)
+ * @see #setNumber(String, Number)
+ * @see #setFile(String, File)
+ */
+ void setVariable(String variableName, TypedValue value);
+
+ /**
+ * Retrieves execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @see #setVariable(String, TypedValue)
+ * @see #getInteger(String)
+ * @see #getString(String)
+ * @see #getBoolean(String)
+ * @see #getByteArray(String)
+ * @see #getDate(String)
+ * @see #getLong(String)
+ * @see #getShort(String)
+ * @see #getDouble(String)
+ * @see #getNumber(String)
+ * @see #getFile(String)
+ */
+ Object getVariable(String variableName);
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Integer}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getInteger(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setInteger(String variableName, Integer value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.integerValue(value));
+ }
+
+ /**
+ * Retrieves {@link Integer} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Integer}
+ * @see #setInteger(String, Integer)
+ * @see #getVariable(String)
+ */
+ default Integer getInteger(String variableName)
+ {
+ return (Integer) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link String}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getString(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setString(String variableName, String value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.stringValue(value));
+ }
+
+ /**
+ * Retrieves {@link String} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link String}
+ * @see #setString(String, String)
+ * @see #getVariable(String)
+ */
+ default String getString(String variableName)
+ {
+ return (String) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Boolean}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getBoolean(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setBoolean(String variableName, Boolean value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.booleanValue(value));
+ }
+
+ /**
+ * Retrieves {@link Boolean} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Boolean}
+ * @see #setBoolean(String, Boolean)
+ * @see #getVariable(String)
+ */
+ default Boolean getBoolean(String variableName)
+ {
+ return (Boolean) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given byte[]
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getByteArray(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setByteArray(String variableName, byte[] value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.byteArrayValue(value));
+ }
+
+ /**
+ * Retrieves byte[] execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a byte[]
+ * @see #setByteArray(String, byte[])
+ * @see #getVariable(String)
+ */
+ default byte[] getByteArray(String variableName)
+ {
+ return (byte[]) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Date}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getDate(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setDate(String variableName, Date value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.dateValue(value));
+ }
+
+ /**
+ * Retrieves {@link Date} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Date}
+ * @see #setDate(String, Date)
+ * @see #getVariable(String)
+ */
+ default Date getDate(String variableName)
+ {
+ return (Date) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Long}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getLong(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setLong(String variableName, Long value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.longValue(value));
+ }
+
+ /**
+ * Retrieves {@link Long} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Long}
+ * @see #setLong(String, Long)
+ * @see #getVariable(String)
+ */
+ default Long getLong(String variableName)
+ {
+ return (Long) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Short}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getShort(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setShort(String variableName, Short value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.shortValue(value));
+ }
+
+ /**
+ * Retrieves {@link Short} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Short}
+ * @see #setShort(String, Short)
+ * @see #getVariable(String)
+ */
+ default Short getShort(String variableName)
+ {
+ return (Short) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Double}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getDouble(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setDouble(String variableName, Double value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.doubleValue(value));
+ }
+
+ /**
+ * Retrieves {@link Double} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Double}
+ * @see #setDouble(String, Double)
+ * @see #getVariable(String)
+ */
+ default Double getDouble(String variableName)
+ {
+ return (Double) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link Number}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getNumber(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setNumber(String variableName, Number value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.numberValue(value));
+ }
+
+ /**
+ * Retrieves {@link Number} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link Number}
+ * @see #setNumber(String, Number)
+ * @see #getVariable(String)
+ */
+ default Number getNumber(String variableName)
+ {
+ return (Number) getVariable(variableName);
+ }
+
+ /**
+ * Sets execution variable with the given variableName to the given {@link File}
+ *
+ * @param variableName
+ * not null
+ * @param value
+ * may be null
+ * @see #getFile(String)
+ * @see #setVariable(String, TypedValue)
+ */
+ default void setFile(String variableName, File value)
+ {
+ setVariable(variableName, org.operaton.bpm.engine.variable.Variables.fileValue(value));
+ }
+
+ /**
+ * Retrieves {@link File} execution variable with the given variableName
+ *
+ * @param variableName
+ * not null
+ * @return value from execution variables for the given variableName, may be null
+ * @throws ClassCastException
+ * if the stored value is not a {@link File}
+ * @see #setFile(String, File)
+ * @see #getVariable(String)
+ */
+ default File getFile(String variableName)
+ {
+ return (File) getVariable(variableName);
+ }
+}
diff --git a/dsf-bpe/dsf-bpe-process-api-v1/pom.xml b/dsf-bpe/dsf-bpe-process-api-v1/pom.xml
index 3d9db2ee4..28b3ed222 100644
--- a/dsf-bpe/dsf-bpe-process-api-v1/pom.xml
+++ b/dsf-bpe/dsf-bpe-process-api-v1/pom.xml
@@ -33,14 +33,19 @@