From be57821aa7c42cbf0bc631fb5f8f49dad622b4d4 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 19 Jun 2023 14:13:02 +0200 Subject: [PATCH 01/11] adapt to new dsf 1.0.0 api --- LICENSE | 2 +- dsf-bpe-process-hello-world/pom.xml | 295 --------------- .../highmed/dsf/bpe/ConstantsHelloWorld.java | 27 -- .../HelloWorldProcessPluginDefinition.java | 77 ---- .../highmed/dsf/bpe/service/HelloWorld.java | 29 -- .../bpe/spring/config/HelloWorldConfig.java | 40 --- ...rg.highmed.dsf.bpe.ProcessPluginDefinition | 1 - .../bpe/HelloProcessPluginDefinitionTest.java | 44 --- ...tractHelloUser3MedicTtpExampleStarter.java | 47 --- ...ractHelloWorld3MedicTtpExampleStarter.java | 47 --- ...elloUser3MedicTtpDockerExampleStarter.java | 15 - .../HelloUser3MedicTtpExampleStarter.java | 15 - ...lloWorld3MedicTtpDockerExampleStarter.java | 15 - .../HelloWorld3MedicTtpExampleStarter.java | 15 - .../dsf/fhir/profile/TaskProfileTest.java | 109 ------ .../src/test/resources/log4j2.xml | 67 ---- ...config.xml => eclipse-formatter-config.xml | 0 pom.xml | 338 ++++++++++-------- .../java/dev/dsf/bpe/ConstantsHelloWorld.java | 20 ++ .../HelloWorldProcessPluginDefinition.java | 65 ++++ .../main/java/dev}/dsf/bpe/message/README.md | 0 .../java/dev/dsf/bpe/service/HelloWorld.java | 28 ++ .../dsf/bpe/service/LogUserTaskResponse.java | 21 +- .../bpe/spring/config/HelloWorldConfig.java | 36 ++ .../main/java/dev}/dsf/bpe/variable/README.md | 0 .../dev.dsf.bpe.v1.ProcessPluginDefinition | 1 + .../main/resources/bpe/hello-user.bpmn | 8 +- .../main/resources/bpe/hello-world.bpmn | 6 +- .../ActivityDefinition/dsf-hello-user.xml | 18 +- .../ActivityDefinition/dsf-hello-world.xml | 18 +- .../fhir/Questionnaire/dsf-hello-user.xml | 6 +- .../dsf-task-hello-user.xml | 18 +- .../dsf-task-hello-world.xml | 18 +- .../fhir/Task/dsf-task-hello-user.xml | 38 ++ .../fhir/Task/dsf-task-hello-world.xml | 38 ++ .../bpe/HelloProcessPluginDefinitionTest.java | 34 ++ .../bpe/start/HelloUserExampleStarter.java | 48 +++ .../bpe/start/HelloWorldExampleStarter.java | 53 +++ .../ActivityDefinitionProfileTest.java | 54 +-- .../dev/dsf/fhir/profile/TaskProfileTest.java | 107 ++++++ src/test/resources/log4j2.xml | 25 ++ 41 files changed, 766 insertions(+), 1077 deletions(-) delete mode 100755 dsf-bpe-process-hello-world/pom.xml delete mode 100644 dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/ConstantsHelloWorld.java delete mode 100644 dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java delete mode 100644 dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/HelloWorld.java delete mode 100755 dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/spring/config/HelloWorldConfig.java delete mode 100644 dsf-bpe-process-hello-world/src/main/resources/META-INF/services/org.highmed.dsf.bpe.ProcessPluginDefinition delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/HelloProcessPluginDefinitionTest.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloUser3MedicTtpExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloWorld3MedicTtpExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpDockerExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpDockerExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpExampleStarter.java delete mode 100644 dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/TaskProfileTest.java delete mode 100644 dsf-bpe-process-hello-world/src/test/resources/log4j2.xml rename src/main/resources/eclipse-formatter-config.xml => eclipse-formatter-config.xml (100%) create mode 100644 src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java create mode 100644 src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java rename {dsf-bpe-process-hello-world/src/main/java/org/highmed => src/main/java/dev}/dsf/bpe/message/README.md (100%) create mode 100644 src/main/java/dev/dsf/bpe/service/HelloWorld.java rename {dsf-bpe-process-hello-world/src/main/java/org/highmed => src/main/java/dev}/dsf/bpe/service/LogUserTaskResponse.java (52%) create mode 100755 src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java rename {dsf-bpe-process-hello-world/src/main/java/org/highmed => src/main/java/dev}/dsf/bpe/variable/README.md (100%) create mode 100644 src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition rename dsf-bpe-process-hello-world/src/main/resources/bpe/helloUser.bpmn => src/main/resources/bpe/hello-user.bpmn (90%) rename dsf-bpe-process-hello-world/src/main/resources/bpe/helloWorld.bpmn => src/main/resources/bpe/hello-world.bpmn (90%) rename dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloUser.xml => src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml (65%) rename dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloWorld.xml => src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml (64%) rename dsf-bpe-process-hello-world/src/main/resources/fhir/Questionnaire/highmed-questionnaire-hello-user.xml => src/main/resources/fhir/Questionnaire/dsf-hello-user.xml (92%) rename dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-user.xml => src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml (71%) rename dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-world.xml => src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml (71%) create mode 100644 src/main/resources/fhir/Task/dsf-task-hello-user.xml create mode 100644 src/main/resources/fhir/Task/dsf-task-hello-world.xml create mode 100644 src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java create mode 100644 src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java create mode 100644 src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java rename {dsf-bpe-process-hello-world/src/test/java/org/highmed => src/test/java/dev}/dsf/fhir/profile/ActivityDefinitionProfileTest.java (55%) create mode 100644 src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java create mode 100644 src/test/resources/log4j2.xml diff --git a/LICENSE b/LICENSE index e28e453..fccc574 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 2023 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. diff --git a/dsf-bpe-process-hello-world/pom.xml b/dsf-bpe-process-hello-world/pom.xml deleted file mode 100755 index 9a00b9e..0000000 --- a/dsf-bpe-process-hello-world/pom.xml +++ /dev/null @@ -1,295 +0,0 @@ - - 4.0.0 - - dsf-bpe-process-hello-world - - - org.highmed.dsf - dsf-bpe-example-processes-pom - 0.9.0-SNAPSHOT - - - - ${project.basedir}/.. - ../../highmed-dsf - - - - - org.highmed.dsf - dsf-bpe-process-base - provided - - - - org.highmed.dsf - dsf-fhir-validation - test - - - de.hs-heilbronn.mi - log4j2-utils - test - - - junit - junit - test - - - org.highmed.dsf - dsf-bpe-process-base - test - test-jar - - - - - - copy-to-highmed-dsf-process - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-process-to-docker-test-setup - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup/bpe/process - - - - copy-process-to-docker-test-setup-3medic-ttp/medic1 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic1/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp/medic2 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic2/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp/medic3 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic3/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp/ttp - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/ttp/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp-docker/medic1 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic1/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp-docker/medic2 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic2/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp-docker/medic3 - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic3/bpe/process - - - - - copy-process-to-docker-test-setup-3medic-ttp-docker/ttp - package - - copy - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/ttp/bpe/process - - - - - - - org.apache.maven.plugins - maven-clean-plugin - - - - ${dsf.location}/dsf-docker-test-setup/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic1/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic2/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic3/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp/ttp/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic1/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic2/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic3/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - ${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/ttp/bpe/process - - ${project.artifactId}-${project.version}.jar - - false - - - - - - - - - \ No newline at end of file diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/ConstantsHelloWorld.java b/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/ConstantsHelloWorld.java deleted file mode 100644 index d452e34..0000000 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/ConstantsHelloWorld.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.highmed.dsf.bpe; - -import static org.highmed.dsf.bpe.ConstantsBase.PROCESS_HIGHMED_URI_BASE; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; - -public interface ConstantsHelloWorld -{ - String PROCESS_NAME_HELLO_WORLD = "helloWorld"; - String PROCESS_NAME_FULL_HELLO_WORLD = "highmedorg_" + PROCESS_NAME_HELLO_WORLD; - - String PROCESS_NAME_HELLO_USER = "helloUser"; - String PROCESS_NAME_FULL_HELLO_USER = "highmedorg_" + PROCESS_NAME_HELLO_USER; - - String PROFILE_HIGHMED_TASK_HELLO_WORLD = "http://highmed.org/fhir/StructureDefinition/task-hello-world"; - String PROFILE_HIGHMED_TASK_HELLO_WORLD_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_HELLO_WORLD + "|" + VERSION; - String PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + PROCESS_NAME_HELLO_WORLD + "/"; - String PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI - + VERSION; - String PROFILE_HIGHMED_TASK_HELLO_WORLD_MESSAGE_NAME = "helloWorld"; - - String PROFILE_HIGHMED_TASK_HELLO_USER = "http://highmed.org/fhir/StructureDefinition/task-hello-user"; - String PROFILE_HIGHMED_TASK_HELLO_USER_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_HELLO_USER + "|" + VERSION; - String PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + PROCESS_NAME_HELLO_USER + "/"; - String PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI - + VERSION; - String PROFILE_HIGHMED_TASK_HELLO_USER_MESSAGE_NAME = "helloUser"; -} 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 deleted file mode 100644 index 2bb80a5..0000000 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.highmed.dsf.bpe; - -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD; - -import java.time.LocalDate; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.stream.Stream; - -import org.highmed.dsf.bpe.spring.config.HelloWorldConfig; -import org.highmed.dsf.fhir.resources.AbstractResource; -import org.highmed.dsf.fhir.resources.ActivityDefinitionResource; -import org.highmed.dsf.fhir.resources.QuestionnaireResource; -import org.highmed.dsf.fhir.resources.ResourceProvider; -import org.highmed.dsf.fhir.resources.StructureDefinitionResource; -import org.springframework.core.env.PropertyResolver; - -import ca.uhn.fhir.context.FhirContext; - -public class HelloWorldProcessPluginDefinition implements ProcessPluginDefinition -{ - public static final String VERSION = "0.9.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2022, 10, 24); - - @Override - public String getName() - { - return "dsf-bpe-process-hello-world-and-user"; - } - - @Override - public String getVersion() - { - return VERSION; - } - - @Override - public LocalDate getReleaseDate() - { - return RELEASE_DATE; - } - - @Override - public Stream getBpmnFiles() - { - return Stream.of("bpe/helloWorld.bpmn", "bpe/helloUser.bpmn"); - } - - @Override - public Stream> getSpringConfigClasses() - { - return Stream.of(HelloWorldConfig.class); - } - - @Override - public ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader classLoader, - PropertyResolver resolver) - { - var aHelloUser = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-helloUser.xml"); - var aHelloWorld = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-helloWorld.xml"); - - var qHelloWorld = QuestionnaireResource.file("fhir/Questionnaire/highmed-questionnaire-hello-user.xml"); - - var tHelloUser = StructureDefinitionResource.file("fhir/StructureDefinition/highmed-task-hello-user.xml"); - var tHelloWorld = StructureDefinitionResource.file("fhir/StructureDefinition/highmed-task-hello-world.xml"); - - Map> resourcesByProcessKeyAndVersion = Map.of( - PROCESS_NAME_FULL_HELLO_USER + "/" + VERSION, Arrays.asList(aHelloUser, qHelloWorld, tHelloUser), - PROCESS_NAME_FULL_HELLO_WORLD + "/" + VERSION, Arrays.asList(aHelloWorld, tHelloWorld)); - - return ResourceProvider.read(VERSION, RELEASE_DATE, - () -> fhirContext.newXmlParser().setStripVersionsFromReferences(false), classLoader, resolver, - resourcesByProcessKeyAndVersion); - } -} diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/HelloWorld.java b/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/HelloWorld.java deleted file mode 100644 index ae78e57..0000000 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/HelloWorld.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.highmed.dsf.bpe.service; - -import org.camunda.bpm.engine.delegate.DelegateExecution; -import org.highmed.dsf.bpe.delegate.AbstractServiceDelegate; -import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper; -import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider; -import org.highmed.dsf.fhir.task.TaskHelper; -import org.hl7.fhir.r4.model.Task; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class HelloWorld extends AbstractServiceDelegate -{ - private static final Logger logger = LoggerFactory.getLogger(HelloWorld.class); - - public HelloWorld(FhirWebserviceClientProvider clientProvider, TaskHelper taskHelper, - ReadAccessHelper readAccessHelper) - { - super(clientProvider, taskHelper, readAccessHelper); - } - - @Override - public void doExecute(DelegateExecution execution) - { - Task task = getCurrentTaskFromExecutionVariables(execution); - logger.info("Hello World from organization with identifier '{}'", - task.getRequester().getIdentifier().getValue()); - } -} diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/spring/config/HelloWorldConfig.java b/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/spring/config/HelloWorldConfig.java deleted file mode 100755 index 62dddc9..0000000 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/spring/config/HelloWorldConfig.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.highmed.dsf.bpe.spring.config; - -import org.highmed.dsf.bpe.service.HelloWorld; -import org.highmed.dsf.bpe.service.LogUserTaskResponse; -import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper; -import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider; -import org.highmed.dsf.fhir.task.TaskHelper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import ca.uhn.fhir.context.FhirContext; - -@Configuration -public class HelloWorldConfig -{ - @Autowired - private FhirWebserviceClientProvider clientProvider; - - @Autowired - private TaskHelper taskHelper; - - @Autowired - private ReadAccessHelper readAccessHelper; - - @Autowired - private FhirContext fhirContext; - - @Bean - public HelloWorld helloWorld() - { - return new HelloWorld(clientProvider, taskHelper, readAccessHelper); - } - - @Bean - public LogUserTaskResponse logUserTaskResponse() - { - return new LogUserTaskResponse(clientProvider, taskHelper, readAccessHelper, fhirContext); - } -} diff --git a/dsf-bpe-process-hello-world/src/main/resources/META-INF/services/org.highmed.dsf.bpe.ProcessPluginDefinition b/dsf-bpe-process-hello-world/src/main/resources/META-INF/services/org.highmed.dsf.bpe.ProcessPluginDefinition deleted file mode 100644 index f3385d8..0000000 --- a/dsf-bpe-process-hello-world/src/main/resources/META-INF/services/org.highmed.dsf.bpe.ProcessPluginDefinition +++ /dev/null @@ -1 +0,0 @@ -org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition \ No newline at end of file diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/HelloProcessPluginDefinitionTest.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/HelloProcessPluginDefinitionTest.java deleted file mode 100644 index f29e2ac..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/HelloProcessPluginDefinitionTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.highmed.dsf.bpe; - -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.highmed.dsf.fhir.resources.ResourceProvider; -import org.junit.Test; -import org.springframework.core.env.StandardEnvironment; - -import ca.uhn.fhir.context.FhirContext; - -public class HelloProcessPluginDefinitionTest -{ - @Test - public void testHelloUserResourceLoading() - { - ProcessPluginDefinition definition = new HelloWorldProcessPluginDefinition(); - ResourceProvider provider = definition.getResourceProvider(FhirContext.forR4(), getClass().getClassLoader(), - new StandardEnvironment()); - assertNotNull(provider); - - var helloUser = provider.getResources(PROCESS_NAME_FULL_HELLO_USER + "/" + VERSION, - s -> ResourceProvider.empty()); - assertNotNull(helloUser); - assertEquals(3, helloUser.count()); - } - - @Test - public void testHelloWorldResourceLoading() - { - ProcessPluginDefinition definition = new HelloWorldProcessPluginDefinition(); - ResourceProvider provider = definition.getResourceProvider(FhirContext.forR4(), getClass().getClassLoader(), - new StandardEnvironment()); - assertNotNull(provider); - - var helloWorld = provider.getResources(PROCESS_NAME_FULL_HELLO_WORLD + "/" + VERSION, - s -> ResourceProvider.empty()); - assertNotNull(helloWorld); - assertEquals(2, helloWorld.count()); - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloUser3MedicTtpExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloUser3MedicTtpExampleStarter.java deleted file mode 100644 index 523d5fa..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloUser3MedicTtpExampleStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN; -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsBase.NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1; - -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 org.hl7.fhir.r4.model.Task.TaskIntent; -import org.hl7.fhir.r4.model.Task.TaskStatus; - -public abstract class AbstractHelloUser3MedicTtpExampleStarter -{ - protected void main(String[] args, String baseUrl) throws Exception - { - Task task = createStartResource(); - ExampleStarter.forServer(args, baseUrl).startWith(task); - } - - private Task createStartResource() - { - Task task = new Task(); - task.getMeta().addProfile(PROFILE_HIGHMED_TASK_HELLO_USER_AND_LATEST_VERSION); - task.setInstantiatesUri(PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI_AND_LATEST_VERSION); - task.setStatus(TaskStatus.REQUESTED); - task.setIntent(TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER) - .setValue(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER) - .setValue(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1); - - task.addInput().setValue(new StringType(PROFILE_HIGHMED_TASK_HELLO_USER_MESSAGE_NAME)).getType().addCoding() - .setSystem(CODESYSTEM_HIGHMED_BPMN).setCode(CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME); - - return task; - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloWorld3MedicTtpExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloWorld3MedicTtpExampleStarter.java deleted file mode 100644 index 3b4ff52..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/AbstractHelloWorld3MedicTtpExampleStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN; -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsBase.NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1; - -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 org.hl7.fhir.r4.model.Task.TaskIntent; -import org.hl7.fhir.r4.model.Task.TaskStatus; - -public abstract class AbstractHelloWorld3MedicTtpExampleStarter -{ - protected void main(String[] args, String baseUrl) throws Exception - { - Task task = createStartResource(); - ExampleStarter.forServer(args, baseUrl).startWith(task); - } - - private Task createStartResource() - { - Task task = new Task(); - task.getMeta().addProfile(PROFILE_HIGHMED_TASK_HELLO_WORLD_AND_LATEST_VERSION); - task.setInstantiatesUri(PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI_AND_LATEST_VERSION); - task.setStatus(TaskStatus.REQUESTED); - task.setIntent(TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER) - .setValue(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER) - .setValue(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER_VALUE_MEDIC_1); - - task.addInput().setValue(new StringType(PROFILE_HIGHMED_TASK_HELLO_WORLD_MESSAGE_NAME)).getType().addCoding() - .setSystem(CODESYSTEM_HIGHMED_BPMN).setCode(CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME); - - return task; - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpDockerExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpDockerExampleStarter.java deleted file mode 100644 index 4acecd6..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpDockerExampleStarter.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.MEDIC_1_DOCKER_FHIR_BASE_URL; - -public class HelloUser3MedicTtpDockerExampleStarter extends AbstractHelloUser3MedicTtpExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // highmed-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 - { - new HelloUser3MedicTtpDockerExampleStarter().main(args, MEDIC_1_DOCKER_FHIR_BASE_URL); - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpExampleStarter.java deleted file mode 100644 index dcf325b..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloUser3MedicTtpExampleStarter.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.MEDIC_1_FHIR_BASE_URL; - -public class HelloUser3MedicTtpExampleStarter extends AbstractHelloUser3MedicTtpExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // highmed-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 - { - new HelloUser3MedicTtpExampleStarter().main(args, MEDIC_1_FHIR_BASE_URL); - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpDockerExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpDockerExampleStarter.java deleted file mode 100644 index 28c76a8..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpDockerExampleStarter.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.MEDIC_1_DOCKER_FHIR_BASE_URL; - -public class HelloWorld3MedicTtpDockerExampleStarter extends AbstractHelloWorld3MedicTtpExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // highmed-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 - { - new HelloWorld3MedicTtpDockerExampleStarter().main(args, MEDIC_1_DOCKER_FHIR_BASE_URL); - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpExampleStarter.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpExampleStarter.java deleted file mode 100644 index b9d9748..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/bpe/start/HelloWorld3MedicTtpExampleStarter.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.highmed.dsf.bpe.start; - -import static org.highmed.dsf.bpe.start.ConstantsExampleStarters.MEDIC_1_FHIR_BASE_URL; - -public class HelloWorld3MedicTtpExampleStarter extends AbstractHelloWorld3MedicTtpExampleStarter -{ - // Environment variable "DSF_CLIENT_CERTIFICATE_PATH" or args[0]: the path to the client-certificate - // highmed-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 - { - new HelloWorld3MedicTtpExampleStarter().main(args, MEDIC_1_FHIR_BASE_URL); - } -} diff --git a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/TaskProfileTest.java b/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/TaskProfileTest.java deleted file mode 100644 index 317ffa2..0000000 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/TaskProfileTest.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.highmed.dsf.fhir.profile; - -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN; -import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsBase.NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD_MESSAGE_NAME; -import static org.highmed.dsf.bpe.ConstantsHelloWorld.PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI_AND_LATEST_VERSION; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.RELEASE_DATE; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; -import static org.junit.Assert.assertEquals; - -import java.util.Arrays; -import java.util.Date; - -import org.highmed.dsf.fhir.validation.ResourceValidator; -import org.highmed.dsf.fhir.validation.ResourceValidatorImpl; -import org.highmed.dsf.fhir.validation.ValidationSupportRule; -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.TaskIntent; -import org.hl7.fhir.r4.model.Task.TaskStatus; -import org.junit.ClassRule; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import ca.uhn.fhir.validation.ResultSeverityEnum; -import ca.uhn.fhir.validation.ValidationResult; - -public class TaskProfileTest -{ - private static final Logger logger = LoggerFactory.getLogger(TaskProfileTest.class); - - @ClassRule - public static final ValidationSupportRule validationRule = new ValidationSupportRule(VERSION, RELEASE_DATE, - Arrays.asList("highmed-task-base-0.5.0.xml", "highmed-task-hello-user.xml", "highmed-task-hello-world.xml"), - Arrays.asList("highmed-read-access-tag-0.5.0.xml", "highmed-bpmn-message-0.5.0.xml"), - Arrays.asList("highmed-read-access-tag-0.5.0.xml", "highmed-bpmn-message-0.5.0.xml")); - - private ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), - validationRule.getValidationSupport()); - - @Test - public void testTaskHelloUserValid() - { - Task task = createValidTaskHelloUser(); - - 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(PROFILE_HIGHMED_TASK_HELLO_USER); - task.setInstantiatesUri(PROFILE_HIGHMED_TASK_HELLO_USER_PROCESS_URI_AND_LATEST_VERSION); - task.setStatus(TaskStatus.REQUESTED); - task.setIntent(TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER).setValue("MeDIC 1"); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER).setValue("MeDIC 1"); - - task.addInput().setValue(new StringType(PROFILE_HIGHMED_TASK_HELLO_USER_MESSAGE_NAME)).getType().addCoding() - .setSystem(CODESYSTEM_HIGHMED_BPMN).setCode(CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME); - - return task; - } - - @Test - public void testTaskHelloWorldValid() - { - Task task = createValidTaskHelloWorld(); - - 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 createValidTaskHelloWorld() - { - Task task = new Task(); - task.getMeta().addProfile(PROFILE_HIGHMED_TASK_HELLO_WORLD); - task.setInstantiatesUri(PROFILE_HIGHMED_TASK_HELLO_WORLD_PROCESS_URI_AND_LATEST_VERSION); - task.setStatus(TaskStatus.REQUESTED); - task.setIntent(TaskIntent.ORDER); - task.setAuthoredOn(new Date()); - task.getRequester().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER).setValue("MeDIC 1"); - task.getRestriction().addRecipient().setType(ResourceType.Organization.name()).getIdentifier() - .setSystem(NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER).setValue("MeDIC 1"); - - task.addInput().setValue(new StringType(PROFILE_HIGHMED_TASK_HELLO_WORLD_MESSAGE_NAME)).getType().addCoding() - .setSystem(CODESYSTEM_HIGHMED_BPMN).setCode(CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME); - - return task; - } -} diff --git a/dsf-bpe-process-hello-world/src/test/resources/log4j2.xml b/dsf-bpe-process-hello-world/src/test/resources/log4j2.xml deleted file mode 100644 index f1afe81..0000000 --- a/dsf-bpe-process-hello-world/src/test/resources/log4j2.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/eclipse-formatter-config.xml b/eclipse-formatter-config.xml similarity index 100% rename from src/main/resources/eclipse-formatter-config.xml rename to eclipse-formatter-config.xml diff --git a/pom.xml b/pom.xml index 35f6bae..e5f1e11 100644 --- a/pom.xml +++ b/pom.xml @@ -1,36 +1,30 @@ - 4.0.0 - org.highmed.dsf - dsf-bpe-example-processes-pom - 0.9.0-SNAPSHOT - pom - - - dsf-bpe-process-hello-world - + dev.dsf + dsf-process-hello-world + 1.0.0.0-SNAPSHOT + jar UTF-8 - 11 - 11 - - 0.9.0 + 17 + 17 - ${project.basedir} + 1.0.0-SNAPSHOT + ../dsf - example-processes - Example processes to be deployed on the HiGHmed DSF - https://github.com/highmed/example-processes + dsf-process-hello-world + Hello World DSF process + https://github.com/datasharingframework/dsf-process-hello-world - scm:git:git://github.com/highmed/example-processes.git - scm:git:git@github.com:highmed/example-processes.git - https://github.com/highmed/example-processes + scm:git:git://github.com/datasharingframework/dsf-process-hello-world.git + scm:git:git@github.com:datasharingframework/dsf-process-hello-world.git + https://github.com/datasharingframework/dsf-process-hello-wold @@ -41,113 +35,91 @@ - - - - - org.highmed.dsf - dsf-bpe-process-base - ${dsf.version} - - - org.highmed.dsf - dsf-bpe-process-hello-world - ${dsf.version} - - - org.highmed.dsf - dsf-fhir-validation - ${dsf.version} - + + + dev.dsf + dsf-bpe-process-api-v1 + ${dsf.version} + provided + - - - de.hs-heilbronn.mi - log4j2-utils - 0.13.0 - + + org.slf4j + slf4j-api + 2.0.7 + provided + - - - junit - junit - 4.13.2 - - - org.highmed.dsf - dsf-bpe-process-base - ${dsf.version} - test - test-jar - - - + + + dev.dsf + dsf-bpe-process-api-v1 + ${dsf.version} + test + test-jar + + + dev.dsf + dsf-fhir-validation + ${dsf.version} + test + + + junit + junit + 4.13.2 + test + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 - - ${compileSource} - ${compileTarget} - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M5 - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - true - - - ${buildNumber} - ${scmBranch} - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.3.0 - - - org.apache.maven.plugins - maven-clean-plugin - 3.1.0 - - - net.revelc.code.formatter - formatter-maven-plugin - 2.18.0 - - - net.revelc.code - impsort-maven-plugin - 1.6.2 - - - - + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${compileSource} + ${compileTarget} + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + true + true + + + ${buildNumber} + ${scmBranch} + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.4.1 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.5.0 + + + org.apache.maven.plugins + maven-clean-plugin + 3.2.0 + org.codehaus.mojo buildnumber-maven-plugin @@ -168,19 +140,38 @@ net.revelc.code.formatter formatter-maven-plugin + 2.22.0 - ${main.basedir}/src/main/resources/eclipse-formatter-config.xml + eclipse-formatter-config.xml net.revelc.code impsort-maven-plugin + 1.8.0 - 11 + 17 java.,javax.,org.,com. java,* + + dev.dsf + dsf-tools-documentation-generator + ${dsf.version} + + + + generate + + + + + + dev.dsf.bpe + + + @@ -191,18 +182,15 @@ github GitHub Packages - https://maven.pkg.github.com/highmed/example-processes + https://maven.pkg.github.com/datasharingframework/dsf-process-hello-world github - GitHub HiGHmed Apache Maven Packages - https://maven.pkg.github.com/highmed/highmed-dsf - - true - + GitHub DSF Apache Maven Packages + https://maven.pkg.github.com/datasharingframework/dsf true @@ -211,7 +199,10 @@ - format-and-sort + validate-and-check + + true + @@ -221,7 +212,7 @@ - format + validate @@ -232,7 +223,7 @@ - sort + check @@ -241,10 +232,7 @@ - validate-and-check - - true - + format-and-sort @@ -254,7 +242,7 @@ - validate + format @@ -265,7 +253,7 @@ - check + sort @@ -273,5 +261,75 @@ + + copy-to-dsf + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-process-plugin-to-docker-test-setup + package + + copy + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + ${dsf.location}/dsf-docker-test-setup/bpe/process + + + + copy-process-plugin-to-docker-test-setup-3dic-ttp/dic1 + package + + copy + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + ${dsf.location}/dsf-docker-test-setup-3dic-ttp/dic1/bpe/process + + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${dsf.location}/dsf-docker-test-setup/bpe/process + + ${project.artifactId}-${project.version}.jar + + false + + + ${dsf.location}/dsf-docker-test-setup-3dic-ttp/dic1/bpe/process + + ${project.artifactId}-${project.version}.jar + + false + + + + + + + - \ No newline at end of file + diff --git a/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java b/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java new file mode 100644 index 0000000..bc7cf35 --- /dev/null +++ b/src/main/java/dev/dsf/bpe/ConstantsHelloWorld.java @@ -0,0 +1,20 @@ +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 new file mode 100644 index 0000000..ea3a0a5 --- /dev/null +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -0,0 +1,65 @@ +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; + +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); + + @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() + { + return List.of("bpe/hello-world.bpmn", "bpe/hello-user.bpmn"); + } + + @Override + public List> getSpringConfigurations() + { + return List.of(HelloWorldConfig.class); + } + + @Override + public Map> getFhirResourcesByProcessId() + { + var aHelloUser = "fhir/ActivityDefinition/dsf-hello-user.xml"; + var aHelloWorld = "fhir/ActivityDefinition/dsf-hello-world.xml"; + + var qHelloWorld = "fhir/Questionnaire/dsf-hello-user.xml"; + + var tHelloUser = "fhir/Task/dsf-task-hello-user.xml"; + var tHelloWorld = "fhir/Task/dsf-task-hello-world.xml"; + + var sHelloUser = "fhir/StructureDefinition/dsf-task-hello-user.xml"; + var sHelloWorld = "fhir/StructureDefinition/dsf-task-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, sHelloWorld, tHelloWorld)); + } +} diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/message/README.md b/src/main/java/dev/dsf/bpe/message/README.md similarity index 100% rename from dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/message/README.md rename to src/main/java/dev/dsf/bpe/message/README.md diff --git a/src/main/java/dev/dsf/bpe/service/HelloWorld.java b/src/main/java/dev/dsf/bpe/service/HelloWorld.java new file mode 100644 index 0000000..0c372bd --- /dev/null +++ b/src/main/java/dev/dsf/bpe/service/HelloWorld.java @@ -0,0 +1,28 @@ +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; + +public class HelloWorld extends AbstractServiceDelegate +{ + private static final Logger logger = LoggerFactory.getLogger(HelloWorld.class); + + public HelloWorld(ProcessPluginApi api) + { + super(api); + } + + @Override + protected void doExecute(DelegateExecution execution, Variables variables) + { + Task task = variables.getStartTask(); + logger.info("Hello World from organization with identifier '{}'", + task.getRequester().getIdentifier().getValue()); + } +} diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/LogUserTaskResponse.java b/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java similarity index 52% rename from dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/LogUserTaskResponse.java rename to src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java index b8be7a1..2a7f365 100644 --- a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/service/LogUserTaskResponse.java +++ b/src/main/java/dev/dsf/bpe/service/LogUserTaskResponse.java @@ -1,20 +1,17 @@ -package org.highmed.dsf.bpe.service; - -import static org.highmed.dsf.bpe.ConstantsBase.BPMN_EXECUTION_VARIABLE_QUESTIONNAIRE_RESPONSE_COMPLETED; +package dev.dsf.bpe.service; import java.util.Objects; import org.camunda.bpm.engine.delegate.DelegateExecution; -import org.highmed.dsf.bpe.delegate.AbstractServiceDelegate; -import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper; -import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider; -import org.highmed.dsf.fhir.task.TaskHelper; 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; public class LogUserTaskResponse extends AbstractServiceDelegate implements InitializingBean { @@ -22,10 +19,9 @@ public class LogUserTaskResponse extends AbstractServiceDelegate implements Init private final FhirContext fhirContext; - public LogUserTaskResponse(FhirWebserviceClientProvider clientProvider, TaskHelper taskHelper, - ReadAccessHelper readAccessHelper, FhirContext fhirContext) + public LogUserTaskResponse(ProcessPluginApi api, FhirContext fhirContext) { - super(clientProvider, taskHelper, readAccessHelper); + super(api); this.fhirContext = fhirContext; } @@ -37,10 +33,9 @@ public void afterPropertiesSet() throws Exception } @Override - protected void doExecute(DelegateExecution execution) + protected void doExecute(DelegateExecution execution, Variables variables) { - QuestionnaireResponse questionnaireResponse = (QuestionnaireResponse) execution - .getVariable(BPMN_EXECUTION_VARIABLE_QUESTIONNAIRE_RESPONSE_COMPLETED); + QuestionnaireResponse questionnaireResponse = variables.getLatestReceivedQuestionnaireResponse(); logger.info("Completed QuestionnaireResponse: {}", fhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(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 new file mode 100755 index 0000000..723e049 --- /dev/null +++ b/src/main/java/dev/dsf/bpe/spring/config/HelloWorldConfig.java @@ -0,0 +1,36 @@ +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.service.HelloWorld; +import dev.dsf.bpe.service.LogUserTaskResponse; +import dev.dsf.bpe.v1.ProcessPluginApi; + +@Configuration +public class HelloWorldConfig +{ + @Autowired + private ProcessPluginApi api; + + @Autowired + private FhirContext fhirContext; + + @Bean + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) + public HelloWorld helloWorld() + { + return new HelloWorld(api); + } + + @Bean + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) + public LogUserTaskResponse logUserTaskResponse() + { + return new LogUserTaskResponse(api, fhirContext); + } +} diff --git a/dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/variable/README.md b/src/main/java/dev/dsf/bpe/variable/README.md similarity index 100% rename from dsf-bpe-process-hello-world/src/main/java/org/highmed/dsf/bpe/variable/README.md rename to src/main/java/dev/dsf/bpe/variable/README.md diff --git a/src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition b/src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition new file mode 100644 index 0000000..5ee9242 --- /dev/null +++ b/src/main/resources/META-INF/services/dev.dsf.bpe.v1.ProcessPluginDefinition @@ -0,0 +1 @@ +dev.dsf.bpe.HelloWorldProcessPluginDefinition \ No newline at end of file diff --git a/dsf-bpe-process-hello-world/src/main/resources/bpe/helloUser.bpmn b/src/main/resources/bpe/hello-user.bpmn similarity index 90% rename from dsf-bpe-process-hello-world/src/main/resources/bpe/helloUser.bpmn rename to src/main/resources/bpe/hello-user.bpmn index 2a480ec..f77e90c 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/bpe/helloUser.bpmn +++ b/src/main/resources/bpe/hello-user.bpmn @@ -1,6 +1,6 @@ - + Flow_034bfq7 @@ -10,19 +10,19 @@ - + SequenceFlow_0bbhq2r Flow_00nx7hv - + Flow_00nx7hv Flow_034bfq7 - + diff --git a/dsf-bpe-process-hello-world/src/main/resources/bpe/helloWorld.bpmn b/src/main/resources/bpe/hello-world.bpmn similarity index 90% rename from dsf-bpe-process-hello-world/src/main/resources/bpe/helloWorld.bpmn rename to src/main/resources/bpe/hello-world.bpmn index 68bb0f1..744adeb 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/bpe/helloWorld.bpmn +++ b/src/main/resources/bpe/hello-world.bpmn @@ -1,12 +1,12 @@ - + SequenceFlow_0oyvmcd - + SequenceFlow_0bbhq2r SequenceFlow_0oyvmcd @@ -17,7 +17,7 @@ - + diff --git a/dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloUser.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml similarity index 65% rename from dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloUser.xml rename to src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml index acb32fa..1bccc29 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloUser.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml @@ -1,31 +1,31 @@ - + - + - + - + - + - + @@ -36,12 +36,12 @@ - + - + - + diff --git a/dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloWorld.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml similarity index 64% rename from dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloWorld.xml rename to src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml index c260fea..f5a14a9 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/fhir/ActivityDefinition/highmed-helloWorld.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml @@ -1,31 +1,31 @@ - + - + - + - + - + - + @@ -36,12 +36,12 @@ - + - + - + diff --git a/dsf-bpe-process-hello-world/src/main/resources/fhir/Questionnaire/highmed-questionnaire-hello-user.xml b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml similarity index 92% rename from dsf-bpe-process-hello-world/src/main/resources/fhir/Questionnaire/highmed-questionnaire-hello-user.xml rename to src/main/resources/fhir/Questionnaire/dsf-hello-user.xml index d3cd664..76f8958 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/fhir/Questionnaire/highmed-questionnaire-hello-user.xml +++ b/src/main/resources/fhir/Questionnaire/dsf-hello-user.xml @@ -1,12 +1,12 @@ - + - + - + diff --git a/dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-user.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml similarity index 71% rename from dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-user.xml rename to src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml index 01a3b58..d961a05 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-user.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-user.xml @@ -1,11 +1,11 @@ - + - + @@ -18,19 +18,19 @@ - + - + - + @@ -43,14 +43,6 @@ - - - - - - - - diff --git a/dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-world.xml b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml similarity index 71% rename from dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-world.xml rename to src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml index 194fa38..880d353 100644 --- a/dsf-bpe-process-hello-world/src/main/resources/fhir/StructureDefinition/highmed-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -1,11 +1,11 @@ - + - + @@ -18,19 +18,19 @@ - + - + - + @@ -43,14 +43,6 @@ - - - - - - - - diff --git a/src/main/resources/fhir/Task/dsf-task-hello-user.xml b/src/main/resources/fhir/Task/dsf-task-hello-user.xml new file mode 100644 index 0000000..a5818d8 --- /dev/null +++ b/src/main/resources/fhir/Task/dsf-task-hello-user.xml @@ -0,0 +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 new file mode 100644 index 0000000..d779819 --- /dev/null +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..4a8d870 --- /dev/null +++ b/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java @@ -0,0 +1,34 @@ +package dev.dsf.bpe; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.List; +import java.util.Map; + +import org.junit.Test; + +import dev.dsf.bpe.v1.ProcessPluginDefinition; + +public class HelloProcessPluginDefinitionTest +{ + @Test + public void testResourceLoading() + { + ProcessPluginDefinition definition = new HelloWorldProcessPluginDefinition(); + Map> resourcesByProcessId = definition.getFhirResourcesByProcessId(); + + var helloWorld = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD); + assertNotNull(helloWorld); + assertEquals(3, helloWorld.stream().filter(this::exists).count()); + + var helloUser = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER); + assertNotNull(helloUser); + assertEquals(4, helloUser.stream().filter(this::exists).count()); + } + + private boolean exists(String file) + { + return getClass().getClassLoader().getResourceAsStream(file) != null; + } +} diff --git a/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java b/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java new file mode 100644 index 0000000..8fdc45d --- /dev/null +++ b/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java @@ -0,0 +1,48 @@ +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 ca.uhn.fhir.context.FhirContext; +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 new file mode 100644 index 0000000..391061d --- /dev/null +++ b/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java @@ -0,0 +1,53 @@ +package dev.dsf.bpe.start; + +import java.util.Collections; +import java.util.Date; +import java.util.Map; + +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.ResourceType; +import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.Task; + +import ca.uhn.fhir.context.FhirContext; +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.fhir.client.FhirWebserviceClient; + +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/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java similarity index 55% rename from dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/ActivityDefinitionProfileTest.java rename to src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index a48bd0e..a8cf3f4 100644 --- a/dsf-bpe-process-hello-world/src/test/java/org/highmed/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -1,18 +1,13 @@ -package org.highmed.dsf.fhir.profile; +package dev.dsf.fhir.profile; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.RELEASE_DATE; -import static org.highmed.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; +import static dev.dsf.bpe.HelloWorldProcessPluginDefinition.RELEASE_DATE; +import static dev.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.nio.file.Paths; import java.util.Arrays; -import org.highmed.dsf.fhir.authorization.process.ProcessAuthorizationHelper; -import org.highmed.dsf.fhir.authorization.process.ProcessAuthorizationHelperImpl; -import org.highmed.dsf.fhir.validation.ResourceValidator; -import org.highmed.dsf.fhir.validation.ResourceValidatorImpl; -import org.highmed.dsf.fhir.validation.ValidationSupportRule; import org.hl7.fhir.r4.model.ActivityDefinition; import org.junit.ClassRule; import org.junit.Test; @@ -21,25 +16,32 @@ 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; public class ActivityDefinitionProfileTest { private static final Logger logger = LoggerFactory.getLogger(ActivityDefinitionProfileTest.class); @ClassRule - public static final ValidationSupportRule validationRule = new ValidationSupportRule(VERSION, RELEASE_DATE, - Arrays.asList("highmed-activity-definition-0.5.0.xml", "highmed-extension-process-authorization-0.5.0.xml", - "highmed-extension-process-authorization-consortium-role-0.5.0.xml", - "highmed-extension-process-authorization-organization-0.5.0.xml", - "highmed-coding-process-authorization-local-all-0.5.0.xml", - "highmed-coding-process-authorization-local-consortium-role-0.5.0.xml", - "highmed-coding-process-authorization-local-organization-0.5.0.xml", - "highmed-coding-process-authorization-remote-all-0.5.0.xml", - "highmed-coding-process-authorization-remote-consortium-role-0.5.0.xml", - "highmed-coding-process-authorization-remote-organization-0.5.0.xml"), - Arrays.asList("highmed-read-access-tag-0.5.0.xml", "highmed-process-authorization-0.5.0.xml"), - Arrays.asList("highmed-read-access-tag-0.5.0.xml", "highmed-process-authorization-recipient-0.5.0.xml", - "highmed-process-authorization-requester-0.5.0.xml")); + 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-consortium-role-1.0.0.xml", + "dsf-extension-process-authorization-organization-1.0.0.xml", + "dsf-coding-process-authorization-local-all-1.0.0.xml", + "dsf-coding-process-authorization-local-consortium-role-1.0.0.xml", + "dsf-coding-process-authorization-local-organization-1.0.0.xml", + "dsf-coding-process-authorization-remote-all-1.0.0.xml", + "dsf-coding-process-authorization-remote-consortium-role-1.0.0.xml", + "dsf-coding-process-authorization-remote-organization-1.0.0.xml"), + Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-1.0.0.xml"), + Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-recipient-1.0.0.xml", + "dsf-process-authorization-requester-1.0.0.xml")); private final ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); @@ -47,10 +49,10 @@ public class ActivityDefinitionProfileTest private final ProcessAuthorizationHelper processAuthorizationHelper = new ProcessAuthorizationHelperImpl(); @Test - public void testHelloUserValid() throws Exception + public void testHelloWorldValid() throws Exception { ActivityDefinition ad = validationRule - .readActivityDefinition(Paths.get("src/main/resources/fhir/ActivityDefinition/highmed-helloUser.xml")); + .readActivityDefinition(Paths.get("src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml")); ValidationResult result = resourceValidator.validate(ad); ValidationSupportRule.logValidationMessages(logger, result); @@ -62,10 +64,10 @@ public void testHelloUserValid() throws Exception } @Test - public void testHelloWorldValid() throws Exception + public void testHelloUserValid() throws Exception { ActivityDefinition ad = validationRule - .readActivityDefinition(Paths.get("src/main/resources/fhir/ActivityDefinition/highmed-helloWorld.xml")); + .readActivityDefinition(Paths.get("src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml")); ValidationResult result = resourceValidator.validate(ad); ValidationSupportRule.logValidationMessages(logger, result); @@ -75,4 +77,4 @@ public void testHelloWorldValid() throws Exception assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, orgIdentifier -> true, role -> true)); } -} \ 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 new file mode 100644 index 0000000..f4a43e7 --- /dev/null +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -0,0 +1,107 @@ +package dev.dsf.fhir.profile; + +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +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 org.hl7.fhir.r4.model.Task.TaskIntent; +import org.hl7.fhir.r4.model.Task.TaskStatus; +import org.junit.ClassRule; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +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.fhir.validation.ResourceValidator; +import dev.dsf.fhir.validation.ResourceValidatorImpl; +import dev.dsf.fhir.validation.ValidationSupportRule; + +public class TaskProfileTest +{ + private static final Logger logger = LoggerFactory.getLogger(TaskProfileTest.class); + + private static final HelloWorldProcessPluginDefinition def = new HelloWorldProcessPluginDefinition(); + + @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-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml"), + Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml")); + + private ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), + validationRule.getValidationSupport()); + + @Test + public void testTaskHelloWorldValid() + { + Task task = createValidTaskHelloWorld(); + + 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 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.setStatus(TaskStatus.REQUESTED); + task.setIntent(TaskIntent.ORDER); + task.setAuthoredOn(new Date()); + task.getRequester().setType(ResourceType.Organization.name()) + .setIdentifier(NamingSystems.OrganizationIdentifier.withValue("Test_DIC_1")); + 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()); + + return task; + } + + @Test + public void testTaskHelloUserValid() + { + Task task = createValidTaskHelloUser(); + + 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.setStatus(TaskStatus.REQUESTED); + task.setIntent(TaskIntent.ORDER); + task.setAuthoredOn(new Date()); + task.getRequester().setType(ResourceType.Organization.name()) + .setIdentifier(NamingSystems.OrganizationIdentifier.withValue("Test_DIC_1")); + 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() + .addCoding(CodeSystems.BpmnMessage.messageName()); + + return task; + } +} diff --git a/src/test/resources/log4j2.xml b/src/test/resources/log4j2.xml new file mode 100644 index 0000000..191e09b --- /dev/null +++ b/src/test/resources/log4j2.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From a83f0ae842a7ac3ae23c87dbeb511750c79d33a5 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 19 Jun 2023 14:16:52 +0200 Subject: [PATCH 02/11] adapt readme and formatter to new dsf version --- README.md | 37 ++++-------------------------------- eclipse-formatter-config.xml | 2 +- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index e9559e6..fc1cabb 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,9 @@ -# HiGHmed DSF Example Processes +# DSF Process Allow-List -![Java CI Build with Maven](https://github.com/highmed/example-processes/workflows/Java%20CI%20Build%20with%20Maven/badge.svg) - -In this repository you will find example processes, that can be deployed on the [HiGHmed DSF](https://github.com/highmed/highmed-dsf). +In this repository you will find the hello-world process, which can be deployed on the [DSF](https://github.com/datasharingframework/dsf). ## Development -Branching follows the git-flow model, for the latest development version see branch [develop](https://github.com/highmed/example-processes/tree/develop). +Branching follows the git-flow model, for the latest development version see branch [develop](https://github.com/datasharingframework/dsf-process-hello-world/tree/develop). ## License -All code of the HiGHmed DSF Example Processes is published under the [Apache-2.0 License](LICENSE). - -## Wiki -A full documentation can be found in the [HiGHmed DSF Wiki](https://github.com/highmed/highmed-dsf/wiki). - -## Building the Project -Prerequisite: Java 11, Maven >= 3.6 - -* Add the Github Package Registry server to your Maven `.m2/settings.xml`. Instructions on how to generate the `USERNAME` and `TOKEN` can be found in the HiGHmed DSF Wiki page with the name [Using the Github Maven Package Registry](https://github.com/highmed/highmed-dsf/wiki/Using-the-Github-Maven-Package-Registry). - - ``` - - - github - USERNAME - TOKEN - - - ``` - -* Build the project from the root directory of this repository by executing the following command. If you want to copy the artifacts into the test folders of the **highmed-dsf** repository, make sure that the **example-processes** repository resides in the same folder as the **higmmed-dsf** repository and activate the profile `copy-to-highmed-dsf-process` in the build command. - - ``` - mvn clean install (-P copy-to-highmed-dsf-process) - ``` - -## Implementing new Processes -Instructions on how to implement a new process can be found in the HiGHmed DSF Wiki page with the name [Adding a new BPMN Process](https://github.com/highmed/highmed-dsf/wiki/Adding-BPMN-Processes). \ No newline at end of file +All code is published under the [Apache-2.0 License](LICENSE). \ No newline at end of file diff --git a/eclipse-formatter-config.xml b/eclipse-formatter-config.xml index fa14909..0c015e3 100644 --- a/eclipse-formatter-config.xml +++ b/eclipse-formatter-config.xml @@ -1,6 +1,6 @@ - + From e8f48e795a36289c804e249d4b16e5aaafcce160 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 19 Jun 2023 14:18:38 +0200 Subject: [PATCH 03/11] adapt github ci to jdk 17 --- .github/workflows/maven-build.yml | 4 ++-- .github/workflows/maven-publish.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 8d513d6..5fb8224 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - 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 7a482c8..91d3940 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -21,10 +21,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Publish with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 284cc043012b2e7c1231c553c467cd2f02add1fc Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 19 Jun 2023 14:20:47 +0200 Subject: [PATCH 04/11] change process title to hello-world --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc1cabb..3d6516d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DSF Process Allow-List +# DSF Process Hello-World In this repository you will find the hello-world process, which can be deployed on the [DSF](https://github.com/datasharingframework/dsf). From df9835179a4b52601afea99655e14a0ef76ea0be Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 23 Jun 2023 14:31:52 +0200 Subject: [PATCH 05/11] remove unused imports --- .../java/dev/dsf/bpe/start/HelloUserExampleStarter.java | 1 - .../java/dev/dsf/bpe/start/HelloWorldExampleStarter.java | 6 ------ .../dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java | 2 -- 3 files changed, 9 deletions(-) diff --git a/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java b/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java index 8fdc45d..8087719 100644 --- a/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java +++ b/src/test/java/dev/dsf/bpe/start/HelloUserExampleStarter.java @@ -6,7 +6,6 @@ import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.Task; -import ca.uhn.fhir.context.FhirContext; import dev.dsf.bpe.ConstantsHelloWorld; import dev.dsf.bpe.HelloWorldProcessPluginDefinition; import dev.dsf.bpe.v1.constants.CodeSystems; diff --git a/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java b/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java index 391061d..18bf380 100644 --- a/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java +++ b/src/test/java/dev/dsf/bpe/start/HelloWorldExampleStarter.java @@ -1,21 +1,15 @@ package dev.dsf.bpe.start; -import java.util.Collections; import java.util.Date; -import java.util.Map; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.ResourceType; import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.Task; -import ca.uhn.fhir.context.FhirContext; 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.fhir.client.FhirWebserviceClient; public class HelloWorldExampleStarter { diff --git a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index a8cf3f4..6130204 100644 --- a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -1,7 +1,5 @@ package dev.dsf.fhir.profile; -import static dev.dsf.bpe.HelloWorldProcessPluginDefinition.RELEASE_DATE; -import static dev.dsf.bpe.HelloWorldProcessPluginDefinition.VERSION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; From e07e0286245ac365a5250aa09e32789656448b2e Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Sun, 25 Jun 2023 16:34:58 +0200 Subject: [PATCH 06/11] add example inputs for all value types --- .../HelloWorldProcessPluginDefinition.java | 10 +- .../fhir/CodeSystem/dsf-hello-world.xml | 89 ++++ .../dsf-task-hello-world.xml | 496 +++++++++++++++++- .../fhir/Task/dsf-task-hello-world.xml | 132 +++++ .../fhir/ValueSet/dsf-hello-world.xml | 27 + .../bpe/HelloProcessPluginDefinitionTest.java | 2 +- .../ActivityDefinitionProfileTest.java | 5 +- .../dev/dsf/fhir/profile/TaskProfileTest.java | 66 ++- 8 files changed, 817 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/fhir/CodeSystem/dsf-hello-world.xml create mode 100644 src/main/resources/fhir/ValueSet/dsf-hello-world.xml diff --git a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java index ea3a0a5..ac70141 100644 --- a/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java +++ b/src/main/java/dev/dsf/bpe/HelloWorldProcessPluginDefinition.java @@ -49,17 +49,21 @@ public Map> getFhirResourcesByProcessId() var aHelloUser = "fhir/ActivityDefinition/dsf-hello-user.xml"; var aHelloWorld = "fhir/ActivityDefinition/dsf-hello-world.xml"; + var cHelloWorld = "fhir/CodeSystem/dsf-hello-world.xml"; + var qHelloWorld = "fhir/Questionnaire/dsf-hello-user.xml"; + var sHelloUser = "fhir/StructureDefinition/dsf-task-hello-user.xml"; + var sHelloWorld = "fhir/StructureDefinition/dsf-task-hello-world.xml"; + var tHelloUser = "fhir/Task/dsf-task-hello-user.xml"; var tHelloWorld = "fhir/Task/dsf-task-hello-world.xml"; - var sHelloUser = "fhir/StructureDefinition/dsf-task-hello-user.xml"; - var sHelloWorld = "fhir/StructureDefinition/dsf-task-hello-world.xml"; + 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, sHelloWorld, tHelloWorld)); + Arrays.asList(aHelloWorld, cHelloWorld, sHelloWorld, tHelloWorld, vHelloWorld)); } } diff --git a/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml new file mode 100644 index 0000000..4b8a18a --- /dev/null +++ b/src/main/resources/fhir/CodeSystem/dsf-hello-world.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + <!-- status managed by bpe --> + <status value="unknown" /> + <experimental value="false" /> + <!-- date managed by bpe --> + <date value="#{date}" /> + <publisher value="DSF" /> + <description value="CodeSystem with standard values for the hello world process" /> + <caseSensitive value="true" /> + <hierarchyMeaning value="grouped-by" /> + <versionNeeded value="false" /> + <content value="complete" /> + <concept> + <code value="string-example" /> + <display value="String Example" /> + <definition value="Example string input value" /> + </concept> + <concept> + <code value="integer-example" /> + <display value="Integer Example" /> + <definition value="Example integer input value" /> + </concept> + <concept> + <code value="decimal-example" /> + <display value="Decimal Example" /> + <definition value="Example decimal input value" /> + </concept> + <concept> + <code value="boolean-example" /> + <display value="Boolean Example" /> + <definition value="Example boolean input value" /> + </concept> + <concept> + <code value="date-example" /> + <display value="Date Example" /> + <definition value="Example date input value" /> + </concept> + <concept> + <code value="time-example" /> + <display value="Time Example" /> + <definition value="Example time input value" /> + </concept> + <concept> + <code value="date-time-example" /> + <display value="Date/Time Example" /> + <definition value="Example date/time input value" /> + </concept> + <concept> + <code value="instant-example" /> + <display value="Instant Example" /> + <definition value="Example instant input value" /> + </concept> + <concept> + <code value="uri-example" /> + <display value="URI Example" /> + <definition value="Example uri input value" /> + </concept> + <concept> + <code value="reference-example" /> + <display value="Reference Example" /> + <definition value="Example reference input value" /> + </concept> + <concept> + <code value="reference-identifier-example" /> + <display value="Reference-Identifier Example" /> + <definition value="Example reference-identifier input value" /> + </concept> + <concept> + <code value="identifier-example" /> + <display value="Identifier Example" /> + <definition value="Example identifier input value" /> + </concept> + <concept> + <code value="coding-example" /> + <display value="Coding Example" /> + <definition value="Example coding input value" /> + </concept> +</CodeSystem> \ 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 880d353..15190b9 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -30,7 +30,7 @@ <valueString value="Parameter" /> </extension> <path value="Task.input" /> - <max value="2" /> + <max value="15" /> </element> <element id="Task.input:message-name"> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> @@ -51,5 +51,499 @@ <sliceName value="correlation-key" /> <max value="0" /> </element> + <element id="Task.input:string-example"> + <path value="Task.input" /> + <sliceName value="string-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:string-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:string-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:string-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:string-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="string-example" /> + </element> + <element id="Task.input:string-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="string" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:integer-example"> + <path value="Task.input" /> + <sliceName value="integer-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:integer-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:integer-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:integer-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:integer-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="integer-example" /> + </element> + <element id="Task.input:integer-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="integer" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:decimal-example"> + <path value="Task.input" /> + <sliceName value="decimal-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:decimal-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:decimal-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:decimal-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:decimal-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="decimal-example" /> + </element> + <element id="Task.input:decimal-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="decimal" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:boolean-example"> + <path value="Task.input" /> + <sliceName value="boolean-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:boolean-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:boolean-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:boolean-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:boolean-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="boolean-example" /> + </element> + <element id="Task.input:boolean-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="boolean" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:date-example"> + <path value="Task.input" /> + <sliceName value="date-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:date-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:date-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:date-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:date-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="date-example" /> + </element> + <element id="Task.input:date-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="date" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:time-example"> + <path value="Task.input" /> + <sliceName value="time-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:time-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:time-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:time-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:time-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="time-example" /> + </element> + <element id="Task.input:time-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="time" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:date-time-example"> + <path value="Task.input" /> + <sliceName value="date-time-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:date-time-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:date-time-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:date-time-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:date-time-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="date-time-example" /> + </element> + <element id="Task.input:date-time-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="dateTime" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:instant-example"> + <path value="Task.input" /> + <sliceName value="instant-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:instant-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:instant-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:instant-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:instant-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="instant-example" /> + </element> + <element id="Task.input:instant-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="instant" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:uri-example"> + <path value="Task.input" /> + <sliceName value="uri-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:uri-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:uri-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:uri-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:uri-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="uri-example" /> + </element> + <element id="Task.input:uri-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="uri" /> + </type> + <min value="1" /> + </element> + <element id="Task.input:reference-example"> + <path value="Task.input" /> + <sliceName value="reference-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:reference-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:reference-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:reference-example.type.coding.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:reference-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="reference-example" /> + </element> + <element id="Task.input:reference-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/Patient" /> + </type> + </element> + <element id="Task.input:reference-example.value[x].reference"> + <path value="Task.input.value[x].reference" /> + <min value="1" /> + </element> + <element id="Task.input:reference-example.value[x].identifier"> + <path value="Task.input.value[x].identifier" /> + <max value="0" /> + </element> + <element id="Task.input:reference-identifier-example"> + <path value="Task.input" /> + <sliceName value="reference-identifier-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:reference-identifier-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:reference-identifier-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:reference-identifier-example.type.coding.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:reference-identifier-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="reference-identifier-example" /> + </element> + <element id="Task.input:reference-identifier-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/Patient" /> + </type> + </element> + <element id="Task.input:reference-identifier-example.value[x].reference"> + <path value="Task.input.value[x].reference" /> + <max value="0" /> + </element> + <element id="Task.input:reference-identifier-example.value[x].identifier"> + <path value="Task.input.value[x].identifier" /> + <min value="1" /> + </element> + <element id="Task.input:identifier-example.value[x].identifier.system"> + <path value="Task.input.value[x].identifier.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/sid/hello-world-identifier" /> + </element> + <element id="Task.input:identifier-example.value[x].identifier.value"> + <path value="Task.input.value[x].identifier.value" /> + <min value="1" /> + </element> + <element id="Task.input:identifier-example"> + <path value="Task.input" /> + <sliceName value="identifier-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:identifier-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:identifier-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:identifier-example.type.coding.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:identifier-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="identifier-example" /> + </element> + <element id="Task.input:identifier-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="Identifier" /> + </type> + </element> + <element id="Task.input:identifier-example.value[x].system"> + <path value="Task.input.value[x].system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/sid/hello-world-identifier" /> + </element> + <element id="Task.input:identifier-example.value[x].value"> + <path value="Task.input.value[x].value" /> + <min value="1" /> + </element> + <element id="Task.input:coding-example"> + <path value="Task.input" /> + <sliceName value="coding-example" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Task.input:coding-example.type"> + <path value="Task.input.type" /> + <binding> + <strength value="required" /> + <valueSet value="http://dsf.dev/fhir/ValueSet/hello-world|#{version}" /> + </binding> + </element> + <element id="Task.input:coding-example.type.coding"> + <path value="Task.input.type.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element id="Task.input:coding-example.system"> + <path value="Task.input.type.coding.system" /> + <min value="1" /> + <fixedUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </element> + <element id="Task.input:coding-example.type.coding.code"> + <path value="Task.input.type.coding.code" /> + <min value="1" /> + <fixedCode value="coding-example" /> + </element> + <element id="Task.input:coding-example.value[x]"> + <path value="Task.input.value[x]" /> + <type> + <code value="Coding" /> + </type> + </element> + <element id="Task.input:coding-example.value[x].system"> + <path value="Task.input.value[x].system" /> + <min value="1" /> + </element> + <element id="Task.input:coding-example.value[x].code"> + <path value="Task.input.value[x].code" /> + </element> </differential> </StructureDefinition> \ 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 d779819..b7e5b97 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -35,4 +35,136 @@ </type> <valueString value="helloWorld"/> </input> + + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="string-example" /> + </coding> + </type> + <valueString value="string-value" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="integer-example" /> + </coding> + </type> + <valueInteger value="1" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="decimal-example" /> + </coding> + </type> + <valueDecimal value="1.1" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="boolean-example" /> + </coding> + </type> + <valueBoolean value="true" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="date-example" /> + </coding> + </type> + <valueDate value="2023-06-25" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="time-example" /> + </coding> + </type> + <valueTime value="10:00:00" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="date-time-example" /> + </coding> + </type> + <valueDateTime value="2023-06-25T15:31:19+02:00" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="instant-example" /> + </coding> + </type> + <valueInstant value="2023-06-25T15:31:19.984+02:00" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="uri-example" /> + </coding> + </type> + <valueUri value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="reference-example" /> + </coding> + </type> + <valueReference> + <reference value="http://hl7.org/fhir/Patient/example-id" /> + </valueReference> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="reference-identifier-example" /> + </coding> + </type> + <valueReference> + <type value="Patient" /> + <identifier> + <system value="http://dsf.dev/sid/hello-world-identifier" /> + <value value="identifier-value" /> + </identifier> + </valueReference> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="identifier-example" /> + </coding> + </type> + <valueIdentifier> + <system value="http://dsf.dev/sid/hello-world-identifier" /> + <value value="identifier-value" /> + </valueIdentifier> + </input> + <input> + <type> + <coding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="coding-example" /> + </coding> + </type> + <valueCoding> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <code value="coding-example" /> + </valueCoding> + </input> </Task> \ 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 new file mode 100644 index 0000000..4aba52b --- /dev/null +++ b/src/main/resources/fhir/ValueSet/dsf-hello-world.xml @@ -0,0 +1,27 @@ +<ValueSet xmlns="http://hl7.org/fhir"> + <meta> + <tag> + <system value="http://dsf.dev/fhir/CodeSystem/read-access-tag" /> + <code value="ALL" /> + </tag> + </meta> + <url value="http://dsf.dev/fhir/ValueSet/hello-world" /> + <!-- version managed by bpe --> + <version value="#{version}" /> + <name value="DSF_Hello_World" /> + <title value="DSF Hello World" /> + <!-- status managed by bpe --> + <status value="unknown" /> + <experimental value="false" /> + <!-- date managed by bpe --> + <date value="#{date}" /> + <publisher value="DSF" /> + <description value="ValueSet with standard values for the hello world process" /> + <immutable value="true" /> + <compose> + <include> + <system value="http://dsf.dev/fhir/CodeSystem/hello-world" /> + <version value="#{version}" /> + </include> + </compose> +</ValueSet> \ 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 4a8d870..d637a37 100644 --- a/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java +++ b/src/test/java/dev/dsf/bpe/HelloProcessPluginDefinitionTest.java @@ -20,7 +20,7 @@ public void testResourceLoading() var helloWorld = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_WORLD); assertNotNull(helloWorld); - assertEquals(3, helloWorld.stream().filter(this::exists).count()); + assertEquals(5, helloWorld.stream().filter(this::exists).count()); var helloUser = resourcesByProcessId.get(ConstantsHelloWorld.PROCESS_NAME_FULL_HELLO_USER); assertNotNull(helloUser); diff --git a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index 6130204..e340742 100644 --- a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -37,9 +37,10 @@ public class ActivityDefinitionProfileTest "dsf-coding-process-authorization-remote-all-1.0.0.xml", "dsf-coding-process-authorization-remote-consortium-role-1.0.0.xml", "dsf-coding-process-authorization-remote-organization-1.0.0.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-1.0.0.xml"), + Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-1.0.0.xml", + "dsf-hello-world.xml"), Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-recipient-1.0.0.xml", - "dsf-process-authorization-requester-1.0.0.xml")); + "dsf-process-authorization-requester-1.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 f4a43e7..45c3ea4 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -5,11 +5,22 @@ import java.util.Arrays; import java.util.Date; +import org.hl7.fhir.r4.model.BooleanType; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.DateType; +import org.hl7.fhir.r4.model.DecimalType; +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.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.TaskIntent; import org.hl7.fhir.r4.model.Task.TaskStatus; +import org.hl7.fhir.r4.model.TimeType; +import org.hl7.fhir.r4.model.UriType; import org.junit.ClassRule; import org.junit.Test; import org.slf4j.Logger; @@ -35,14 +46,14 @@ public class TaskProfileTest 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-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.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")); private ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); @Test - public void testTaskHelloWorldValid() + public void testMinimalTaskHelloWorldValid() { Task task = createValidTaskHelloWorld(); @@ -53,6 +64,55 @@ public void testTaskHelloWorldValid() || ResultSeverityEnum.FATAL.equals(m.getSeverity())).count()); } + @Test + public void testMaximalTaskHelloWorldValid() + { + Task task = createValidTaskHelloWorld(); + + 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 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 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")); + 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")); + 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")); + 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")); + + 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 createValidTaskHelloWorld() { Task task = new Task(); From d7d1cd630882eeacbd761789b637b9cbd7ce9ccb Mon Sep 17 00:00:00 2001 From: Reto Wettstein <Reto.Wettstein@med.uni-heidelberg.de> Date: Mon, 26 Jun 2023 16:03:24 +0200 Subject: [PATCH 07/11] allow infinite string-example inputs --- .../fhir/StructureDefinition/dsf-task-hello-world.xml | 3 +-- src/main/resources/fhir/Task/dsf-task-hello-world.xml | 1 - 2 files changed, 1 insertion(+), 3 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 15190b9..5f1923b 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -30,7 +30,6 @@ <valueString value="Parameter" /> </extension> <path value="Task.input" /> - <max value="15" /> </element> <element id="Task.input:message-name"> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> @@ -55,7 +54,7 @@ <path value="Task.input" /> <sliceName value="string-example" /> <min value="0" /> - <max value="1" /> + <max value="*" /> </element> <element id="Task.input:string-example.type"> <path value="Task.input.type" /> 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 b7e5b97..1db9e48 100644 --- a/src/main/resources/fhir/Task/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/Task/dsf-task-hello-world.xml @@ -35,7 +35,6 @@ </type> <valueString value="helloWorld"/> </input> - <input> <type> <coding> From faed238b24a7dabaf299a4513177d9c2a4e8ce25 Mon Sep 17 00:00:00 2001 From: Reto Wettstein <Reto.Wettstein@med.uni-heidelberg.de> Date: Tue, 27 Jun 2023 22:17:52 +0200 Subject: [PATCH 08/11] adapt to new practitioner authorization rule --- .../ActivityDefinition/dsf-hello-user.xml | 12 +++++++++ .../ActivityDefinition/dsf-hello-world.xml | 12 +++++++++ .../ActivityDefinitionProfileTest.java | 27 ++++++++++++------- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml index 1bccc29..8aa641f 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-user.xml @@ -18,6 +18,18 @@ <code value="LOCAL_ALL" /> </valueCoding> </extension> + <extension url="requester"> + <valueCoding> + <extension url="http://dsf.dev/fhir/StructureDefinition/extension-process-authorization-practitioner"> + <valueCoding> + <system value="http://dsf.dev/fhir/CodeSystem/practitioner-role" /> + <code value="DSF_ADMIN" /> + </valueCoding> + </extension> + <system value="http://dsf.dev/fhir/CodeSystem/process-authorization" /> + <code value="LOCAL_ALL_PRACTITIONER" /> + </valueCoding> + </extension> <extension url="recipient"> <valueCoding> <system value="http://dsf.dev/fhir/CodeSystem/process-authorization" /> diff --git a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml index f5a14a9..ff7f1f1 100644 --- a/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml +++ b/src/main/resources/fhir/ActivityDefinition/dsf-hello-world.xml @@ -18,6 +18,18 @@ <code value="LOCAL_ALL" /> </valueCoding> </extension> + <extension url="requester"> + <valueCoding> + <extension url="http://dsf.dev/fhir/StructureDefinition/extension-process-authorization-practitioner"> + <valueCoding> + <system value="http://dsf.dev/fhir/CodeSystem/practitioner-role" /> + <code value="DSF_ADMIN" /> + </valueCoding> + </extension> + <system value="http://dsf.dev/fhir/CodeSystem/process-authorization" /> + <code value="LOCAL_ALL_PRACTITIONER" /> + </valueCoding> + </extension> <extension url="recipient"> <valueCoding> <system value="http://dsf.dev/fhir/CodeSystem/process-authorization" /> diff --git a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java index e340742..9df9502 100644 --- a/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/ActivityDefinitionProfileTest.java @@ -29,18 +29,25 @@ public class ActivityDefinitionProfileTest 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-consortium-role-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-consortium-role-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-consortium-role-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"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-1.0.0.xml", - "dsf-hello-world.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-process-authorization-recipient-1.0.0.xml", - "dsf-process-authorization-requester-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-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")); private final ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), validationRule.getValidationSupport()); @@ -59,7 +66,8 @@ 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, orgIdentifier -> true, role -> true)); + assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, + orgIdentifier -> true, organizationRole -> true)); } @Test @@ -74,6 +82,7 @@ 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, orgIdentifier -> true, role -> true)); + assertTrue(processAuthorizationHelper.isValid(ad, taskProfile -> true, practitionerRole -> true, + orgIdentifier -> true, organizationRole -> true)); } } From 563ef0f113b654162e4da79cec0c3d29f4e70600 Mon Sep 17 00:00:00 2001 From: Reto Wettstein <Reto.Wettstein@med.uni-heidelberg.de> Date: Thu, 29 Jun 2023 09:18:47 +0200 Subject: [PATCH 09/11] update dependencies --- pom.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index e5f1e11..90f2e95 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ <compileSource>17</compileSource> <compileTarget>17</compileTarget> - <dsf.version>1.0.0-SNAPSHOT</dsf.version> + <dsf.version>1.0.0</dsf.version> <dsf.location>../dsf</dsf.location> </properties> @@ -86,7 +86,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.0.0</version> + <version>3.1.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -108,21 +108,22 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>3.4.1</version> + <version>3.5.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>3.5.0</version> + <version>3.6.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> - <version>3.2.0</version> + <version>3.3.1</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> + <!-- 3.1.0 not working, no git commit hash as buildnumber --> <version>1.4</version> <executions> <execution> @@ -140,7 +141,7 @@ <plugin> <groupId>net.revelc.code.formatter</groupId> <artifactId>formatter-maven-plugin</artifactId> - <version>2.22.0</version> + <version>2.23.0</version> <configuration> <configFile>eclipse-formatter-config.xml</configFile> </configuration> @@ -148,7 +149,7 @@ <plugin> <groupId>net.revelc.code</groupId> <artifactId>impsort-maven-plugin</artifactId> - <version>1.8.0</version> + <version>1.9.0</version> <configuration> <compliance>17</compliance> <groups>java.,javax.,org.,com.</groups> From af378fe51d64c0f984cb5205bfe22d624cf65e75 Mon Sep 17 00:00:00 2001 From: Reto Wettstein <Reto.Wettstein@med.uni-heidelberg.de> Date: Mon, 31 Jul 2023 08:12:56 +0200 Subject: [PATCH 10/11] mandatory string and integer example input --- .../fhir/StructureDefinition/dsf-task-hello-world.xml | 4 ++-- src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java | 9 +++++---- 2 files changed, 7 insertions(+), 6 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 5f1923b..40a6b57 100644 --- a/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml +++ b/src/main/resources/fhir/StructureDefinition/dsf-task-hello-world.xml @@ -53,7 +53,7 @@ <element id="Task.input:string-example"> <path value="Task.input" /> <sliceName value="string-example" /> - <min value="0" /> + <min value="1" /> <max value="*" /> </element> <element id="Task.input:string-example.type"> @@ -88,7 +88,7 @@ <element id="Task.input:integer-example"> <path value="Task.input" /> <sliceName value="integer-example" /> - <min value="0" /> + <min value="1" /> <max value="1" /> </element> <element id="Task.input:integer-example.type"> diff --git a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java index 45c3ea4..200b798 100644 --- a/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java +++ b/src/test/java/dev/dsf/fhir/profile/TaskProfileTest.java @@ -69,10 +69,6 @@ public void testMaximalTaskHelloWorldValid() { Task task = createValidTaskHelloWorld(); - 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 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( @@ -130,6 +126,11 @@ private Task createValidTaskHelloWorld() task.addInput().setValue(new StringType(ConstantsHelloWorld.PROFILE_DSF_TASK_HELLO_WORLD_MESSAGE_NAME)) .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")); + return task; } From 2039a95d506a470ee9581aca61f9cc32efd66566 Mon Sep 17 00:00:00 2001 From: Hauke Hund <hauke.hund@hs-heilbronn.de> Date: Tue, 22 Aug 2023 14:17:14 +0200 Subject: [PATCH 11/11] 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 @@ <groupId>dev.dsf</groupId> <artifactId>dsf-process-hello-world</artifactId> - <version>1.0.0.0-SNAPSHOT</version> + <version>1.0.0.0</version> <packaging>jar</packaging> <properties> @@ -13,7 +13,7 @@ <compileSource>17</compileSource> <compileTarget>17</compileTarget> - <dsf.version>1.0.0</dsf.version> + <dsf.version>1.1.0</dsf.version> <dsf.location>../dsf</dsf.location> </properties> 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()