Skip to content

Commit 447eb5a

Browse files
committed
Merge remote-tracking branch 'origin/develop_2' into
issue/296_Optimize_Binary_Resource_Handling
2 parents 3a1c6d7 + a9954f6 commit 447eb5a

File tree

433 files changed

+17734
-5620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+17734
-5620
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
name: Java 21 CodeQL
1+
name: DSF 2.x CodeQL
22

33
on:
44
push:
5-
branches: develop_2
5+
branches: [ "develop_2", "hotfix/2*", "release/2*" ]
66
pull_request:
7-
branches: develop_2
7+
branches: [ "develop_2", "hotfix/2*", "release/2*" ]
8+
schedule:
9+
- cron: '11 15 * * 0' # Sundays, 15:11
810

911
jobs:
1012
analyze:
@@ -39,7 +41,7 @@ jobs:
3941

4042
- name: Compile with Maven
4143
if: ${{ matrix.language == 'java-kotlin' }}
42-
run: mvn --batch-mode --fail-at-end --threads 1C -Dmaven.javadoc.skip=true -Dimpsort.skip=true -Dformatter.skip=true -Dgpg.skip -Denforcer.skip -Dmaven.buildNumber.skip=true -Dexec.skip=true -DskipTests clean package
44+
run: mvn --batch-mode --fail-at-end --threads 1C -Dimpsort.skip=true -Dformatter.skip=true -Denforcer.skip -Dmaven.buildNumber.skip=true -Dexec.skip=true -DskipTests -DskipShadePlugin=true -P!generate-source-and-javadoc-jars clean package
4345

4446
- name: Perform CodeQL Analysis
4547
uses: github/codeql-action/analyze@v3

.github/workflows/maven-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Java 21 CI Build with Maven
1+
name: DSF 2.x Java CI Build with Maven
22

3-
on:
3+
on:
44
pull_request:
55
branches: develop_2
66

@@ -18,4 +18,4 @@ jobs:
1818
java-version: 21
1919
cache: 'maven'
2020
- name: Build with Maven
21-
run: mvn --batch-mode --fail-at-end -DforkCount=2 -Dgpg.skip clean verify
21+
run: mvn --batch-mode --fail-at-end -DforkCount=2 clean verify

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java 21 CI Publish with Maven
1+
name: DSF 2.x Java CI Publish with Maven
22

33
on:
44
pull_request:
@@ -25,4 +25,4 @@ jobs:
2525
- name: Publish with Maven
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
run: mvn --batch-mode --fail-at-end -DforkCount=2 -Dgpg.skip clean deploy
28+
run: mvn --batch-mode --fail-at-end -DforkCount=2 clean deploy

.gitignore

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99

1010
**/*.iml
1111

12+
## dev setup cert folder and files, folder and files generated by dsf-maven-plugin
13+
cert
14+
cert/**
15+
1216
###
1317
# dsf-bpe ignores
1418
###
19+
dsf-bpe/dsf-bpe-server-jetty/cert/*.crt
20+
dsf-bpe/dsf-bpe-server-jetty/cert/*.key
1521
dsf-bpe/dsf-bpe-server-jetty/conf/config.properties
1622
dsf-bpe/dsf-bpe-server-jetty/docker/api/v1/*.jar
1723
dsf-bpe/dsf-bpe-server-jetty/docker/api/v2/*.jar
18-
dsf-bpe/dsf-bpe-server-jetty/docker/ca/*.pem
24+
dsf-bpe/dsf-bpe-server-jetty/docker/ca/client_ca_chains/*.crt
25+
dsf-bpe/dsf-bpe-server-jetty/docker/ca/server_root_cas/*.crt
1926
dsf-bpe/dsf-bpe-server-jetty/docker/dsf_bpe.jar
2027
dsf-bpe/dsf-bpe-server-jetty/docker/dsf_status_client.jar
2128
dsf-bpe/dsf-bpe-server-jetty/docker/lib/*.jar
@@ -26,8 +33,10 @@ dsf-bpe/dsf-bpe-server-jetty/ui
2633
###
2734
# dsf-docker ignore
2835
###
29-
dsf-docker/bpe_proxy/ca/*.pem
30-
dsf-docker/fhir_proxy/ca/*.pem
36+
dsf-docker/bpe_proxy/ca/client_ca_chains/*.crt
37+
dsf-docker/bpe_proxy/ca/client_issuing_cas/*.crt
38+
dsf-docker/fhir_proxy/ca/client_ca_chains/*.crt
39+
dsf-docker/fhir_proxy/ca/client_issuing_cas/*.crt
3140

3241
###
3342
# dsf-docker-test-setup ignores
@@ -74,10 +83,10 @@ dsf-docker-test-setup-3dic-ttp/secrets/dic2.key
7483
dsf-docker-test-setup-3dic-ttp/secrets/dic3.crt
7584
dsf-docker-test-setup-3dic-ttp/secrets/dic3.key
7685
dsf-docker-test-setup-3dic-ttp/secrets/issuing_ca.crt
77-
dsf-docker-test-setup-3dic-ttp/secrets/keycloak.crt
86+
dsf-docker-test-setup-3dic-ttp/secrets/keycloak.chain.crt
7887
dsf-docker-test-setup-3dic-ttp/secrets/keycloak.key.plain
7988
dsf-docker-test-setup-3dic-ttp/secrets/keycloak_trust_store.jks
80-
dsf-docker-test-setup-3dic-ttp/secrets/localhost.crt
89+
dsf-docker-test-setup-3dic-ttp/secrets/localhost.chain.crt
8190
dsf-docker-test-setup-3dic-ttp/secrets/localhost.key.plain
8291
dsf-docker-test-setup-3dic-ttp/secrets/root_ca.crt
8392
dsf-docker-test-setup-3dic-ttp/secrets/ttp.crt
@@ -88,27 +97,14 @@ dsf-docker-test-setup-3dic-ttp/docker-compose.override.yml
8897
###
8998
# dsf-fhir ignores
9099
###
100+
dsf-fhir/dsf-fhir-server-jetty/cert/*.crt
101+
dsf-fhir/dsf-fhir-server-jetty/cert/*.key
91102
dsf-fhir/dsf-fhir-server-jetty/conf/bundle.xml
92103
dsf-fhir/dsf-fhir-server-jetty/conf/config.properties
93-
dsf-fhir/dsf-fhir-server-jetty/docker/ca/*.pem
104+
dsf-fhir/dsf-fhir-server-jetty/docker/ca/client_ca_chains/*.crt
105+
dsf-fhir/dsf-fhir-server-jetty/docker/ca/server_root_cas/*.crt
94106
dsf-fhir/dsf-fhir-server-jetty/docker/dsf_fhir.jar
95107
dsf-fhir/dsf-fhir-server-jetty/docker/dsf_status_client.jar
96108
dsf-fhir/dsf-fhir-server-jetty/docker/lib/*.jar
97109
dsf-fhir/dsf-fhir-server-jetty/ui
98-
dsf-fhir/dsf-fhir-validation/src/main/resources/fhir/bundle.xml
99-
100-
###
101-
# dsf-tools ignores
102-
###
103-
dsf-tools/dsf-tools-default-ca-files-generator/cert/*.pem
104-
105-
dsf-tools/dsf-tools-test-data-generator/bundle/*.xml
106-
107-
dsf-tools/dsf-tools-test-data-generator/cert/**/*.pem
108-
dsf-tools/dsf-tools-test-data-generator/cert/**/*.key
109-
dsf-tools/dsf-tools-test-data-generator/cert/**/*.crt
110-
dsf-tools/dsf-tools-test-data-generator/cert/**/*.csr
111-
dsf-tools/dsf-tools-test-data-generator/cert/**/*.p12
112-
dsf-tools/dsf-tools-test-data-generator/cert/thumbprints.txt
113-
114-
dsf-tools/dsf-tools-test-data-generator/config/*.properties
110+
dsf-fhir/dsf-fhir-validation/src/main/resources/fhir/bundle.xml

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ preferred-citation:
2525
type: proceedings
2626
title: "Data Sharing Framework (DSF)"
2727
version: 2.0.0
28-
date-released: 2025-01-22
28+
date-released: 2025-05-31
2929
url: https://dsf.dev
3030
repository-code: https://github.com/datasharingframework/dsf
3131
repository-artifact: https://github.com/datasharingframework/dsf/releases

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Data Sharing Framework (DSF) logo.](dsf-fhir/dsf-fhir-server/src/main/resources/static/logo.svg)
1+
![Data Sharing Framework (DSF) logo.](dsf-fhir/dsf-fhir-server/src/main/resources/fhir/static/logo.svg)
22

33
The Data Sharing Framework (DSF) implements a distributed process engine based on the BPMN 2.0 and FHIR R4 standards. The DSF is used to support biomedical research with real-world data. Every participating site runs a FHIR endpoint (dsf-fhir) accessible by other sites and a business process engine (dsf-bpe) in the local secured network. Authentication between sites is handled using X.509 client/server certificates. The process engines execute BPMN processes in order to coordinate local and remote steps necessary to enable cross-site data sharing and feasibility analyses. This includes access to local data repositories, use-and-access-committee decision support, consent filtering, and privacy preserving record-linkage and pseudonymization.
44

dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<version>2.0.0-SNAPSHOT</version>
1010
</parent>
1111

12+
<name>DSF BPE Process API v1 Implementation</name>
13+
1214
<dependencies>
1315
<dependency>
1416
<groupId>dev.dsf</groupId>
@@ -59,13 +61,25 @@
5961
<scope>test</scope>
6062
</dependency>
6163
</dependencies>
62-
64+
6365
<build>
6466
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-compiler-plugin</artifactId>
70+
<configuration>
71+
<testCompilerArgument>-proc:none</testCompilerArgument>
72+
</configuration>
73+
</plugin>
6574
<plugin>
6675
<groupId>org.apache.maven.plugins</groupId>
6776
<artifactId>maven-dependency-plugin</artifactId>
6877
<executions>
78+
<execution>
79+
<goals>
80+
<goal>properties</goal>
81+
</goals>
82+
</execution>
6983
<execution>
7084
<id>copy-api-v1-dependencies-to-docker</id>
7185
<phase>pre-integration-test</phase>
@@ -138,10 +152,10 @@
138152
<artifactId>xpp3_xpath</artifactId>
139153
<version>1.1.4c</version>
140154
</artifactItem>-->
141-
<artifactItem>
155+
<!--<artifactItem>
142156
<groupId>org.apache.commons</groupId>
143157
<artifactId>commons-compress</artifactId>
144-
</artifactItem>
158+
</artifactItem>-->
145159
<artifactItem>
146160
<groupId>org.fhir</groupId>
147161
<artifactId>ucum</artifactId>
@@ -185,6 +199,13 @@
185199
</execution>
186200
</executions>
187201
</plugin>
202+
<plugin>
203+
<groupId>org.apache.maven.plugins</groupId>
204+
<artifactId>maven-surefire-plugin</artifactId>
205+
<configuration>
206+
<argLine>-javaagent:${org.mockito:mockito-core:jar}</argLine>
207+
</configuration>
208+
</plugin>
188209
<plugin>
189210
<groupId>org.apache.maven.plugins</groupId>
190211
<artifactId>maven-clean-plugin</artifactId>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package dev.dsf.bpe.v1.logging;
2+
3+
import java.util.Objects;
4+
import java.util.function.Function;
5+
6+
import org.camunda.bpm.engine.delegate.DelegateExecution;
7+
import org.hl7.fhir.r4.model.Coding;
8+
import org.hl7.fhir.r4.model.ResourceType;
9+
import org.hl7.fhir.r4.model.StringType;
10+
import org.hl7.fhir.r4.model.Task;
11+
import org.hl7.fhir.r4.model.Task.ParameterComponent;
12+
13+
import dev.dsf.bpe.api.Constants;
14+
import dev.dsf.bpe.api.logging.AbstractPluginMdc;
15+
import dev.dsf.bpe.v1.constants.CodeSystems.BpmnMessage;
16+
import dev.dsf.bpe.v1.variables.Variables;
17+
18+
public class PluginMdcImpl extends AbstractPluginMdc
19+
{
20+
private final String serverBaseUrl;
21+
private final Function<DelegateExecution, Variables> variablesFactory;
22+
23+
/**
24+
* @param apiVersion
25+
* @param name
26+
* not <code>null</code>
27+
* @param version
28+
* not <code>null</code>
29+
* @param jar
30+
* not <code>null</code>
31+
* @param serverBaseUrl
32+
* not <code>null</code>
33+
* @param variablesFactory
34+
* not <code>null</code>
35+
*/
36+
public PluginMdcImpl(int apiVersion, String name, String version, String jar, String serverBaseUrl,
37+
Function<DelegateExecution, Variables> variablesFactory)
38+
{
39+
super(apiVersion, name, version, jar);
40+
41+
this.serverBaseUrl = Objects.requireNonNull(serverBaseUrl, "serverBaseUrl");
42+
this.variablesFactory = Objects.requireNonNull(variablesFactory, "variablesFactory");
43+
}
44+
45+
@Override
46+
protected ProcessValues getProcessValues(DelegateExecution delegateExecution)
47+
{
48+
Variables variables = variablesFactory.apply(delegateExecution);
49+
50+
Task startTask = variables.getStartTask();
51+
if (startTask == null)
52+
startTask = variables.getResource(Constants.TASK_VARIABLE);
53+
54+
Task latestTask = variables.getLatestTask();
55+
if (startTask == latestTask)
56+
latestTask = null;
57+
58+
return new ProcessValues(startTask == null ? null : startTask.getInstantiatesCanonical(),
59+
getLocalVersionlessAbsoluteUrl(startTask), getRequesterIdentifierValue(startTask),
60+
getFirstInputParameter(latestTask, BpmnMessage.correlationKey()),
61+
getLocalVersionlessAbsoluteUrl(latestTask), getRequesterIdentifierValue(latestTask));
62+
}
63+
64+
private String getLocalVersionlessAbsoluteUrl(Task task)
65+
{
66+
return task == null ? null
67+
: task.getIdElement().toVersionless().withServerBase(serverBaseUrl, ResourceType.Task.name())
68+
.getValue();
69+
}
70+
71+
private String getRequesterIdentifierValue(Task task)
72+
{
73+
if (task == null)
74+
return null;
75+
76+
return task.getRequester().getIdentifier().getValue();
77+
}
78+
79+
private String getFirstInputParameter(Task task, Coding code)
80+
{
81+
if (task == null || code == null)
82+
return null;
83+
84+
return task.getInput().stream().filter(ParameterComponent::hasType)
85+
.filter(c -> c.getType().getCoding().stream()
86+
.anyMatch(co -> co != null && Objects.equals(code.getSystem(), co.getSystem())
87+
&& Objects.equals(code.getCode(), co.getCode())))
88+
.filter(ParameterComponent::hasValue).map(ParameterComponent::getValue)
89+
.filter(v -> v instanceof StringType).map(v -> (StringType) v).map(StringType::getValue).findFirst()
90+
.orElse(null);
91+
}
92+
}

dsf-bpe/dsf-bpe-process-api-v1-impl/src/main/java/dev/dsf/bpe/v1/plugin/ProcessPluginApiBuilderImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class ProcessPluginApiBuilderImpl implements ProcessPluginApiBuilder
1111
{
1212
@Override
1313
public ProcessPluginFactory build(ClassLoader apiClassLoader, ApplicationContext apiApplicationContext,
14-
ConfigurableEnvironment environment)
14+
ConfigurableEnvironment environment, String serverBaseUrl)
1515
{
16-
return new ProcessPluginFactoryImpl(apiClassLoader, apiApplicationContext, environment);
16+
return new ProcessPluginFactoryImpl(apiClassLoader, apiApplicationContext, environment, serverBaseUrl);
1717
}
1818

1919
@Override

dsf-bpe/dsf-bpe-process-api-v1-impl/src/main/java/dev/dsf/bpe/v1/plugin/ProcessPluginFactoryImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ public class ProcessPluginFactoryImpl extends AbstractProcessPluginFactory imple
1919
public static final int API_VERSION = 1;
2020

2121
public ProcessPluginFactoryImpl(ClassLoader apiClassLoader, ApplicationContext apiApplicationContext,
22-
ConfigurableEnvironment environment)
22+
ConfigurableEnvironment environment, String serverBaseUrl)
2323
{
24-
super(API_VERSION, apiClassLoader, apiApplicationContext, environment, ProcessPluginDefinition.class);
24+
super(API_VERSION, apiClassLoader, apiApplicationContext, environment, serverBaseUrl,
25+
ProcessPluginDefinition.class);
2526
}
2627

2728
@Override
2829
protected ProcessPlugin createProcessPlugin(Object processPluginDefinition, boolean draft, Path jarFile,
2930
URLClassLoader pluginClassLoader)
3031
{
3132
return new ProcessPluginImpl((ProcessPluginDefinition) processPluginDefinition, API_VERSION, draft, jarFile,
32-
pluginClassLoader, environment, apiApplicationContext);
33+
pluginClassLoader, environment, apiApplicationContext, serverBaseUrl);
3334
}
3435

3536
@Override

0 commit comments

Comments
 (0)