diff --git a/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml b/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml index c329060b0..58b94e50e 100644 --- a/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml +++ b/dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml @@ -211,27 +211,27 @@ org.glassfish.hk2.external aopalliance-repackaged - 3.0.6 + 3.1.1 org.glassfish.hk2 hk2-api - 3.0.6 + 3.1.1 org.glassfish.hk2 hk2-locator - 3.0.6 + 3.1.1 org.glassfish.hk2 hk2-utils - 3.0.6 + 3.1.1 org.glassfish.hk2 osgi-resource-locator - 1.0.3 + 1.0.4 org.glassfish.jersey.connectors diff --git a/dsf-bpe/dsf-bpe-server-jetty/docker/Dockerfile b/dsf-bpe/dsf-bpe-server-jetty/docker/Dockerfile index 6ce78cbcb..37de2942d 100755 --- a/dsf-bpe/dsf-bpe-server-jetty/docker/Dockerfile +++ b/dsf-bpe/dsf-bpe-server-jetty/docker/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM docker.io/library/debian:trixie-slim@sha256:4e401d95de7083948053197a9c3913343cd06b706bf15eb6a0c3ccd26f436a0e AS builder +FROM docker.io/library/debian:trixie-slim@sha256:28de0877c2189802884ccd20f15ee41c203573bd87bb6b883f5f46362d24c5c2 AS builder WORKDIR /opt/bpe COPY --chown=root:2202 ./ ./ RUN chown root:2202 ./ && \ @@ -23,7 +23,7 @@ RUN chown root:2202 ./ && \ chmod 1775 ./log -FROM docker.io/azul/zulu-openjdk:25-jre-headless@sha256:1fa90a584251b66adc28152e25cc496ea63dd787999c86a04c0e2033fa98d39a +FROM docker.io/azul/zulu-openjdk:25-jre-headless@sha256:701476f833e15ea883c329b20f272093b8434a4a9b09745ccdbd716f4f460567 LABEL org.opencontainers.image.source=https://github.com/datasharingframework/dsf LABEL org.opencontainers.image.description="DSF BPE Server" LABEL org.opencontainers.image.licenses="Apache License, Version 2.0" diff --git a/dsf-bpe/dsf-bpe-server/pom.xml b/dsf-bpe/dsf-bpe-server/pom.xml index 83fdec40d..0e221f921 100755 --- a/dsf-bpe/dsf-bpe-server/pom.xml +++ b/dsf-bpe/dsf-bpe-server/pom.xml @@ -231,7 +231,6 @@ com.icegreen greenmail-junit4 - 1.6.15 test diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-classes.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-classes.list index 1e09ee1ee..e72f9c03b 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-classes.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-classes.list @@ -16,6 +16,7 @@ com.fasterxml.jackson com.google.common +com.sun.mail dev.dsf.bpe.api jakarta.activation jakarta.inject @@ -33,6 +34,7 @@ org.operaton.bpm.engine.impl.variable.serializer org.operaton.bpm.engine.ProcessEngine org.operaton.bpm.engine.RuntimeService org.operaton.bpm.engine.variable +org.operaton.bpm.model.bpmn.impl org.operaton.bpm.model.bpmn.instance org.joda.time org.glassfish.jersey diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-resources.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-resources.list index 3124f62e4..aa98f0a8b 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-resources.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/allowed-bpe-resources.list @@ -14,3 +14,6 @@ # limitations under the License. # +META-INF/services/org.operaton.bpm.model.bpmn.BpmnFactory +META-INF/services/org.operaton.bpm.model.bpmn.BpmnParserFactory +META-INF/mailcap \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/resources-with-priority.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/resources-with-priority.list index 8780cb5ba..48c20200d 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/resources-with-priority.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v1/resources-with-priority.list @@ -19,4 +19,14 @@ ca/uhn/fhir/i18n/hapi-messages.properties dev/dsf/bpe/v1/plugin/ApiServicesSpringConfiguration.class dev/dsf/bpe/v1/spring/ApiServiceConfig.class META-INF/services/dev.dsf.bpe.api.plugin.ProcessPluginApiBuilder +META-INF/services/jakarta.ws.rs.client.ClientBuilder +META-INF/services/jakarta.ws.rs.ext.RuntimeDelegate +META-INF/services/org.glassfish.hk2.extension.ServiceLocatorGenerator +META-INF/services/org.glassfish.jersey.innate.inject.spi.ExternalRegistrables +META-INF/services/org.glassfish.jersey.internal.inject.InjectionManagerFactory +META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable +META-INF/services/org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable +org/apache/http/client/version.properties +org/glassfish/jersey/client/internal/localization.properties +org/glassfish/jersey/internal/localization.properties org/hl7/fhir/r4/model/fhirversion.properties \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-classes.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-classes.list index b3616eafb..11c47ef76 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-classes.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-classes.list @@ -17,6 +17,7 @@ com.fasterxml.jackson com.google.common com.ctc.wstx.stax.WstxInputFactory +com.sun.mail dev.dsf.bpe.api jakarta.activation jakarta.annotation.Nonnull @@ -38,6 +39,7 @@ org.operaton.bpm.engine.impl.variable.serializer org.operaton.bpm.engine.ProcessEngine org.operaton.bpm.engine.RuntimeService org.operaton.bpm.engine.variable +org.operaton.bpm.model.bpmn.impl org.operaton.bpm.model.bpmn.instance org.glassfish.jersey org.slf4j.Logger diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-resources.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-resources.list index 3124f62e4..b514ff18f 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-resources.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/allowed-bpe-resources.list @@ -14,3 +14,4 @@ # limitations under the License. # +META-INF/mailcap \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/resources-with-priority.list b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/resources-with-priority.list index de3ba9e93..5e4831cdf 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/resources-with-priority.list +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/bpe/api/v2/resources-with-priority.list @@ -19,4 +19,5 @@ ca/uhn/fhir/i18n/hapi-messages.properties dev/dsf/bpe/v2/plugin/ApiServicesSpringConfiguration.class dev/dsf/bpe/v2/spring/ApiServiceConfig.class META-INF/services/dev.dsf.bpe.api.plugin.ProcessPluginApiBuilder +org/apache/tika/mime/tika-mimetypes.xml org/hl7/fhir/r4/hapi/model/fhirversion.properties \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/AbstractIntegrationTest.java b/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/AbstractIntegrationTest.java index 1c361ab2d..e6d700d22 100644 --- a/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/AbstractIntegrationTest.java +++ b/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/AbstractIntegrationTest.java @@ -66,6 +66,8 @@ import org.springframework.web.context.support.WebApplicationContextUtils; import org.testcontainers.utility.DockerImageName; +import com.icegreen.greenmail.util.ServerSetupTest; + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; import de.hsheilbronn.mi.utils.crypto.keystore.KeyStoreCreator; @@ -452,6 +454,11 @@ private static JettyServer startBpeServer(ServerSocketChannel statusConnectorCha initParameters.put("dev.dsf.bpe.fhir.client.connections.config.default.trust.server.certificate.cas", certificates.getCaCertificateFile().toString()); + initParameters.put("dev.dsf.bpe.mail.host", "localhost"); + initParameters.put("dev.dsf.bpe.mail.port", String.valueOf(ServerSetupTest.SMTP.getPort())); + initParameters.put("dev.dsf.bpe.mail.toAddresses", "to@localhost"); + initParameters.put("dev.dsf.bpe.mail.fromAddress", "from@localhost"); + initParameters.put("dev.dsf.bpe.test.env.mandatory", "test-value"); KeyStore clientCertificateTrustStore = KeyStoreCreator diff --git a/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/PluginV2IntegrationTest.java b/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/PluginV2IntegrationTest.java index 3ce5d2dce..21b0b3908 100644 --- a/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/PluginV2IntegrationTest.java +++ b/dsf-bpe/dsf-bpe-server/src/test/java/dev/dsf/bpe/integration/PluginV2IntegrationTest.java @@ -27,10 +27,19 @@ import java.util.List; import java.util.Optional; +import javax.mail.Address; +import javax.mail.BodyPart; +import javax.mail.Message.RecipientType; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; + import org.hl7.fhir.r4.model.Binary; import org.junit.BeforeClass; import org.junit.Test; +import com.icegreen.greenmail.util.GreenMail; +import com.icegreen.greenmail.util.ServerSetupTest; + import de.hsheilbronn.mi.utils.crypto.ca.CertificateAuthority; import de.hsheilbronn.mi.utils.crypto.ca.CertificationRequest; import de.hsheilbronn.mi.utils.crypto.ca.CertificationRequest.CertificationRequestAndPrivateKey; @@ -323,4 +332,43 @@ public void startQuestionnaireTestIdentifierMulti() throws Exception { executePluginTest(createTestTask("QuestionnaireTestIdentifierMulti")); } + + @Test + public void startMailServiceTest() throws Exception + { + GreenMail greenMail = new GreenMail(ServerSetupTest.SMTP); + greenMail.start(); + + try + { + executePluginTest(createTestTask("MailServiceTest")); + + MimeMessage[] receivedMessages = greenMail.getReceivedMessages(); + + assertEquals(1, receivedMessages.length); + + Address[] from = receivedMessages[0].getFrom(); + assertNotNull(from); + assertEquals(1, from.length); + assertEquals("from@localhost", from[0].toString()); + + Address[] to = receivedMessages[0].getRecipients(RecipientType.TO); + assertNotNull(to); + assertEquals(1, to.length); + assertEquals("to@localhost", to[0].toString()); + + assertEquals("subject", receivedMessages[0].getSubject()); + + Object messagContent = receivedMessages[0].getContent(); + assertTrue(messagContent instanceof MimeMultipart); + assertEquals(1, ((MimeMultipart) messagContent).getCount()); + BodyPart bodyPart = ((MimeMultipart) messagContent).getBodyPart(0); + assertTrue(bodyPart.getContent() instanceof String); + assertEquals("message", bodyPart.getContent()); + } + finally + { + greenMail.stop(); + } + } } \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/service/MailServiceTest.java b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/service/MailServiceTest.java new file mode 100644 index 000000000..f96785ecf --- /dev/null +++ b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/service/MailServiceTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2018-2025 Heilbronn University of Applied Sciences + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package dev.dsf.bpe.test.service; + +import dev.dsf.bpe.test.AbstractTest; +import dev.dsf.bpe.test.PluginTest; +import dev.dsf.bpe.v2.ProcessPluginApi; +import dev.dsf.bpe.v2.activity.ServiceTask; +import dev.dsf.bpe.v2.error.ErrorBoundaryEvent; +import dev.dsf.bpe.v2.service.MailService; +import dev.dsf.bpe.v2.variables.Variables; + +public class MailServiceTest extends AbstractTest implements ServiceTask +{ + @Override + public void execute(ProcessPluginApi api, Variables variables) throws ErrorBoundaryEvent, Exception + { + executeTests(api, variables, api.getMailService()); + } + + @PluginTest + public void test(MailService mailService) + { + mailService.send("subject", "message"); + } +} diff --git a/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/spring/config/Config.java b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/spring/config/Config.java index 19eb319ac..087608e8d 100644 --- a/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/spring/config/Config.java +++ b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test/spring/config/Config.java @@ -52,6 +52,7 @@ import dev.dsf.bpe.test.service.FieldInjectionTest; import dev.dsf.bpe.test.service.JsonVariableTestGet; import dev.dsf.bpe.test.service.JsonVariableTestSet; +import dev.dsf.bpe.test.service.MailServiceTest; import dev.dsf.bpe.test.service.MimeTypeServiceTest; import dev.dsf.bpe.test.service.OrganizationProviderTest; import dev.dsf.bpe.test.service.ProxyTest; @@ -95,10 +96,10 @@ public static ActivityPrototypeBeanCreator activityPrototypeBeanCreator() FieldInjectionTest.class, ErrorBoundaryEventTestThrow.class, ErrorBoundaryEventTestVerify.class, ExceptionTest.class, CompressionServiceTest.class, ContinueSendTest.class, ContinueSendTestSend.class, ContinueSendTestEvaluate.class, JsonVariableTestSet.class, JsonVariableTestGet.class, - CryptoServiceTest.class, MimeTypeServiceTest.class, FhirBinaryVariableTestSet.class, - FhirBinaryVariableTestGet.class, DsfClientTest.class, TargetProviderTest.class, DataLoggerTest.class, - AutowireTest.class, QuestionnaireTestAnswer.class, QuestionnaireTestAnswerCheck.class, - QuestionnaireTestSetIdentifies.class); + CryptoServiceTest.class, MailServiceTest.class, MimeTypeServiceTest.class, + FhirBinaryVariableTestSet.class, FhirBinaryVariableTestGet.class, DsfClientTest.class, + TargetProviderTest.class, DataLoggerTest.class, AutowireTest.class, QuestionnaireTestAnswer.class, + QuestionnaireTestAnswerCheck.class, QuestionnaireTestSetIdentifies.class); } @Bean diff --git a/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/resources/bpe/test.bpmn b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/resources/bpe/test.bpmn index 5b5cf6346..820ab6c7d 100644 --- a/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/resources/bpe/test.bpmn +++ b/dsf-bpe/dsf-bpe-test-plugin-v2/src/main/resources/bpe/test.bpmn @@ -66,6 +66,7 @@ Flow_1ih8var Flow_1gt50du Flow_1phdcxi + Flow_1mo71sv @@ -102,6 +103,7 @@ Flow_1u24rv8 Flow_0civp0p Flow_10cr72e + Flow_0jr64it Flow_0a1kwg9 @@ -615,6 +617,14 @@ Flow_1phdcxi + + Flow_1mo71sv + Flow_0jr64it + + + ${testActivity == 'MailServiceTest'} + + @@ -858,6 +868,10 @@ + + + + @@ -876,6 +890,15 @@ + + + + + + + + + @@ -884,198 +907,158 @@ - - - - - - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + + - - - - + + + - - - - + + + - - - - + + + + - - - - + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + + + + + + + + + + + + + + + + @@ -1086,16 +1069,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1106,11 +1113,26 @@ + + + + + + + + + + + + + + + @@ -1121,83 +1143,25 @@ + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - + + + + @@ -1207,11 +1171,6 @@ - - - - - @@ -1221,6 +1180,16 @@ + + + + + + + + + + @@ -1265,6 +1234,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1277,10 +1266,6 @@ - - - - @@ -1307,9 +1292,24 @@ - - - + + + + + + + + + + + + + + + + + + @@ -1317,6 +1317,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dsf-docker-dev-setup-3dic-ttp/docker-compose.yml b/dsf-docker-dev-setup-3dic-ttp/docker-compose.yml index b5378f93a..2a826ef53 100644 --- a/dsf-docker-dev-setup-3dic-ttp/docker-compose.yml +++ b/dsf-docker-dev-setup-3dic-ttp/docker-compose.yml @@ -34,6 +34,10 @@ services: source: ./proxy/nginx.conf target: /etc/nginx/nginx.conf read_only: true + - type: bind + source: ./proxy/index.html + target: /usr/share/nginx/html/index.html + read_only: true networks: dic1-fhir-frontend: ipv4_address: 172.20.0.2 diff --git a/dsf-docker-dev-setup-3dic-ttp/proxy/conf.d/localhost.conf b/dsf-docker-dev-setup-3dic-ttp/proxy/conf.d/localhost.conf new file mode 100644 index 000000000..0ef58e453 --- /dev/null +++ b/dsf-docker-dev-setup-3dic-ttp/proxy/conf.d/localhost.conf @@ -0,0 +1,28 @@ +# +# Copyright 2018-2025 Heilbronn University of Applied Sciences +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name localhost; + + root /usr/share/nginx/html; + + location / { + try_files /index.html =404; + } +} \ No newline at end of file diff --git a/dsf-docker-dev-setup-3dic-ttp/proxy/index.html b/dsf-docker-dev-setup-3dic-ttp/proxy/index.html new file mode 100644 index 000000000..7676a16f5 --- /dev/null +++ b/dsf-docker-dev-setup-3dic-ttp/proxy/index.html @@ -0,0 +1,91 @@ + + + +localhost + + + +
+image/svg+xml +

3 DIC / TTP Dev Setup

+
+ + + \ No newline at end of file diff --git a/dsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile b/dsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile index badbe1227..c9e1cae65 100755 --- a/dsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile +++ b/dsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM docker.io/library/debian:trixie-slim@sha256:4e401d95de7083948053197a9c3913343cd06b706bf15eb6a0c3ccd26f436a0e AS builder +FROM docker.io/library/debian:trixie-slim@sha256:28de0877c2189802884ccd20f15ee41c203573bd87bb6b883f5f46362d24c5c2 AS builder WORKDIR /opt/fhir COPY --chown=root:2101 ./ ./ RUN chown root:2101 ./ && \ @@ -23,7 +23,7 @@ RUN chown root:2101 ./ && \ chmod 1775 ./log -FROM docker.io/azul/zulu-openjdk:25-jre-headless@sha256:1fa90a584251b66adc28152e25cc496ea63dd787999c86a04c0e2033fa98d39a +FROM docker.io/azul/zulu-openjdk:25-jre-headless@sha256:701476f833e15ea883c329b20f272093b8434a4a9b09745ccdbd716f4f460567 LABEL org.opencontainers.image.source=https://github.com/datasharingframework/dsf LABEL org.opencontainers.image.description="DSF FHIR Server" LABEL org.opencontainers.image.licenses="Apache License, Version 2.0" diff --git a/pom.xml b/pom.xml index 5229650e7..ff9c33428 100755 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 3.1.0 4.0.0 4.0.0 - 2.1.0 + 2.1.1 3.0.0 3.0.0 @@ -177,6 +177,11 @@ bcpkix-jdk18on ${bouncycastle.version} + + com.icegreen + greenmail-junit4 + 1.6.15 + @@ -192,7 +197,7 @@ org.postgresql postgresql - 42.7.11 + 42.7.12 org.checkerframework