From a4f76d831e1ba6e847ec8c54065ccdb37d31e58a Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 14 Feb 2022 09:18:01 +0100 Subject: [PATCH 01/18] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index e28e453..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 University Hospital Heidelberg - Department Medical Information Systems + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 009493d5f9efe2af8397cdd4c30b2e4d5b0d092d Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Wed, 11 May 2022 01:12:32 +0200 Subject: [PATCH 02/18] 0.6.0 release --- dsf-bpe-process-hello-world/pom.xml | 2 +- .../dsf/bpe/HelloWorldProcessPluginDefinition.java | 2 +- pom.xml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dsf-bpe-process-hello-world/pom.xml b/dsf-bpe-process-hello-world/pom.xml index e98543a..4fc2b63 100755 --- a/dsf-bpe-process-hello-world/pom.xml +++ b/dsf-bpe-process-hello-world/pom.xml @@ -7,7 +7,7 @@ org.highmed.dsf dsf-bpe-example-processes-pom - 0.6.0-SNAPSHOT + 0.6.0 diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java b/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java index d5c4979..afc7f06 100644 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -18,7 +18,7 @@ public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition { public static final String VERSION = "0.6.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2022, 4, 14); + public static final LocalDate RELEASE_DATE = LocalDate.of(2022, 5, 10); @Override public String getName() diff --git a/pom.xml b/pom.xml index 93c6ddf..f20b48b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.highmed.dsf dsf-bpe-example-processes-pom - 0.6.0-SNAPSHOT + 0.6.0 pom @@ -45,17 +45,17 @@ org.highmed.dsf dsf-bpe-process-base - 0.6.0-SNAPSHOT + 0.6.0 org.highmed.dsf dsf-bpe-process-hello-world - 0.6.0-SNAPSHOT + 0.6.0 org.highmed.dsf dsf-fhir-validation - 0.6.0-SNAPSHOT + 0.6.0 @@ -74,7 +74,7 @@ org.highmed.dsf dsf-bpe-process-base - 0.6.0-SNAPSHOT + 0.6.0 test test-jar From ff2146ca12068c33bd452946933059002aeca961 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 24 Oct 2022 18:00:19 +0200 Subject: [PATCH 03/18] prepare release 0.9.0 --- dsf-bpe-process-hello-world/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dsf-bpe-process-hello-world/pom.xml b/dsf-bpe-process-hello-world/pom.xml index 9a00b9e..05235b7 100755 --- a/dsf-bpe-process-hello-world/pom.xml +++ b/dsf-bpe-process-hello-world/pom.xml @@ -7,7 +7,7 @@ org.highmed.dsf dsf-bpe-example-processes-pom - 0.9.0-SNAPSHOT + 0.9.0 diff --git a/pom.xml b/pom.xml index 35f6bae..e87881e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.highmed.dsf dsf-bpe-example-processes-pom - 0.9.0-SNAPSHOT + 0.9.0 pom From 2039a95d506a470ee9581aca61f9cc32efd66566 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 22 Aug 2023 14:17:14 +0200 Subject: [PATCH 04/18] 1.0.0.0 release --- pom.xml | 4 ++-- .../java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 90f2e95..71fe505 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.dsf dsf-process-hello-world - 1.0.0.0-SNAPSHOT + 1.0.0.0 jar @@ -13,7 +13,7 @@ 17 17 - 1.0.0 + 1.1.0 ../dsf diff --git a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java index ac70141..6f4df6f 100644 --- a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -11,7 +11,7 @@ public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition { public static final String VERSION = "1.0.0.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 5, 20); + public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 8, 22); @Override public String getName() From 90ad2e6be20ed620593904c4eb2b8cd94b5a7101 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Wed, 21 Feb 2024 20:55:38 +0100 Subject: [PATCH 05/18] v1.5.0.0 release --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1bf7d5d..8764246 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.dsf dsf-process-hello-world - 1.5.0.0-SNAPSHOT + 1.5.0.0 jar @@ -13,7 +13,7 @@ 17 17 - 1.5.0-SNAPSHOT + 1.5.0 ../dsf From 367439ee007c8e85e721c61d70c97f6ab9ed39dc Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Wed, 21 Feb 2024 20:57:48 +0100 Subject: [PATCH 06/18] v1.5.0.0 release --- .../java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java index 72293ff..25618c2 100644 --- a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -11,7 +11,7 @@ public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition { public static final String VERSION = "1.5.0.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 5, 20); + public static final LocalDate RELEASE_DATE = LocalDate.of(2024, 2, 21); @Override public String getName() From bda4ec1056db64507c9e1969cce9ad36e6184e64 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Mon, 20 Oct 2025 21:24:14 +0200 Subject: [PATCH 07/18] initial round of changes for DSF 2.0.0 --- pom.xml | 148 ++- .../java/dev/dsf/bpe/ConstantsHelloWorld.java | 20 - .../HelloWorldProcessPluginDefinition.java | 33 +- .../ProcessPluginDeploymentListenerImpl.java | 19 + .../java/dev/dsf/bpe/service/HelloWorld.java | 17 +- .../dsf/bpe/service/LogUserTaskResponse.java | 38 +- .../bpe/spring/config/HelloWorldConfig.java | 24 +- src/main/java/dev/dsf/bpe/variable/README.md | 1 - ...=> dev.dsf.bpe.v2.ProcessPluginDefinition} | 0 src/main/resources/bpe/hello-user.bpmn | 48 +- .../ActivityDefinition/dsf-hello-user.xml | 5 +- .../ActivityDefinition/dsf-hello-world.xml | 5 +- .../fhir/CodeSystem/dsf-hello-world.xml | 5 + .../dsf-task-hello-user.xml | 153 ++- .../dsf-task-hello-world.xml | 1092 ++++++++--------- src/main/resources/plugin.properties | 3 + .../bpe/HelloProcessPluginDefinitionTest.java | 6 +- .../bpe/start/HelloUserExampleStarter.java | 47 - .../bpe/start/HelloWorldExampleStarter.java | 47 - .../ActivityDefinitionProfileTest.java | 52 +- .../dev/dsf/fhir/profile/TaskProfileTest.java | 64 +- src/test/resources/log4j2.xml | 8 +- 22 files changed, 925 insertions(+), 910 deletions(-) delete mode 100644 src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java create mode 100644 src/main/java/dev/dsf/bpe/listener/ProcessPluginDeploymentListenerImpl.java delete mode 100644 src/main/java/dev/dsf/bpe/variable/README.md rename src/main/resources/META-INF/services/{dev.dsf.bpe.v1.ProcessPluginDefinition => dev.dsf.bpe.v2.ProcessPluginDefinition} (100%) create mode 100644 src/main/resources/plugin.properties delete mode 100644 src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java delete mode 100644 src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java diff --git a/pom.xml b/pom.xml index 8764246..bfe6c9e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,15 +5,17 @@ dev.dsf dsf-process-hello-world - 1.5.0.0 + 2.0.0.0-SNAPSHOT jar + 2025-10-20T22:00:00Z UTF-8 - 17 - 17 + 25 + 25 + 25 - 1.5.0 + 2.0.0-SNAPSHOT ../dsf @@ -38,7 +40,7 @@ dev.dsf - dsf-bpe-process-api-v1 + dsf-bpe-process-api-v2 ${dsf.version} provided @@ -46,24 +48,11 @@ org.slf4j slf4j-api - 2.0.12 + 2.0.17 provided - - dev.dsf - dsf-bpe-process-api-v1 - ${dsf.version} - test - test-jar - - - dev.dsf - dsf-fhir-validation - ${dsf.version} - test - junit junit @@ -73,31 +62,59 @@ org.apache.logging.log4j log4j-slf4j2-impl - 2.22.1 + 2.25.2 + test + + + + dev.dsf + dsf-fhir-validation + ${dsf.version} test + + + src/main/resources + false + + plugin.properties + + + + src/main/resources + true + + plugin.properties + + + + org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.14.1 + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 - ${compileSource} - ${compileTarget} + UTF-8 org.apache.maven.plugins maven-surefire-plugin - 3.2.3 + 3.5.4 org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.2 @@ -111,25 +128,20 @@ - - org.apache.maven.plugins - maven-shade-plugin - 3.5.1 - org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.9.0 org.apache.maven.plugins maven-clean-plugin - 3.3.2 + 3.5.0 org.codehaus.mojo buildnumber-maven-plugin - 3.2.0 + 3.2.1 validate @@ -145,7 +157,7 @@ net.revelc.code.formatter formatter-maven-plugin - 2.23.0 + 2.29.0 eclipse-formatter-config.xml @@ -153,7 +165,7 @@ net.revelc.code impsort-maven-plugin - 1.9.0 + 1.12.0 17 java.,javax.,org.,com. @@ -162,22 +174,78 @@ dev.dsf - dsf-tools-documentation-generator + dsf-maven-plugin ${dsf.version} - generate + generate-config-doc - - dev.dsf.bpe - + + dev.dsf.bpe + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.2 + + + enforce-maven + + enforce + + + + + 3.6.3 + + + + commons-logging:commons-logging + + + + true + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + dev.dsf + dsf-maven-plugin + [2.0.0-SNAPSHOT,) + + generate-config-doc + + + + + + + + + + + + diff --git a/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java b/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java deleted file mode 100644 index bc7cf35..0000000 --- a/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java +++ /dev/null @@ -1,20 +0,0 @@ -package dev.dsf.bpe; - -public interface ConstantsHelloWorld -{ - String PROCESS_NAME_HELLO_WORLD = "helloWorld"; - String PROCESS_NAME_FULL_HELLO_WORLD = "dsfdev_" + PROCESS_NAME_HELLO_WORLD; - - String PROCESS_NAME_HELLO_USER = "helloUser"; - String PROCESS_NAME_FULL_HELLO_USER = "dsfdev_" + PROCESS_NAME_HELLO_USER; - - String PROCESS_DSF_URI_BASE = "http://dsf.dev/bpe/Process/"; - - String PROFILE_DSF_TASK_TASK_HELLO_WORLD = "http://dsf.dev/fhir/StructureDefinition/task-hello-world"; - String PROFILE_DSF_TASK_HELLO_WORLD_PROCESS_URI = PROCESS_DSF_URI_BASE + PROCESS_NAME_HELLO_WORLD; - String PROFILE_DSF_TASK_HELLO_WORLD_MESSAGE_NAME = "helloWorld"; - - String PROFILE_DSF_TASK_TASK_HELLO_USER = "http://dsf.dev/fhir/StructureDefinition/task-hello-user"; - String PROFILE_DSF_TASK_HELLO_USER_PROCESS_URI = PROCESS_DSF_URI_BASE + PROCESS_NAME_HELLO_USER; - String PROFILE_DSF_TASK_HELLO_USER_MESSAGE_NAME = "helloUser"; -} diff --git a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java index 25618c2..18a4099 100644 --- a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -1,36 +1,13 @@ package dev.dsf.bpe; -import java.time.LocalDate; -import java.util.Arrays; import java.util.List; import java.util.Map; import dev.dsf.bpe.spring.config.HelloWorldConfig; -import dev.dsf.bpe.v1.ProcessPluginDefinition; +import dev.dsf.bpe.v2.AbstractProcessPluginDefinition; -public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition +public class HelloWorldProcessPluginDefinition extends AbstractProcessPluginDefinition { - public static final String VERSION = "1.5.0.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2024, 2, 21); - - @Override - public String getName() - { - return "dsf-process-hello-world"; - } - - @Override - public String getVersion() - { - return VERSION; - } - - @Override - public LocalDate getReleaseDate() - { - return RELEASE_DATE; - } - @Override public List getProcessModels() { @@ -61,9 +38,7 @@ public Map> getFhirResourcesByProcessId() var vHelloWorld = "fhir/ValueSet/dsf-hello-world.xml"; - return Map.of(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER, - Arrays.asList(aHelloUser, qHelloWorld, sHelloUser, tHelloUser), - ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD, - Arrays.asList(aHelloWorld, cHelloWorld, sHelloWorld, tHelloWorld, vHelloWorld)); + return Map.of("dsfdev_helloUser", List.of(aHelloUser, qHelloWorld, sHelloUser, tHelloUser), "dsfdev_helloWorld", + List.of(aHelloWorld, cHelloWorld, sHelloWorld, tHelloWorld, vHelloWorld)); } } diff --git a/src/main/java/dev/dsf/bpe/listener/ProcessPluginDeploymentListenerImpl.java b/src/main/java/dev/dsf/bpe/listener/ProcessPluginDeploymentListenerImpl.java new file mode 100644 index 0000000..cdb4d7a --- /dev/null +++ b/src/main/java/dev/dsf/bpe/listener/ProcessPluginDeploymentListenerImpl.java @@ -0,0 +1,19 @@ +package dev.dsf.bpe.listener; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import dev.dsf.bpe.v2.ProcessPluginDeploymentListener; + +public class ProcessPluginDeploymentListenerImpl implements ProcessPluginDeploymentListener +{ + private static final Logger logger = LoggerFactory.getLogger(ProcessPluginDeploymentListenerImpl.class); + + @Override + public void onProcessesDeployed(List processes) + { + logger.info("Deployed HelloWorld Processes: {}", processes); + } +} diff --git a/src/main/java/dev/dsf/bpe/service/HelloWorld.java b/src/main/java/dev/dsf/bpe/service/HelloWorld.java index 0c372bd..c85298e 100644 --- a/src/main/java/dev/dsf/bpe/service/HelloWorld.java +++ b/src/main/java/dev/dsf/bpe/service/HelloWorld.java @@ -1,25 +1,20 @@ package dev.dsf.bpe.service; -import org.camunda.bpm.engine.delegate.DelegateExecution; import org.hl7.fhir.r4.model.Task; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import dev.dsf.bpe.v1.ProcessPluginApi; -import dev.dsf.bpe.v1.activity.AbstractServiceDelegate; -import dev.dsf.bpe.v1.variables.Variables; +import dev.dsf.bpe.v2.ProcessPluginApi; +import dev.dsf.bpe.v2.activity.ServiceTask; +import dev.dsf.bpe.v2.error.ErrorBoundaryEvent; +import dev.dsf.bpe.v2.variables.Variables; -public class HelloWorld extends AbstractServiceDelegate +public class HelloWorld implements ServiceTask { private static final Logger logger = LoggerFactory.getLogger(HelloWorld.class); - public HelloWorld(ProcessPluginApi api) - { - super(api); - } - @Override - protected void doExecute(DelegateExecution execution, Variables variables) + public void execute(ProcessPluginApi api, Variables variables) throws ErrorBoundaryEvent, Exception { Task task = variables.getStartTask(); logger.info("Hello World from organization with identifier '{}'", diff --git a/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java b/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java index 2a7f365..259721e 100644 --- a/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java +++ b/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java @@ -1,43 +1,19 @@ package dev.dsf.bpe.service; -import java.util.Objects; - -import org.camunda.bpm.engine.delegate.DelegateExecution; import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; -import ca.uhn.fhir.context.FhirContext; -import dev.dsf.bpe.v1.ProcessPluginApi; -import dev.dsf.bpe.v1.activity.AbstractServiceDelegate; -import dev.dsf.bpe.v1.variables.Variables; +import dev.dsf.bpe.v2.ProcessPluginApi; +import dev.dsf.bpe.v2.activity.ServiceTask; +import dev.dsf.bpe.v2.error.ErrorBoundaryEvent; +import dev.dsf.bpe.v2.variables.Variables; -public class LogUserTaskResponse extends AbstractServiceDelegate implements InitializingBean +public class LogUserTaskResponse implements ServiceTask { - private static final Logger logger = LoggerFactory.getLogger(LogUserTaskResponse.class); - - private final FhirContext fhirContext; - - public LogUserTaskResponse(ProcessPluginApi api, FhirContext fhirContext) - { - super(api); - this.fhirContext = fhirContext; - } - - @Override - public void afterPropertiesSet() throws Exception - { - super.afterPropertiesSet(); - Objects.requireNonNull(fhirContext, "fhirContext"); - } - @Override - protected void doExecute(DelegateExecution execution, Variables variables) + public void execute(ProcessPluginApi api, Variables variables) throws ErrorBoundaryEvent, Exception { QuestionnaireResponse questionnaireResponse = variables.getLatestReceivedQuestionnaireResponse(); - logger.info("Completed QuestionnaireResponse: {}", - fhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(questionnaireResponse)); + api.getDataLogger().log("Completed QuestionnaireResponse", questionnaireResponse); } } diff --git a/src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java b/src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java index 723e049..257c2cf 100755 --- a/src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java +++ b/src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java @@ -1,36 +1,26 @@ package dev.dsf.bpe.spring.config; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; -import ca.uhn.fhir.context.FhirContext; +import dev.dsf.bpe.listener.ProcessPluginDeploymentListenerImpl; import dev.dsf.bpe.service.HelloWorld; import dev.dsf.bpe.service.LogUserTaskResponse; -import dev.dsf.bpe.v1.ProcessPluginApi; +import dev.dsf.bpe.v2.ProcessPluginDeploymentListener; +import dev.dsf.bpe.v2.spring.ActivityPrototypeBeanCreator; @Configuration public class HelloWorldConfig { - @Autowired - private ProcessPluginApi api; - - @Autowired - private FhirContext fhirContext; - @Bean - @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) - public HelloWorld helloWorld() + public static ActivityPrototypeBeanCreator activityPrototypeBeanCreator() { - return new HelloWorld(api); + return new ActivityPrototypeBeanCreator(HelloWorld.class, LogUserTaskResponse.class); } @Bean - @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) - public LogUserTaskResponse logUserTaskResponse() + public ProcessPluginDeploymentListener deploymentListener() { - return new LogUserTaskResponse(api, fhirContext); + return new ProcessPluginDeploymentListenerImpl(); } } diff --git a/src/main/java/dev/dsf/bpe/variable/README.md b/src/main/java/dev/dsf/bpe/variable/README.md deleted file mode 100644 index ab241aa..0000000 --- a/src/main/java/dev/dsf/bpe/variable/README.md +++ /dev/null @@ -1 +0,0 @@ -`variable` package typically used for implementing custom BPMN variable serializers \ No newline at end of file diff --git a/src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition b/src/main/resources/META-INF/services/dev.dsf.bpe.v2.ProcessPluginDefinition similarity index 100% rename from src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition rename to src/main/resources/META-INF/services/dev.dsf.bpe.v2.ProcessPluginDefinition diff --git a/src/main/resources/bpe/hello-user.bpmn b/src/main/resources/bpe/hello-user.bpmn index f77e90c..1b7528d 100644 --- a/src/main/resources/bpe/hello-user.bpmn +++ b/src/main/resources/bpe/hello-user.bpmn @@ -1,5 +1,5 @@ - + @@ -11,6 +11,22 @@ + + + + DIC_USER + + + http://dsf.dev/fhir/CodeSystem/hello-world + + + questionnaire-response-reference + + + #{version} + + + SequenceFlow_0bbhq2r Flow_00nx7hv @@ -23,21 +39,12 @@ - - - - - - - - - - - - + + + @@ -46,9 +53,18 @@ - - - + + + + + + + + + + + + diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml index 8aa641f..848ab0f 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml @@ -4,6 +4,7 @@ + @@ -23,7 +24,7 @@ - + @@ -53,7 +54,7 @@ - + diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml index ff7f1f1..ad96995 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml @@ -4,6 +4,7 @@ + @@ -23,7 +24,7 @@ - + @@ -53,7 +54,7 @@ - + diff --git a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml index 4b8a18a..4e40ad6 100644 --- a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml +++ b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml @@ -86,4 +86,9 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml index d961a05..722c37e 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml @@ -1,55 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml index 40a6b57..47410d2 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -1,548 +1,548 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/plugin.properties b/src/main/resources/plugin.properties new file mode 100644 index 0000000..7d83caf --- /dev/null +++ b/src/main/resources/plugin.properties @@ -0,0 +1,3 @@ +release-date=${project.build.outputTimestamp} +version=${project.version} +name=${project.artifactId} \ No newline at end of file diff --git a/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java b/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java index d637a37..1a9f373 100644 --- a/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java +++ b/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java @@ -8,7 +8,7 @@ import org.junit.Test; -import dev.dsf.bpe.v1.ProcessPluginDefinition; +import dev.dsf.bpe.v2.ProcessPluginDefinition; public class HelloProcessPluginDefinitionTest { @@ -18,11 +18,11 @@ public void testResourceLoading() ProcessPluginDefinition definition = new HelloWorldProcessPluginDefinition(); Map> resourcesByProcessId = definition.getFhirResourcesByProcessId(); - var helloWorld = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD); + var helloWorld = resourcesByProcessId.get("dsfdev_helloWorld"); assertNotNull(helloWorld); assertEquals(5, helloWorld.stream().filter(this::exists).count()); - var helloUser = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER); + var helloUser = resourcesByProcessId.get("dsfdev_helloUser"); assertNotNull(helloUser); assertEquals(4, helloUser.stream().filter(this::exists).count()); } diff --git a/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java b/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java deleted file mode 100644 index 8087719..0000000 --- a/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -package dev.dsf.bpe.start; - -import java.util.Date; - -import org.hl7.fhir.r4.model.ResourceType; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.Task; - -import dev.dsf.bpe.ConstantsHelloWorld; -import dev.dsf.bpe.HelloWorldProcessPluginDefinition; -import dev.dsf.bpe.v1.constants.CodeSystems; -import dev.dsf.bpe.v1.constants.NamingSystems; - -public class HelloUserExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // dsf/dsf-tools/dsf-tools-test-data-generator/cert/Webbrowser_Test_User/Webbrowser_Test_User_certificate.p12 - // Environment variable "DSF_CLIENT_CERTIFICATE_PASSWORD" or args[1]: the password of the client-certificate - // password - public static void main(String[] args) throws Exception - { - ExampleStarter.forServer(args, ConstantsExampleStarters.DIC_1_FHIR_BASE_URL).startWith(task()); - } - - private static Task task() - { - var def = new HelloWorldProcessPluginDefinition(); - - Task task = new Task(); - task.getMeta().addProfile(ConstantsHelloWorld.PROFILE_DSF_TASK_TASK_HELLO_USER); - task.setInstantiatesCanonical( - ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_USER_PROCESS_URI + "|" + def.getResourceVersion()); - task.setStatus(Task.TaskStatus.REQUESTED); - task.setIntent(Task.TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).setIdentifier(NamingSystems.OrganizationIdentifier - .withValue(ConstantsExampleStarters.NAMINGSYSTEM_DSF_ORGANIZATION_IDENTIFIER_VALUE_DIC_1)); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()) - .setIdentifier(NamingSystems.OrganizationIdentifier - .withValue(ConstantsExampleStarters.NAMINGSYSTEM_DSF_ORGANIZATION_IDENTIFIER_VALUE_DIC_1)); - - task.addInput().setValue(new StringType(ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_USER_MESSAGE_NAME)).getType() - .addCoding(CodeSystems.BpmnMessage.messageName()); - - return task; - } -} diff --git a/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java b/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java deleted file mode 100644 index 18bf380..0000000 --- a/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -package dev.dsf.bpe.start; - -import java.util.Date; - -import org.hl7.fhir.r4.model.ResourceType; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.Task; - -import dev.dsf.bpe.ConstantsHelloWorld; -import dev.dsf.bpe.HelloWorldProcessPluginDefinition; -import dev.dsf.bpe.v1.constants.CodeSystems; -import dev.dsf.bpe.v1.constants.NamingSystems; - -public class HelloWorldExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // dsf/dsf-tools/dsf-tools-test-data-generator/cert/Webbrowser_Test_User/Webbrowser_Test_User_certificate.p12 - // Environment variable "DSF_CLIENT_CERTIFICATE_PASSWORD" or args[1]: the password of the client-certificate - // password - public static void main(String[] args) throws Exception - { - ExampleStarter.forServer(args, ConstantsExampleStarters.DIC_1_FHIR_BASE_URL).startWith(task()); - } - - private static Task task() - { - var def = new HelloWorldProcessPluginDefinition(); - - Task task = new Task(); - task.getMeta().addProfile(ConstantsHelloWorld.PROFILE_DSF_TASK_TASK_HELLO_WORLD); - task.setInstantiatesCanonical( - ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_WORLD_PROCESS_URI + "|" + def.getResourceVersion()); - task.setStatus(Task.TaskStatus.REQUESTED); - task.setIntent(Task.TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).setIdentifier(NamingSystems.OrganizationIdentifier - .withValue(ConstantsExampleStarters.NAMINGSYSTEM_DSF_ORGANIZATION_IDENTIFIER_VALUE_DIC_1)); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()) - .setIdentifier(NamingSystems.OrganizationIdentifier - .withValue(ConstantsExampleStarters.NAMINGSYSTEM_DSF_ORGANIZATION_IDENTIFIER_VALUE_DIC_1)); - - task.addInput().setValue(new StringType(ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_WORLD_MESSAGE_NAME)) - .getType().addCoding(CodeSystems.BpmnMessage.messageName()); - - return task; - } -} diff --git a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index 9df9502..42f83cf 100644 --- a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -1,7 +1,6 @@ package dev.dsf.fhir.profile; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import java.nio.file.Paths; import java.util.Arrays; @@ -15,8 +14,6 @@ import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.ValidationResult; import dev.dsf.bpe.HelloWorldProcessPluginDefinition; -import dev.dsf.fhir.authorization.process.ProcessAuthorizationHelper; -import dev.dsf.fhir.authorization.process.ProcessAuthorizationHelperImpl; import dev.dsf.fhir.validation.ResourceValidator; import dev.dsf.fhir.validation.ResourceValidatorImpl; import dev.dsf.fhir.validation.ValidationSupportRule; @@ -25,24 +22,26 @@ public class ActivityDefinitionProfileTest { private static final Logger logger = LoggerFactory.getLogger(ActivityDefinitionProfileTest.class); + private static final HelloWorldProcessPluginDefinition pluginDefinition = new HelloWorldProcessPluginDefinition(); + @ClassRule - public static final ValidationSupportRule validationRule = new ValidationSupportRule( - HelloWorldProcessPluginDefinition.VERSION, HelloWorldProcessPluginDefinition.RELEASE_DATE, - Arrays.asList("dsf-activity-definition-1.0.0.xml", "dsf-extension-process-authorization-1.0.0.xml", - "dsf-extension-process-authorization-organization-1.0.0.xml", - "dsf-extension-process-authorization-organization-practitioner-1.0.0.xml", - "dsf-extension-process-authorization-parent-organization-role-1.0.0.xml", - "dsf-extension-process-authorization-parent-organization-role-practitioner-1.0.0.xml", - "dsf-extension-process-authorization-practitioner-1.0.0.xml", - "dsf-coding-process-authorization-local-all-1.0.0.xml", - "dsf-coding-process-authorization-local-all-practitioner-1.0.0.xml", - "dsf-coding-process-authorization-local-organization-1.0.0.xml", - "dsf-coding-process-authorization-local-organization-practitioner-1.0.0.xml", - "dsf-coding-process-authorization-local-parent-organization-role-1.0.0.xml", - "dsf-coding-process-authorization-local-parent-organization-role-practitioner-1.0.0.xml", - "dsf-coding-process-authorization-remote-all-1.0.0.xml", - "dsf-coding-process-authorization-remote-parent-organization-role-1.0.0.xml", - "dsf-coding-process-authorization-remote-organization-1.0.0.xml"), + public static final ValidationSupportRule validationRule = new ValidationSupportRule(pluginDefinition.getVersion(), + pluginDefinition.getReleaseDate(), + Arrays.asList("dsf-activity-definition-2.0.0.xml", "dsf-extension-process-authorization-2.0.0.xml", + "dsf-extension-process-authorization-organization-2.0.0.xml", + "dsf-extension-process-authorization-organization-practitioner-2.0.0.xml", + "dsf-extension-process-authorization-parent-organization-role-2.0.0.xml", + "dsf-extension-process-authorization-parent-organization-role-practitioner-2.0.0.xml", + "dsf-extension-process-authorization-practitioner-2.0.0.xml", + "dsf-coding-process-authorization-local-all-2.0.0.xml", + "dsf-coding-process-authorization-local-all-practitioner-2.0.0.xml", + "dsf-coding-process-authorization-local-organization-2.0.0.xml", + "dsf-coding-process-authorization-local-organization-practitioner-2.0.0.xml", + "dsf-coding-process-authorization-local-parent-organization-role-2.0.0.xml", + "dsf-coding-process-authorization-local-parent-organization-role-practitioner-2.0.0.xml", + "dsf-coding-process-authorization-remote-all-2.0.0.xml", + "dsf-coding-process-authorization-remote-parent-organization-role-2.0.0.xml", + "dsf-coding-process-authorization-remote-organization-2.0.0.xml"), Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", "dsf-process-authorization-1.0.0.xml", "dsf-read-access-tag-1.0.0.xml", "dsf-hello-world.xml"), Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", @@ -52,7 +51,8 @@ public class ActivityDefinitionProfileTest private final ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); - private final ProcessAuthorizationHelper processAuthorizationHelper = new ProcessAuthorizationHelperImpl(); + // TODO + // private final ProcessAuthorizationHelper processAuthorizationHelper = new ProcessAuthorizationHelperImpl(); @Test public void testHelloWorldValid() throws Exception @@ -66,8 +66,9 @@ public void testHelloWorldValid() throws Exception assertEquals(0, result.getMessages().stream().filter(m -> ResultSeverityEnum.ERROR.equals(m.getSeverity()) || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); - assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, - orgIdentifier -> true, organizationRole -> true)); + // TODO + // assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, + // orgIdentifier -> true, organizationRole -> true)); } @Test @@ -82,7 +83,8 @@ public void testHelloUserValid() throws Exception assertEquals(0, result.getMessages().stream().filter(m -> ResultSeverityEnum.ERROR.equals(m.getSeverity()) || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); - assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, - orgIdentifier -> true, organizationRole -> true)); + // TODO + // assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, + // orgIdentifier -> true, organizationRole -> true)); } } diff --git a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java index 200b798..ffddf81 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -2,8 +2,10 @@ import static org.junit.Assert.assertEquals; +import java.nio.file.Paths; import java.util.Arrays; import java.util.Date; +import java.util.UUID; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.Coding; @@ -28,10 +30,9 @@ import ca.uhn.fhir.validation.ResultSeverityEnum; import ca.uhn.fhir.validation.ValidationResult; -import dev.dsf.bpe.ConstantsHelloWorld; import dev.dsf.bpe.HelloWorldProcessPluginDefinition; -import dev.dsf.bpe.v1.constants.CodeSystems; -import dev.dsf.bpe.v1.constants.NamingSystems; +import dev.dsf.bpe.v2.constants.CodeSystems; +import dev.dsf.bpe.v2.constants.NamingSystems; import dev.dsf.fhir.validation.ResourceValidator; import dev.dsf.fhir.validation.ResourceValidatorImpl; import dev.dsf.fhir.validation.ValidationSupportRule; @@ -45,7 +46,7 @@ public class TaskProfileTest @ClassRule public static final ValidationSupportRule validationRule = new ValidationSupportRule(def.getResourceVersion(), def.getReleaseDate(), - Arrays.asList("dsf-task-base-1.0.0.xml", "dsf-task-hello-world.xml", "dsf-task-hello-user.xml"), + Arrays.asList("dsf-task-base-2.0.0.xml", "dsf-task-hello-world.xml", "dsf-task-hello-user.xml"), Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "dsf-hello-world.xml"), Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "dsf-hello-world.xml")); @@ -112,9 +113,8 @@ public void testMaximalTaskHelloWorldValid() private Task createValidTaskHelloWorld() { Task task = new Task(); - task.getMeta().addProfile(ConstantsHelloWorld.PROFILE_DSF_TASK_TASK_HELLO_WORLD); - task.setInstantiatesCanonical( - ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_WORLD_PROCESS_URI + "|" + def.getVersion()); + task.getMeta().addProfile("http://dsf.dev/fhir/StructureDefinition/task-hello-world"); + task.setInstantiatesCanonical("http://dsf.dev/bpe/Process/helloWorld|" + def.getVersion()); task.setStatus(TaskStatus.REQUESTED); task.setIntent(TaskIntent.ORDER); task.setAuthoredOn(new Date()); @@ -123,8 +123,8 @@ private Task createValidTaskHelloWorld() task.getRestriction().addRecipient().setType(ResourceType.Organization.name()) .setIdentifier(NamingSystems.OrganizationIdentifier.withValue("Test_DIC_1")); - task.addInput().setValue(new StringType(ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_WORLD_MESSAGE_NAME)) - .getType().addCoding(CodeSystems.BpmnMessage.messageName()); + task.addInput().setValue(new StringType("helloWorld")).getType() + .addCoding(CodeSystems.BpmnMessage.messageName()); task.addInput().setValue(new StringType("string-value")).getType().addCoding( new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("string-example")); @@ -146,12 +146,29 @@ public void testTaskHelloUserValid() || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); } + @Test + public void testTaskHelloUserWithQuestionnaireResponseReferenceOutputValid() + { + Task task = createValidTaskHelloUser(); + task.setStatus(TaskStatus.INPROGRESS); + task.addInput().setValue(new StringType(UUID.randomUUID().toString())).getType().getCodingFirstRep() + .setSystem("http://dsf.dev/fhir/CodeSystem/bpmn-message").setCode("business-key"); + task.addOutput().setValue(new Reference("QuestionnaireResponse/" + UUID.randomUUID().toString())).getType() + .getCodingFirstRep().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("questionnaire-response-reference").setVersion(def.getResourceVersion()); + + ValidationResult result = resourceValidator.validate(task); + ValidationSupportRule.logValidationMessages(logger, result); + + assertEquals(0, result.getMessages().stream().filter(m -> ResultSeverityEnum.ERROR.equals(m.getSeverity()) + || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); + } + private Task createValidTaskHelloUser() { Task task = new Task(); - task.getMeta().addProfile(ConstantsHelloWorld.PROFILE_DSF_TASK_TASK_HELLO_USER); - task.setInstantiatesCanonical( - ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_USER_PROCESS_URI + "|" + def.getVersion()); + task.getMeta().addProfile("http://dsf.dev/fhir/StructureDefinition/task-hello-user"); + task.setInstantiatesCanonical("http://dsf.dev/bpe/Process/helloUser|" + def.getVersion()); task.setStatus(TaskStatus.REQUESTED); task.setIntent(TaskIntent.ORDER); task.setAuthoredOn(new Date()); @@ -160,9 +177,30 @@ private Task createValidTaskHelloUser() task.getRestriction().addRecipient().setType(ResourceType.Organization.name()) .setIdentifier(NamingSystems.OrganizationIdentifier.withValue("Test_DIC_1")); - task.addInput().setValue(new StringType(ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_USER_MESSAGE_NAME)).getType() + task.addInput().setValue(new StringType("helloUser")).getType() .addCoding(CodeSystems.BpmnMessage.messageName()); return task; } + + @Test + public void testHelloUserDraftTask() throws Exception + { + testDraftTask(validationRule.readTask(Paths.get("src/main/resources/fhir/Task/dsf-task-hello-user.xml"))); + } + + @Test + public void testHelloWorldDraftTask() throws Exception + { + testDraftTask(validationRule.readTask(Paths.get("src/main/resources/fhir/Task/dsf-task-hello-world.xml"))); + } + + private void testDraftTask(Task task) + { + ValidationResult result = resourceValidator.validate(task); + ValidationSupportRule.logValidationMessages(logger, result); + + assertEquals(0, result.getMessages().stream().filter(m -> ResultSeverityEnum.ERROR.equals(m.getSeverity()) + || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); + } } diff --git a/src/test/resources/log4j2.xml b/src/test/resources/log4j2.xml index 191e09b..32c677b 100644 --- a/src/test/resources/log4j2.xml +++ b/src/test/resources/log4j2.xml @@ -10,13 +10,7 @@ - - - - - - - + From dc8966817fc590e291dee41c6481c8fff4aafacd Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 31 Oct 2025 08:29:20 +0100 Subject: [PATCH 08/18] add quantity and choice examples, update dependencies --- pom.xml | 8 ++--- .../HelloWorldProcessPluginDefinition.java | 2 +- .../fhir/CodeSystem/dsf-hello-world.xml | 5 +++ .../fhir/Questionnaire/dsf-hello-user.xml | 14 +++++++- .../dsf-task-hello-world.xml | 35 +++++++++++++++++++ .../fhir/Task/dsf-task-hello-world.xml | 15 ++++++++ .../dev/dsf/fhir/profile/TaskProfileTest.java | 6 ++++ 7 files changed, 79 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1bf7d5d..00f7f88 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.dsf dsf-process-hello-world - 1.5.0.0-SNAPSHOT + 2.0.0.0-SNAPSHOT jar @@ -13,7 +13,7 @@ 17 17 - 1.5.0-SNAPSHOT + 1.9.0 ../dsf @@ -46,7 +46,7 @@ org.slf4j slf4j-api - 2.0.12 + 2.0.17 provided @@ -73,7 +73,7 @@ org.apache.logging.log4j log4j-slf4j2-impl - 2.22.1 + 2.25.1 test diff --git a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java index 72293ff..6026ce9 100644 --- a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -10,7 +10,7 @@ public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition { - public static final String VERSION = "1.5.0.0"; + public static final String VERSION = "2.0.0.0"; public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 5, 20); @Override diff --git a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml index 4b8a18a..0a9b0ec 100644 --- a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml +++ b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml @@ -86,4 +86,9 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml index f298789..9e4ff12 100644 --- a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml +++ b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml @@ -1,6 +1,6 @@ - + @@ -90,4 +90,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml index 40a6b57..0ff6096 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -544,5 +544,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/Task/dsf-task-hello-world.xml b/src/main/resources/fhir/Task/dsf-task-hello-world.xml index 1db9e48..51e1532 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -166,4 +166,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java index 200b798..88b89a5 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -13,6 +13,7 @@ import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.InstantType; import org.hl7.fhir.r4.model.IntegerType; +import org.hl7.fhir.r4.model.Quantity; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.ResourceType; import org.hl7.fhir.r4.model.StringType; @@ -101,6 +102,11 @@ public void testMaximalTaskHelloWorldValid() new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("coding-example")) .getType().addCoding( new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("coding-example")); + task.addInput() + .setValue(new Quantity().setSystem("http://unitsofmeasure.org").setCode("m").setUnit("m").setValue(1) + .setComparator(Quantity.QuantityComparator.LESS_OR_EQUAL)) + .getType().addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("quantity-example")); ValidationResult result = resourceValidator.validate(task); ValidationSupportRule.logValidationMessages(logger, result); From 8c4ff0505cbe8307e1f96ddbb4d119fecf98ffba Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 31 Oct 2025 10:20:58 +0100 Subject: [PATCH 09/18] DSF 2.0.0 does not deploy questionnaire with profile version set --- src/main/resources/fhir/Questionnaire/dsf-hello-user.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml index 9e4ff12..f87831a 100644 --- a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml +++ b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml @@ -1,6 +1,6 @@ - + From 0a9736ea9ac9a422e03d89c88cae7da970011a2c Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Fri, 31 Oct 2025 10:43:00 +0100 Subject: [PATCH 10/18] removed not needed repo config --- pom.xml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/pom.xml b/pom.xml index bfe6c9e..73ccd7b 100644 --- a/pom.xml +++ b/pom.xml @@ -259,34 +259,6 @@ - - - github - GitHub DSF Apache Maven Packages - https://maven.pkg.github.com/datasharingframework/dsf - - false - - - true - - - - - - - github - GitHub DSF Apache Maven Packages - https://maven.pkg.github.com/datasharingframework/dsf - - false - - - true - - - - validate-and-check From 2498ccd44ed8262c927033d3cb17da2264bd5ca6 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Fri, 31 Oct 2025 10:45:51 +0100 Subject: [PATCH 11/18] modifications for datasharingframework/dsf#379 --- .../ActivityDefinition/dsf-hello-user.xml | 2 +- .../ActivityDefinition/dsf-hello-world.xml | 2 +- .../fhir/CodeSystem/dsf-hello-world.xml | 1 + .../fhir/Questionnaire/dsf-hello-user.xml | 2 +- .../dsf-task-hello-user.xml | 3 +- .../dsf-task-hello-world.xml | 3 +- .../fhir/Task/dsf-task-hello-user.xml | 72 ++-- .../fhir/Task/dsf-task-hello-world.xml | 334 +++++++++--------- .../fhir/ValueSet/dsf-hello-world.xml | 1 + .../ActivityDefinitionProfileTest.java | 19 +- .../dev/dsf/fhir/profile/TaskProfileTest.java | 6 +- 11 files changed, 226 insertions(+), 219 deletions(-) diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml index 848ab0f..44b7162 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml @@ -1,10 +1,10 @@ + - diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml index ad96995..3c6cfe7 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml @@ -1,10 +1,10 @@ + - diff --git a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml index 4e40ad6..0b76ea0 100644 --- a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml +++ b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml @@ -1,5 +1,6 @@ + diff --git a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml index f298789..842505a 100644 --- a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml +++ b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml index 722c37e..9899327 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml @@ -1,5 +1,6 @@ + @@ -18,7 +19,7 @@ - + diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml index 47410d2..14424db 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -1,5 +1,6 @@ + @@ -18,7 +19,7 @@ - + diff --git a/src/main/resources/fhir/Task/dsf-task-hello-user.xml b/src/main/resources/fhir/Task/dsf-task-hello-user.xml index a5818d8..2c8f384 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-user.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-user.xml @@ -1,38 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/Task/dsf-task-hello-world.xml b/src/main/resources/fhir/Task/dsf-task-hello-world.xml index 1db9e48..9c87b56 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -1,169 +1,169 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/ValueSet/dsf-hello-world.xml b/src/main/resources/fhir/ValueSet/dsf-hello-world.xml index 4aba52b..e2edf98 100644 --- a/src/main/resources/fhir/ValueSet/dsf-hello-world.xml +++ b/src/main/resources/fhir/ValueSet/dsf-hello-world.xml @@ -1,5 +1,6 @@ + diff --git a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index 42f83cf..7191cb6 100644 --- a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -27,12 +27,14 @@ public class ActivityDefinitionProfileTest @ClassRule public static final ValidationSupportRule validationRule = new ValidationSupportRule(pluginDefinition.getVersion(), pluginDefinition.getReleaseDate(), - Arrays.asList("dsf-activity-definition-2.0.0.xml", "dsf-extension-process-authorization-2.0.0.xml", + Arrays.asList("dsf-extension-read-access-organization-2.0.0.xml", + "dsf-extension-read-access-parent-organization-role-2.0.0.xml", "dsf-meta-2.0.0.xml", + "dsf-extension-process-authorization-2.0.0.xml", + "dsf-extension-process-authorization-practitioner-2.0.0.xml", "dsf-extension-process-authorization-organization-2.0.0.xml", "dsf-extension-process-authorization-organization-practitioner-2.0.0.xml", "dsf-extension-process-authorization-parent-organization-role-2.0.0.xml", "dsf-extension-process-authorization-parent-organization-role-practitioner-2.0.0.xml", - "dsf-extension-process-authorization-practitioner-2.0.0.xml", "dsf-coding-process-authorization-local-all-2.0.0.xml", "dsf-coding-process-authorization-local-all-practitioner-2.0.0.xml", "dsf-coding-process-authorization-local-organization-2.0.0.xml", @@ -40,13 +42,14 @@ public class ActivityDefinitionProfileTest "dsf-coding-process-authorization-local-parent-organization-role-2.0.0.xml", "dsf-coding-process-authorization-local-parent-organization-role-practitioner-2.0.0.xml", "dsf-coding-process-authorization-remote-all-2.0.0.xml", + "dsf-coding-process-authorization-remote-organization-2.0.0.xml", "dsf-coding-process-authorization-remote-parent-organization-role-2.0.0.xml", - "dsf-coding-process-authorization-remote-organization-2.0.0.xml"), - Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", - "dsf-process-authorization-1.0.0.xml", "dsf-read-access-tag-1.0.0.xml", "dsf-hello-world.xml"), - Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", - "dsf-process-authorization-recipient-1.0.0.xml", "dsf-process-authorization-requester-1.0.0.xml", - "dsf-read-access-tag-1.0.0.xml", "dsf-hello-world.xml")); + "dsf-activity-definition-2.0.0.xml"), + Arrays.asList("dsf-organization-role-2.0.0.xml", "dsf-practitioner-role-2.0.0.xml", + "dsf-process-authorization-2.0.0.xml", "dsf-read-access-tag-2.0.0.xml", "dsf-hello-world.xml"), + Arrays.asList("dsf-organization-role-2.0.0.xml", "dsf-practitioner-role-2.0.0.xml", + "dsf-process-authorization-recipient-2.0.0.xml", "dsf-process-authorization-requester-2.0.0.xml", + "dsf-read-access-tag-2.0.0.xml", "dsf-hello-world.xml")); private final ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); diff --git a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java index ffddf81..031b488 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -46,9 +46,9 @@ public class TaskProfileTest @ClassRule public static final ValidationSupportRule validationRule = new ValidationSupportRule(def.getResourceVersion(), def.getReleaseDate(), - Arrays.asList("dsf-task-base-2.0.0.xml", "dsf-task-hello-world.xml", "dsf-task-hello-user.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "dsf-hello-world.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "dsf-hello-world.xml")); + Arrays.asList("dsf-task-2.0.0.xml", "dsf-task-hello-world.xml", "dsf-task-hello-user.xml"), + Arrays.asList("dsf-read-access-tag-2.0.0.xml", "dsf-bpmn-message-2.0.0.xml", "dsf-hello-world.xml"), + Arrays.asList("dsf-read-access-tag-2.0.0.xml", "dsf-bpmn-message-2.0.0.xml", "dsf-hello-world.xml")); private ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); From 07a5267c0229788b9337358688bb2cfe9430a918 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Fri, 31 Oct 2025 23:19:55 +0100 Subject: [PATCH 12/18] formatting --- .../fhir/Task/dsf-task-hello-world.xml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/resources/fhir/Task/dsf-task-hello-world.xml b/src/main/resources/fhir/Task/dsf-task-hello-world.xml index 77460fa..33c5aa3 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -166,19 +166,19 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file From 4ca795cf8e1d4c78b684d4d02c6e7f67afce8e99 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Sat, 1 Nov 2025 00:23:36 +0100 Subject: [PATCH 13/18] profile and task modifications Input and Output parameters with a type from a process plugins codesystem should always declare codes with the plugin FHIR resource version. --- .../dsf-task-hello-world.xml | 160 +++++++++++++----- .../fhir/Task/dsf-task-hello-world.xml | 14 ++ .../dev/dsf/fhir/profile/TaskProfileTest.java | 60 ++++--- 3 files changed, 164 insertions(+), 70 deletions(-) diff --git a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml index d567e20..beb3678 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -69,11 +69,16 @@ - + + + + + + @@ -104,11 +109,16 @@ - + + + + + + @@ -139,11 +149,16 @@ - + + + + + + @@ -174,11 +189,16 @@ - + + + + + + @@ -209,11 +229,16 @@ - + + + + + + @@ -244,11 +269,16 @@ - + + + + + + @@ -279,11 +309,16 @@ - + + + + + + @@ -314,11 +349,16 @@ - + + + + + + @@ -349,11 +389,16 @@ - + + + + + + @@ -389,6 +434,11 @@ + + + + + @@ -432,6 +482,11 @@ + + + + + @@ -484,6 +539,11 @@ + + + + + @@ -522,11 +582,16 @@ - + + + + + + @@ -545,40 +610,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fhir/Task/dsf-task-hello-world.xml b/src/main/resources/fhir/Task/dsf-task-hello-world.xml index 33c5aa3..2aa7205 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -40,6 +40,7 @@ + @@ -49,6 +50,7 @@ + @@ -58,6 +60,7 @@ + @@ -67,6 +70,7 @@ + @@ -76,6 +80,7 @@ + @@ -85,6 +90,7 @@ + @@ -94,6 +100,7 @@ + @@ -103,6 +110,7 @@ + @@ -112,6 +120,7 @@ + @@ -121,6 +130,7 @@ + @@ -132,6 +142,7 @@ + @@ -147,6 +158,7 @@ + @@ -159,6 +171,7 @@ + @@ -171,6 +184,7 @@ + diff --git a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java index af96017..72b4bfb 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -71,43 +71,51 @@ public void testMaximalTaskHelloWorldValid() { Task task = createValidTaskHelloWorld(); - task.addInput().setValue(new DecimalType(1.1)).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("decimal-example")); - task.addInput().setValue(new BooleanType(true)).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("boolean-example")); - task.addInput().setValue(new DateType(new Date())).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("date-example")); - task.addInput().setValue(new TimeType("10:00:00")).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("time-example")); - task.addInput().setValue(new DateTimeType(new Date())).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("date-time-example")); - task.addInput().setValue(new InstantType(new Date())).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("instant-example")); + task.addInput().setValue(new DecimalType(1.1)).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("decimal-example").setVersion(def.getResourceVersion())); + task.addInput().setValue(new BooleanType(true)).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("boolean-example").setVersion(def.getResourceVersion())); + task.addInput().setValue(new DateType(new Date())).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("date-example") + .setVersion(def.getResourceVersion())); + task.addInput().setValue(new TimeType("10:00:00")).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("time-example") + .setVersion(def.getResourceVersion())); + task.addInput().setValue(new DateTimeType(new Date())).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("date-time-example").setVersion(def.getResourceVersion())); + task.addInput().setValue(new InstantType(new Date())).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("instant-example").setVersion(def.getResourceVersion())); task.addInput().setValue(new UriType("http://dsf.dev/fhir/CodeSystem/hello-world")).getType() - .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("uri-example")); - task.addInput().setValue(new Reference("http://hl7.org/fhir/Patient/example-id")).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("reference-example")); + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("uri-example") + .setVersion(def.getResourceVersion())); + task.addInput().setValue(new Reference("http://hl7.org/fhir/Patient/example-id")).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("reference-example").setVersion(def.getResourceVersion())); task.addInput() .setValue(new Reference().setType("Patient") .setIdentifier(new Identifier().setSystem("http://dsf.dev/sid/hello-world-identifier") .setValue("identifier-value"))) .getType().addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") - .setCode("reference-identifier-example")); + .setCode("reference-identifier-example").setVersion(def.getResourceVersion())); task.addInput() .setValue(new Identifier().setSystem("http://dsf.dev/sid/hello-world-identifier") .setValue("identifier-value")) .getType().addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") - .setCode("identifier-example")); + .setCode("identifier-example").setVersion(def.getResourceVersion())); task.addInput() .setValue( new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("coding-example")) - .getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("coding-example")); + .getType().addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("coding-example").setVersion(def.getResourceVersion())); task.addInput() .setValue(new Quantity().setSystem("http://unitsofmeasure.org").setCode("m").setUnit("m").setValue(1) .setComparator(Quantity.QuantityComparator.LESS_OR_EQUAL)) .getType().addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") - .setCode("quantity-example")); + .setCode("quantity-example").setVersion(def.getResourceVersion())); ValidationResult result = resourceValidator.validate(task); ValidationSupportRule.logValidationMessages(logger, result); @@ -120,7 +128,7 @@ private Task createValidTaskHelloWorld() { Task task = new Task(); task.getMeta().addProfile("http://dsf.dev/fhir/StructureDefinition/task-hello-world"); - task.setInstantiatesCanonical("http://dsf.dev/bpe/Process/helloWorld|" + def.getVersion()); + task.setInstantiatesCanonical("http://dsf.dev/bpe/Process/helloWorld|" + def.getResourceVersion()); task.setStatus(TaskStatus.REQUESTED); task.setIntent(TaskIntent.ORDER); task.setAuthoredOn(new Date()); @@ -132,10 +140,12 @@ private Task createValidTaskHelloWorld() task.addInput().setValue(new StringType("helloWorld")).getType() .addCoding(CodeSystems.BpmnMessage.messageName()); - task.addInput().setValue(new StringType("string-value")).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("string-example")); - task.addInput().setValue(new IntegerType(1)).getType().addCoding( - new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world").setCode("integer-example")); + task.addInput().setValue(new StringType("string-value")).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("string-example").setVersion(def.getResourceVersion())); + task.addInput().setValue(new IntegerType(1)).getType() + .addCoding(new Coding().setSystem("http://dsf.dev/fhir/CodeSystem/hello-world") + .setCode("integer-example").setVersion(def.getResourceVersion())); return task; } From 99ac3062bc7263cbafe4388bab92f0dbe40abdb4 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Sat, 1 Nov 2025 00:44:37 +0100 Subject: [PATCH 14/18] formatting --- .../fhir/Questionnaire/dsf-hello-user.xml | 133 +++++++++--------- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml index f87831a..87bdf6a 100644 --- a/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml +++ b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml @@ -1,105 +1,106 @@ - + - - + + - + - + - + - + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + \ No newline at end of file From 045da83595ee84d3eb2c5e14f880c9fa89151187 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 4 Nov 2025 20:15:53 +0100 Subject: [PATCH 15/18] dsf version to 2.0.0-RC1, additional entries in plugin.properties --- pom.xml | 25 +++++++++++++++---------- src/main/resources/plugin.properties | 5 ++++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 5811410..6cce6e6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,23 +5,28 @@ dev.dsf dsf-process-hello-world - 2.0.0.0-SNAPSHOT + 2.0.0.0-RC1 jar - 2025-10-20T22:00:00Z + 2025-11-04T20:15:00Z UTF-8 25 25 25 - 2.0.0-SNAPSHOT + 2.0.0-RC1 ../dsf dsf-process-hello-world - Hello World DSF process + Hello World Process Plugin https://github.com/datasharingframework/dsf-process-hello-world + + + Heilbronn University of Applied Sciences + https://www.hs-heilbronn.de + scm:git:git://github.com/datasharingframework/dsf-process-hello-world.git @@ -333,7 +338,7 @@ maven-dependency-plugin - copy-process-plugin-to-docker-test-setup + copy-process-plugin-to-docker-dev-setup package copy @@ -346,11 +351,11 @@ ${project.version} - ${dsf.location}/dsf-docker-test-setup/bpe/process + ${dsf.location}/dsf-docker-dev-setup/bpe/process - copy-process-plugin-to-docker-test-setup-3dic-ttp/dic1 + copy-process-plugin-to-docker-dev-setup-3dic-ttp/dic1 package copy @@ -363,7 +368,7 @@ ${project.version} - ${dsf.location}/dsf-docker-test-setup-3dic-ttp/dic1/bpe/process + ${dsf.location}/dsf-docker-dev-setup-3dic-ttp/dic1/bpe/process @@ -374,14 +379,14 @@ - ${dsf.location}/dsf-docker-test-setup/bpe/process + ${dsf.location}/dsf-docker-dev-setup/bpe/process ${project.artifactId}-${project.version}.jar false - ${dsf.location}/dsf-docker-test-setup-3dic-ttp/dic1/bpe/process + ${dsf.location}/dsf-docker-dev-setup-3dic-ttp/dic1/bpe/process ${project.artifactId}-${project.version}.jar diff --git a/src/main/resources/plugin.properties b/src/main/resources/plugin.properties index 7d83caf..4d0ef3c 100644 --- a/src/main/resources/plugin.properties +++ b/src/main/resources/plugin.properties @@ -1,3 +1,6 @@ release-date=${project.build.outputTimestamp} version=${project.version} -name=${project.artifactId} \ No newline at end of file +name=${project.artifactId} +title=${project.description} +publisher=${project.organization.name} +publisher-email=dsf-gecko@hs-heilbronn.de \ No newline at end of file From 952e430cbfcc83946e79ac7473f4228701030423 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 4 Nov 2025 20:17:18 +0100 Subject: [PATCH 16/18] plugin version back to ...-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cce6e6..0ebb4f3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.dsf dsf-process-hello-world - 2.0.0.0-RC1 + 2.0.0.0-SNAPSHOT jar From 43c338d2ade2121de5abcc742f1bfd846eaeb41f Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 4 Nov 2025 20:18:22 +0100 Subject: [PATCH 17/18] updated copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index fccc574..e987cdd 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 Heilbronn University of Applied Sciences + 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. From 678dbe027bc3c0f4125fb909ef33d44c90ab6658 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 4 Nov 2025 23:49:48 +0100 Subject: [PATCH 18/18] github actions config --- .github/workflows/maven-build.yml | 10 ++++++---- .github/workflows/maven-publish.yml | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 5fb8224..09ec9d1 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -11,11 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v1 + - uses: actions/checkout@v5 + - name: Set up JDK 25 + uses: actions/setup-java@v5 with: - java-version: 17 + distribution: 'zulu' + java-version: 25 + cache: 'maven' - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 91d3940..be98706 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -20,11 +20,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v1 + - uses: actions/checkout@v5 + - name: Set up JDK 25 + uses: actions/setup-java@v5 with: - java-version: 17 + distribution: 'zulu' + java-version: 25 + cache: 'maven' - name: Publish with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}