From b9e89b75fde3eefcd84c7e84a8df56d62ee810f6 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Thu, 14 Dec 2023 13:24:33 +0100 Subject: [PATCH 01/10] start development cycle 1.0.1.0 --- pom.xml | 2 +- .../data_transfer/DataTransferProcessPluginDefinition.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 97220f2..ec38fc5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.medizininformatik-initiative mii-process-data-transfer - 1.0.0.0 + 1.0.1.0-SNAPSHOT UTF-8 diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java index df270e8..0f5c74d 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java @@ -12,7 +12,7 @@ public class DataTransferProcessPluginDefinition implements ProcessPluginDefinition { - public static final String VERSION = "1.0.0.0"; + public static final String VERSION = "1.0.1.0"; public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 12, 14); @Override From 7245535c7a4fc8d3b0add4de61128b53ceda1a04 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 15 Dec 2023 11:47:44 +0100 Subject: [PATCH 02/10] run workflows only once on pull-request, update actions --- .github/workflows/maven-build.yml | 34 ++++++++++++++--------------- .github/workflows/maven-publish.yml | 19 ++++++---------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 119b493..88dd2b1 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -1,9 +1,6 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - name: Java CI Build with Maven -on: [push, pull_request] +on: [push] jobs: build: @@ -11,17 +8,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - uses: s4u/maven-settings-action@v2.8.0 - with: - servers: | - [ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] - - name: Build with Maven - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: mvn -B verify -fae --file pom.xml + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + cache: 'maven' + - uses: s4u/maven-settings-action@v2.8.0 + with: + servers: | + [ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] + - name: Build with Maven + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: mvn --batch-mode --fail-at-end clean verify diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 7acd425..741a2b6 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,31 +1,26 @@ -# This workflow will publish a Java project with Maven -# For more information see: https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-java-packages-with-maven - name: Java CI Publish with Maven on: pull_request: types: [closed] branches: [develop] - release: - types: [published] jobs: publish: - # Only run if releases are published or pull requests are merged, - # omit running if pull requests are closed without merging - if: github.event.pull_request.merged || github.event.action == 'published' + # Only run if pull requests are merged, omit running if pull requests are closed without merging + if: github.event.pull_request.merged runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'zulu' java-version: 17 + cache: 'maven' - uses: s4u/maven-settings-action@v2.8.0 with: servers: | @@ -33,4 +28,4 @@ jobs: - name: Publish with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: mvn -B deploy --file pom.xml \ No newline at end of file + run: mvn --batch-mode --fail-at-end clean deploy \ No newline at end of file From 049556c213d1e531083f241d16247e7be825ec14 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 15 Dec 2023 11:49:12 +0100 Subject: [PATCH 03/10] delete all versions of process from test setup --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ec38fc5..185d19b 100644 --- a/pom.xml +++ b/pom.xml @@ -363,21 +363,21 @@ ${testSetup.location}/docker/dic1/bpe/process - ${project.artifactId}-${project.version}.jar + ${project.artifactId}-*.jar false ${testSetup.location}/docker/dic2/bpe/process - ${project.artifactId}-${project.version}.jar + ${project.artifactId}-*.jar false ${testSetup.location}/docker/dms/bpe/process - ${project.artifactId}-${project.version}.jar + ${project.artifactId}-*.jar false From ef3c66ab4a9417d14efb4c575e465e150ffe05d1 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 15 Dec 2023 12:01:58 +0100 Subject: [PATCH 04/10] add reporting and fix reported code improvements where possible --- pom.xml | 45 +++++++++++++++++++ .../data_transfer/message/SendData.java | 20 ++++----- .../data_transfer/message/SendReceipt.java | 17 +++---- .../data_transfer/service/EncryptData.java | 4 +- .../data_transfer/service/ReadData.java | 2 +- 5 files changed, 65 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index 185d19b..a1669aa 100644 --- a/pom.xml +++ b/pom.xml @@ -201,6 +201,26 @@ + + org.apache.maven.plugins + maven-site-plugin + 3.12.1 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.5.0 + + + com.github.spotbugs + spotbugs-maven-plugin + 4.8.2.0 + + + org.apache.maven.plugins + maven-pmd-plugin + 3.21.2 + @@ -213,6 +233,9 @@ GitHub Packages https://maven.pkg.github.com/medizininformatik-initiative/mii-process-data-transfer + + ${project.artifactId}-site + @@ -388,4 +411,26 @@ + + + + + org.apache.maven.plugins + maven-pmd-plugin + + + com.github.spotbugs + spotbugs-maven-plugin + + + + jp.skypencil.findbugs.slf4j + bug-pattern + 1.5.0 + + + + + + \ No newline at end of file diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java index f3e774e..e2e2bfa 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java @@ -18,6 +18,7 @@ import de.medizininformatik_initiative.process.data_transfer.ConstantsDataTransfer; import de.medizininformatik_initiative.processes.common.util.ConstantsBase; import de.medizininformatik_initiative.processes.common.util.DataSetStatusGenerator; + import dev.dsf.bpe.v1.ProcessPluginApi; import dev.dsf.bpe.v1.activity.AbstractTaskMessageSend; import dev.dsf.bpe.v1.variables.Variables; @@ -54,14 +55,15 @@ protected Stream getAdditionalInputParameters(DelegateExecut .setCode(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_REFERENCE); binaryComponent.setValue(new Reference().setType(ResourceType.Binary.name()).setReference(binaryId)); - String projectIdentifier = variables - .getString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_PROJECT_IDENTIFIER); + String projectIdentifier = variables.getString( + ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_PROJECT_IDENTIFIER); Task.ParameterComponent projectIdentifierComponent = new Task.ParameterComponent(); projectIdentifierComponent.getType().addCoding().setSystem(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER) .setCode(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_PROJECT_IDENTIFIER); - projectIdentifierComponent.setValue(new Identifier() - .setSystem(ConstantsBase.NAMINGSYSTEM_MII_PROJECT_IDENTIFIER).setValue(projectIdentifier)); + projectIdentifierComponent.setValue( + new Identifier().setSystem(ConstantsBase.NAMINGSYSTEM_MII_PROJECT_IDENTIFIER) + .setValue(projectIdentifier)); return Stream.of(binaryComponent, projectIdentifierComponent); } @@ -81,13 +83,11 @@ protected void handleSendTaskError(DelegateExecution execution, Variables variab Task task = variables.getStartTask(); String statusCode = ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_NOT_REACHABLE; - if (exception instanceof WebApplicationException webApplicationException) + if (exception instanceof WebApplicationException webApplicationException + && webApplicationException.getResponse() != null + && webApplicationException.getResponse().getStatus() == Response.Status.FORBIDDEN.getStatusCode()) { - if (webApplicationException.getResponse() != null - && webApplicationException.getResponse().getStatus() == Response.Status.FORBIDDEN.getStatusCode()) - { - statusCode = ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_NOT_ALLOWED; - } + statusCode = ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_NOT_ALLOWED; } task.setStatus(Task.TaskStatus.FAILED); diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java index 1540dd1..cdd74c9 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java @@ -13,6 +13,7 @@ import de.medizininformatik_initiative.process.data_transfer.ConstantsDataTransfer; import de.medizininformatik_initiative.processes.common.util.ConstantsBase; import de.medizininformatik_initiative.processes.common.util.DataSetStatusGenerator; + import dev.dsf.bpe.v1.ProcessPluginApi; import dev.dsf.bpe.v1.activity.AbstractTaskMessageSend; import dev.dsf.bpe.v1.variables.Variables; @@ -55,22 +56,18 @@ protected IdType doSend(FhirWebserviceClient client, Task task) private Stream createReceiptError(Variables variables) { - return statusGenerator - .transformOutputToInputComponent(variables.getStartTask(), - ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER, - ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_STATUS) - .map(this::receiveToReceiptStatus); + return statusGenerator.transformOutputToInputComponent(variables.getStartTask(), + ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER, + ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_STATUS).map(this::receiveToReceiptStatus); } private Task.ParameterComponent receiveToReceiptStatus(Task.ParameterComponent parameterComponent) { Type value = parameterComponent.getValue(); - if (value instanceof Coding coding) + if (value instanceof Coding coding && ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIVE_ERROR.equals( + coding.getCode())) { - if (ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIVE_ERROR.equals(coding.getCode())) - { - coding.setCode(ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIPT_ERROR); - } + coding.setCode(ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIPT_ERROR); } return parameterComponent; diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/EncryptData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/EncryptData.java index 542bc4c..cc5dc91 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/EncryptData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/EncryptData.java @@ -118,7 +118,7 @@ private DocumentReference getDocumentReference(Bundle bundle) { List documentReferences = bundle.getEntry().stream() .map(Bundle.BundleEntryComponent::getResource).filter(r -> r instanceof DocumentReference) - .map(r -> ((DocumentReference) r)).toList(); + .map(r -> (DocumentReference) r).toList(); if (documentReferences.size() < 1) throw new IllegalArgumentException("Could not find any DocumentReference in PublicKey Bundle"); @@ -132,7 +132,7 @@ private DocumentReference getDocumentReference(Bundle bundle) private Binary getBinary(Bundle bundle) { List binaries = bundle.getEntry().stream().map(Bundle.BundleEntryComponent::getResource) - .filter(r -> r instanceof Binary).map(b -> ((Binary) b)).toList(); + .filter(r -> r instanceof Binary).map(b -> (Binary) b).toList(); if (binaries.size() < 1) throw new IllegalArgumentException("Could not find any Binary in PublicKey Bundle"); diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ReadData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ReadData.java index afc48f7..25c91ed 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ReadData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ReadData.java @@ -114,7 +114,7 @@ private DocumentReference readDocumentReference(FhirClient fhirClient, String pr List documentReferences = fhirClient .searchDocumentReferences(ConstantsBase.NAMINGSYSTEM_MII_PROJECT_IDENTIFIER, projectIdentifier) .getEntry().stream().map(Bundle.BundleEntryComponent::getResource) - .filter(r -> r instanceof DocumentReference).map(r -> ((DocumentReference) r)).toList(); + .filter(r -> r instanceof DocumentReference).map(r -> (DocumentReference) r).toList(); if (documentReferences.size() < 1) throw new IllegalArgumentException("Could not find any DocumentReference for project-identifier '" From d4299dc600373192d372199d224ca0f95a5dab3a Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Fri, 15 Dec 2023 12:04:28 +0100 Subject: [PATCH 05/10] foramt-and-sort --- .../process/data_transfer/message/SendData.java | 10 ++++------ .../process/data_transfer/message/SendReceipt.java | 13 +++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java index e2e2bfa..240e3bb 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendData.java @@ -18,7 +18,6 @@ import de.medizininformatik_initiative.process.data_transfer.ConstantsDataTransfer; import de.medizininformatik_initiative.processes.common.util.ConstantsBase; import de.medizininformatik_initiative.processes.common.util.DataSetStatusGenerator; - import dev.dsf.bpe.v1.ProcessPluginApi; import dev.dsf.bpe.v1.activity.AbstractTaskMessageSend; import dev.dsf.bpe.v1.variables.Variables; @@ -55,15 +54,14 @@ protected Stream getAdditionalInputParameters(DelegateExecut .setCode(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_REFERENCE); binaryComponent.setValue(new Reference().setType(ResourceType.Binary.name()).setReference(binaryId)); - String projectIdentifier = variables.getString( - ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_PROJECT_IDENTIFIER); + String projectIdentifier = variables + .getString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_PROJECT_IDENTIFIER); Task.ParameterComponent projectIdentifierComponent = new Task.ParameterComponent(); projectIdentifierComponent.getType().addCoding().setSystem(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER) .setCode(ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_PROJECT_IDENTIFIER); - projectIdentifierComponent.setValue( - new Identifier().setSystem(ConstantsBase.NAMINGSYSTEM_MII_PROJECT_IDENTIFIER) - .setValue(projectIdentifier)); + projectIdentifierComponent.setValue(new Identifier() + .setSystem(ConstantsBase.NAMINGSYSTEM_MII_PROJECT_IDENTIFIER).setValue(projectIdentifier)); return Stream.of(binaryComponent, projectIdentifierComponent); } diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java index cdd74c9..8a04d5a 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/message/SendReceipt.java @@ -13,7 +13,6 @@ import de.medizininformatik_initiative.process.data_transfer.ConstantsDataTransfer; import de.medizininformatik_initiative.processes.common.util.ConstantsBase; import de.medizininformatik_initiative.processes.common.util.DataSetStatusGenerator; - import dev.dsf.bpe.v1.ProcessPluginApi; import dev.dsf.bpe.v1.activity.AbstractTaskMessageSend; import dev.dsf.bpe.v1.variables.Variables; @@ -56,16 +55,18 @@ protected IdType doSend(FhirWebserviceClient client, Task task) private Stream createReceiptError(Variables variables) { - return statusGenerator.transformOutputToInputComponent(variables.getStartTask(), - ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER, - ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_STATUS).map(this::receiveToReceiptStatus); + return statusGenerator + .transformOutputToInputComponent(variables.getStartTask(), + ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER, + ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_STATUS) + .map(this::receiveToReceiptStatus); } private Task.ParameterComponent receiveToReceiptStatus(Task.ParameterComponent parameterComponent) { Type value = parameterComponent.getValue(); - if (value instanceof Coding coding && ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIVE_ERROR.equals( - coding.getCode())) + if (value instanceof Coding coding + && ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIVE_ERROR.equals(coding.getCode())) { coding.setCode(ConstantsBase.CODESYSTEM_DATA_SET_STATUS_VALUE_RECEIPT_ERROR); } From c4c0edb1ebb4324148e80fb4a32e3dd4a67534e0 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Tue, 9 Jan 2024 15:03:25 +0100 Subject: [PATCH 06/10] fix wrong boundary error event path --- src/main/resources/bpe/receive.bpmn | 122 ++++++++++++++-------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/src/main/resources/bpe/receive.bpmn b/src/main/resources/bpe/receive.bpmn index 032b012..529f9e8 100644 --- a/src/main/resources/bpe/receive.bpmn +++ b/src/main/resources/bpe/receive.bpmn @@ -1,5 +1,5 @@ - + Flow_1gyqorb @@ -31,11 +31,11 @@ - Flow_1rx301b + Flow_1a3apuy - Flow_1w37net + Flow_17wdowl @@ -44,8 +44,6 @@ Flow_1w6vljw - Flow_1rx301b - Flow_1w37net Flow_1ynmh47 Flow_1p2po17 @@ -55,8 +53,6 @@ Flow_0sa0z7s - - Flow_0sa0z7s @@ -78,69 +74,18 @@ Flow_1o874e3 Flow_1iwqqfr + Flow_1a3apuy + Flow_17wdowl Flow_1ynmh47 + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -187,6 +132,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 8c88cb53491f9645e5fc7ae2014791760d626b8a Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 4 Mar 2024 14:44:51 +0100 Subject: [PATCH 07/10] upgrade dependencies --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index a1669aa..c26a787 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 17 17 - 1.3.1 + 1.5.0 ../mii-processes-test-setup @@ -45,13 +45,13 @@ de.medizininformatik-initiative mii-processes-common - 1.0.0.0 + 1.0.1.0-SNAPSHOT org.slf4j slf4j-api - 2.0.9 + 2.0.12 provided @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.12.1 ${compileSource} ${compileTarget} @@ -91,7 +91,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.1 + 3.2.5 org.apache.maven.plugins @@ -113,7 +113,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.1 + 3.5.2 package @@ -214,7 +214,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.2.0 + 4.8.3.1 org.apache.maven.plugins From f6c48ae451c04e8cd8e1dad65bfc8eeb15ddde64 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 25 Mar 2024 17:57:19 +0100 Subject: [PATCH 08/10] use commit hash instead of version tag for third-party actions, only build on pull_request --- .github/workflows/maven-build.yml | 4 ++-- .github/workflows/maven-publish.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 88dd2b1..59e3413 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -1,6 +1,6 @@ name: Java CI Build with Maven -on: [push] +on: [pull_request] jobs: build: @@ -15,7 +15,7 @@ jobs: distribution: 'zulu' java-version: 17 cache: 'maven' - - uses: s4u/maven-settings-action@v2.8.0 + - uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd #3.0.0 with: servers: | [ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 741a2b6..639a40c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -21,7 +21,7 @@ jobs: distribution: 'zulu' java-version: 17 cache: 'maven' - - uses: s4u/maven-settings-action@v2.8.0 + - uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd #3.0.0 with: servers: | [ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] From 538447bceb44c7045d1edfe619969ae59cc7a3f0 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Mon, 27 May 2024 10:28:57 +0200 Subject: [PATCH 09/10] upgrade dependencies, fix publish github actions, use List.of instead of Arrays.asList --- .github/workflows/maven-publish.yml | 2 ++ pom.xml | 16 ++++++++-------- .../DataTransferProcessPluginDefinition.java | 6 ++---- .../profile/ActivityDefinitionProfileTest.java | 8 ++++---- .../fhir/profile/TaskProfileTest.java | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 639a40c..a699954 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -4,6 +4,8 @@ on: pull_request: types: [closed] branches: [develop] + release: + types: [published] jobs: publish: diff --git a/pom.xml b/pom.xml index c26a787..2a9db37 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 17 17 - 1.5.0 + 1.5.1 ../mii-processes-test-setup @@ -45,13 +45,13 @@ de.medizininformatik-initiative mii-processes-common - 1.0.1.0-SNAPSHOT + 1.0.1.0 org.slf4j slf4j-api - 2.0.12 + 2.0.13 provided @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.12.1 + 3.13.0 ${compileSource} ${compileTarget} @@ -96,7 +96,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.1 @@ -113,7 +113,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.2 + 3.5.3 package @@ -214,12 +214,12 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.3.1 + 4.8.5.0 org.apache.maven.plugins maven-pmd-plugin - 3.21.2 + 3.22.0 diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java index 0f5c74d..e77380b 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java @@ -1,7 +1,6 @@ package de.medizininformatik_initiative.process.data_transfer; import java.time.LocalDate; -import java.util.Arrays; import java.util.List; import java.util.Map; @@ -72,9 +71,8 @@ public Map> getFhirResourcesByProcessId() return Map.of( // ConstantsDataTransfer.PROCESS_NAME_FULL_DATA_RECEIVE, // - Arrays.asList(aReceive, cCrypto, cDaSeSt, cDaTr, eDaSeStEr, nPrId, sSend, vCrypto, vDaSeStRe, vDaTr), // + List.of(aReceive, cCrypto, cDaSeSt, cDaTr, eDaSeStEr, nPrId, sSend, vCrypto, vDaSeStRe, vDaTr), // ConstantsDataTransfer.PROCESS_NAME_FULL_DATA_SEND, // - Arrays.asList(aSend, cDaSeSt, cDaTr, eDaSeStEr, nPrId, sStatus, sSendStart, tSendStart, vDaSeStSe, - vDaTr)); + List.of(aSend, cDaSeSt, cDaTr, eDaSeStEr, nPrId, sStatus, sSendStart, tSendStart, vDaSeStSe, vDaTr)); } } diff --git a/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/ActivityDefinitionProfileTest.java b/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/ActivityDefinitionProfileTest.java index 586fb3e..7f46fa7 100644 --- a/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/ActivityDefinitionProfileTest.java +++ b/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/ActivityDefinitionProfileTest.java @@ -4,7 +4,7 @@ import static org.junit.Assert.assertTrue; import java.nio.file.Paths; -import java.util.Arrays; +import java.util.List; import org.hl7.fhir.r4.model.ActivityDefinition; import org.junit.ClassRule; @@ -28,7 +28,7 @@ public class ActivityDefinitionProfileTest @ClassRule public static final ValidationSupportRule validationRule = new ValidationSupportRule( DataTransferProcessPluginDefinition.VERSION, DataTransferProcessPluginDefinition.RELEASE_DATE, - Arrays.asList("dsf-activity-definition-1.0.0.xml", "dsf-extension-process-authorization-1.0.0.xml", + List.of("dsf-activity-definition-1.0.0.xml", "dsf-extension-process-authorization-1.0.0.xml", "dsf-extension-process-authorization-organization-1.0.0.xml", "dsf-extension-process-authorization-organization-practitioner-1.0.0.xml", "dsf-extension-process-authorization-parent-organization-role-1.0.0.xml", @@ -43,9 +43,9 @@ public class ActivityDefinitionProfileTest "dsf-coding-process-authorization-remote-all-1.0.0.xml", "dsf-coding-process-authorization-remote-parent-organization-role-1.0.0.xml", "dsf-coding-process-authorization-remote-organization-1.0.0.xml"), - Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", + List.of("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"), - Arrays.asList("dsf-organization-role-1.0.0.xml", "dsf-practitioner-role-1.0.0.xml", + List.of("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")); diff --git a/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/TaskProfileTest.java b/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/TaskProfileTest.java index 8926706..b7fc5e4 100644 --- a/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/TaskProfileTest.java +++ b/src/test/java/de/medizininformatik_initiative/process/data_transfer/fhir/profile/TaskProfileTest.java @@ -2,8 +2,8 @@ import static org.junit.Assert.assertEquals; -import java.util.Arrays; import java.util.Date; +import java.util.List; import java.util.UUID; import org.hl7.fhir.r4.model.Identifier; @@ -38,11 +38,11 @@ public class TaskProfileTest @ClassRule public static final ValidationSupportRule validationRule = new ValidationSupportRule(def.getResourceVersion(), def.getResourceReleaseDate(), - Arrays.asList("dsf-task-base-1.0.0.xml", "extension-data-set-status-error.xml", "task-data-send-start.xml", + List.of("dsf-task-base-1.0.0.xml", "extension-data-set-status-error.xml", "task-data-send-start.xml", "task-data-send.xml", "task-data-status.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "data-transfer.xml", + List.of("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "data-transfer.xml", "mii-cryptography.xml", "mii-data-set-status.xml"), - Arrays.asList("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "data-transfer.xml", + List.of("dsf-read-access-tag-1.0.0.xml", "dsf-bpmn-message-1.0.0.xml", "data-transfer.xml", "mii-cryptography.xml", "mii-data-set-status-receive.xml", "mii-data-set-status-send.xml")); private final ResourceValidator resourceValidator = new ResourceValidatorImpl(validationRule.getFhirContext(), From 22029c112698ab574bee0f6794df7732425dd998 Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Tue, 11 Jun 2024 10:26:37 +0200 Subject: [PATCH 10/10] release v1.0.1.0 --- pom.xml | 4 ++-- .../data_transfer/DataTransferProcessPluginDefinition.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 2a9db37..d6a73b5 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ 4.0.0 de.medizininformatik-initiative mii-process-data-transfer - 1.0.1.0-SNAPSHOT + 1.0.1.0 UTF-8 diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java index e77380b..c20f9c5 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/DataTransferProcessPluginDefinition.java @@ -12,7 +12,7 @@ public class DataTransferProcessPluginDefinition implements ProcessPluginDefinition { public static final String VERSION = "1.0.1.0"; - public static final LocalDate RELEASE_DATE = LocalDate.of(2023, 12, 14); + public static final LocalDate RELEASE_DATE = LocalDate.of(2024, 6, 11); @Override public String getName()