Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.4.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Jan 26, 2021
2 parents 90e5b4d + 302d828 commit fe19d75
Show file tree
Hide file tree
Showing 518 changed files with 6,773 additions and 14,321 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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 with Maven
name: Java CI Build with Maven

on: [push, pull_request]

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Publish with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B deploy --file pom.xml
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
dsf-bpe/dsf-bpe-server-jetty/docker/dsf_bpe.jar
dsf-bpe/dsf-bpe-server-jetty/docker/lib/*.jar
dsf-bpe/dsf-bpe-server-jetty/docker/plugin/*.jar
dsf-bpe/dsf-bpe-server-jetty/process/*.jar

###
# dsf-fhir ignores
Expand All @@ -23,6 +24,7 @@ dsf-fhir/dsf-fhir-server-jetty/conf/bundle.xml
dsf-fhir/dsf-fhir-server-jetty/conf/config.properties
dsf-fhir/dsf-fhir-server-jetty/docker/dsf_fhir.jar
dsf-fhir/dsf-fhir-server-jetty/docker/lib/*.jar
dsf-fhir/dsf-fhir-validation/src/main/resources/fhir/bundle.xml

###
# dsf-docker-test-setup ignores
Expand All @@ -32,6 +34,7 @@ dsf-docker-test-setup/bpe/app/last_event/time.file
dsf-docker-test-setup/bpe/app/log/*.log
dsf-docker-test-setup/bpe/app/log/*.log.gz
dsf-docker-test-setup/bpe/app/plugin/*.jar
dsf-docker-test-setup/bpe/app/process/*.jar
dsf-docker-test-setup/bpe/db/postgres-data/
dsf-docker-test-setup/bpe/proxy/ssl/*.pem

Expand All @@ -49,6 +52,7 @@ dsf-docker-test-setup/fhir/proxy/ssl/*.pem
dsf-docker-test-setup-3medic-ttp/**/bpe/app/conf/*.p12
dsf-docker-test-setup-3medic-ttp/**/bpe/app/conf/config.properties
dsf-docker-test-setup-3medic-ttp/**/bpe/app/plugin/*.jar
dsf-docker-test-setup-3medic-ttp/**/bpe/app/process/*.jar
dsf-docker-test-setup-3medic-ttp/**/bpe/proxy/ssl/*.pem

dsf-docker-test-setup-3medic-ttp/**/fhir/app/conf/*.p12
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ Prerequisite: Java 11, Maven >= 3.6, Docker >= 18
```
docker-compose up
```
* To access the FHIR endpoint (https://localhost/fhir/...) and BPE rest interface (https://localhost:8443/bpe/...) via WebBrowser install *.../highmed-dsf/dsf-tools/dsf-tools-test-data-generator/cert/Webbrowser_Test_User/Webbrowser_Test_User_certificate.p12* (Password: *password*) in your browsers certifiate store. The p12 file includes a client certificate for "Webbrowser Test User" and the "Test CA" certificate. All private-keys and certificates including the Test CA are generated during the maven build and are private to your machine. Make sure to protect the CA private-key at *.../highmed-dsf/dsf-tools/dsf-tools-test-data-generator/cert/ca/testca_private-key.pem* from third-party access if you have installed the Test CA certificate in your certificate store.
* To access the FHIR endpoint (https://fhir/fhir/...) add a `127.0.0.1 fhir` entry to your local `hosts` file and install *.../highmed-dsf/dsf-tools/dsf-tools-test-data-generator/cert/Webbrowser_Test_User/Webbrowser_Test_User_certificate.p12* (Password: *password*) in your web browsers certifiate store. The p12 file includes a client certificate for "Webbrowser Test User" and the "Test CA" certificate. All private-keys and certificates including the Test CA are generated during the maven build and are private to your machine. Make sure to protect the CA private-key at *.../highmed-dsf/dsf-tools/dsf-tools-test-data-generator/cert/ca/testca_private-key.pem* from third-party access if you have installed the Test CA certificate in your certificate store.
* The BPE rest interface (https://localhost:8443/bpe/...) can be accessed via a web browser as well, but is currently not needed for testing.
44 changes: 42 additions & 2 deletions dsf-bpe/dsf-bpe-process-base/pom.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>dsf-bpe-process-base</artifactId>

<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</parent>

<dependencies>
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-webservice-client</artifactId>
</dependency>

<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pseudonymization-medic</artifactId>
</dependency>
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pseudonymization-ttp</artifactId>
</dependency>

<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-mpi-client</artifactId>
</dependency>

<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-openehr-model</artifactId>
</dependency>
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-openehr-client</artifactId>
Expand All @@ -28,11 +47,32 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>de.hs-heilbronn.mi</groupId>
<artifactId>log4j2-utils</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,54 @@

public interface ConstantsBase
{
String VARIABLE_MESSAGE_NAME = "messageName";
String VARIABLE_PROCESS_DEFINITION_KEY = "processDefinitionKey";
String VARIABLE_VERSION_TAG = "versionTag";
String VARIABLE_PROFILE = "profile";
// String VARIABLE_TARGET_ORGANIZATION_ID = "targetOrganizationId";
// String VARIABLE_CORRELATION_KEY = "correlationKey";
String VARIABLE_MULTI_INSTANCE_TARGET = "multiInstanceTarget";
String VARIABLE_MULTI_INSTANCE_TARGETS = "multiInstanceTargets";
String VARIABLE_TASK = "task";
String VARIABLE_LEADING_TASK = "leadingTask";
String VARIABLE_BUNDLE_ID = "bundleId";
String VARIABLE_QUERY_PARAMETERS = "queryParameters";
String VARIABLE_TTP_IDENTIFIER = "ttp";
String BPMN_EXECUTION_VARIABLE_MESSAGE_NAME = "messageName";
String BPMN_EXECUTION_VARIABLE_PROCESS_DEFINITION_KEY = "processDefinitionKey";
String BPMN_EXECUTION_VARIABLE_VERSION_TAG = "versionTag";
String BPMN_EXECUTION_VARIABLE_PROFILE = "profile";
// String BPMN_EXECUTION_VARIABLE_TARGET_ORGANIZATION_ID = "targetOrganizationId";
// String BPMN_EXECUTION_VARIABLE_CORRELATION_KEY = "correlationKey";
String BPMN_EXECUTION_VARIABLE_TARGET = "target";
String BPMN_EXECUTION_VARIABLE_TARGETS = "targets";
String BPMN_EXECUTION_VARIABLE_TASK = "task";
String BPMN_EXECUTION_VARIABLE_LEADING_TASK = "leadingTask";
String BPMN_EXECUTION_VARIABLE_BUNDLE_ID = "bundleId";
String BPMN_EXECUTION_VARIABLE_QUERY_PARAMETERS = "queryParameters";
String BPMN_EXECUTION_VARIABLE_TTP_IDENTIFIER = "ttp";

/**
* Used to distinguish if I am at the moment in a process called by another process by a CallActivity or not
* Used to distinguish if I am at the moment in a process called
* by another process by a CallActivity or not
*/
String VARIABLE_IN_CALLED_PROCESS = "inCalledProcess";
String BPMN_EXECUTION_VARIABLE_IN_CALLED_PROCESS = "inCalledProcess";

String PROCESS_HIGHMED_URI_BASE = "http://highmed.org/bpe/Process/";

String EXTENSION_HIGHMED_PARTICIPATING_MEDIC = "http://highmed.org/fhir/StructureDefinition/extension-participating-medic";
String EXTENSION_HIGHMED_PARTICIPATING_TTP = "http://highmed.org/fhir/StructureDefinition/extension-participating-ttp";
String EXTENSION_HIGHMED_GROUP_ID = "http://highmed.org/fhir/StructureDefinition/extension-group-id";
String EXTENSION_HIGHMED_QUERY = "http://highmed.org/fhir/StructureDefinition/extension-query";

String PROFILE_HIGHMED_GROUP = "http://highmed.org/fhir/StructureDefinition/group";
String PROFILE_HIGHEMD_RESEARCH_STUDY = "http://highmed.org/fhir/StructureDefinition/research-study";

String CODESYSTEM_HIGHMED_BPMN = "http://highmed.org/fhir/CodeSystem/bpmn-message";
String CODESYSTEM_HIGHMED_BPMN_VALUE_MESSAGE_NAME = "message-name";
String CODESYSTEM_HIGHMED_BPMN_VALUE_BUSINESS_KEY = "business-key";
String CODESYSTEM_HIGHMED_BPMN_VALUE_CORRELATION_KEY = "correlation-key";
String CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR_MESSAGE = "error";
String CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR = "error";

String PROCESS_URI_BASE = "http://highmed.org/bpe/Process/";
String CODESYSTEM_HIGHMED_ORGANIZATION_TYPE = "http://highmed.org/fhir/CodeSystem/organization-type";
String CODESYSTEM_HIGHMED_ORGANIZATION_TYPE_VALUE_TTP = "TTP";
String CODESYSTEM_HIGHMED_ORGANIZATION_TYPE_VALUE_MEDIC = "MeDIC";

String ORGANIZATION_IDENTIFIER_SYSTEM = "http://highmed.org/fhir/NamingSystem/organization-identifier";
String ORGANIZATION_TYPE_SYSTEM = "http://highmed.org/fhir/CodeSystem/organization-type";
String ORGANIZATION_TYPE_TTP = "TTP";
String ENDPOINT_IDENTIFIER_SYSTEM = "http://highmed.org/fhir/NamingSystem/endpoint-identifier";
String CODESYSTEM_HIGHMED_QUERY_TYPE = "http://highmed.org/fhir/CodeSystem/query-type";
String CODESYSTEM_HIGMED_QUERY_TYPE_VALUE_AQL = "application/x-aql-query";

String EXTENSION_QUERY_URI = "http://highmed.org/fhir/StructureDefinition/query";
String CODESYSTEM_QUERY_TYPE = "http://highmed.org/fhir/CodeSystem/query-type";
String CODESYSTEM_QUERY_TYPE_AQL = "application/x-aql-query";
CodeType AQL_QUERY_TYPE = new CodeType(CODESYSTEM_QUERY_TYPE_AQL).setSystem(CODESYSTEM_QUERY_TYPE);
String NAMINGSYSTEM_HIGHMED_ORGANIZATION_IDENTIFIER = "http://highmed.org/fhir/NamingSystem/organization-identifier";
String NAMINGSYSTEM_HIGHMED_ENDPOINT_IDENTIFIER = "http://highmed.org/fhir/NamingSystem/endpoint-identifier";
String NAMINGSYSTEM_HIGHMED_RESEARCH_STUDY_IDENTIFIER = "http://highmed.org/fhir/NamingSystem/research-study-identifier";

CodeType CODE_TYPE_AQL_QUERY = new CodeType(CODESYSTEM_HIGMED_QUERY_TYPE_VALUE_AQL)
.setSystem(CODESYSTEM_HIGHMED_QUERY_TYPE);
String OPENEHR_MIMETYPE_JSON = "application/json";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package org.highmed.dsf.bpe;

import java.util.Collections;
import java.util.List;
import java.util.ServiceLoader;
import java.util.stream.Stream;

import org.camunda.bpm.engine.impl.variable.serializer.TypedValueSerializer;
import org.highmed.dsf.fhir.resources.ResourceProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import ca.uhn.fhir.context.FhirContext;

/**
* A provider configuration file named "org.highmed.dsf.DsfProcessPluginDefinition" containing the canonical name of the
* class implementing this interface needs to be part of the process plugin at "/META-INF/services/". For more details
* on the content of the provider configuration file, see {@link ServiceLoader}.
*
* Additional {@link TypedValueSerializer}s to be registered inside the camunda process engine need be defined as beans
* in the process plugins spring context.
*/
public interface ProcessPluginDefinition
{
/**
* @return process plugin name, same as jar name excluding suffix <code>-&lt;version&gt;.jar</code> used by other
* processes when defining dependencies, e.g. <code>foo-1.2.3</code> for a jar called
* <code>foo-1.2.3.jar</code> or <code>foo-1.2.3-SNAPSHOT.jar</code> with processPluginName <code>foo</code>
* and version <code>1.2.3</code>
*/
String getName();

/**
* @return version of the process plugin, processes and fhir resources, e.g. <code>1.2.3</code>
*/
String getVersion();

/**
* @return <code>name-version</code>
*/
default String getNameAndVersion()
{
return getName() + "-" + getVersion();
}

/**
* Return <code>Stream.of("foo.bpmn");</code> for a foo.bpmn file located in the root folder of the process plugin
* jar. The returned files will be read via {@link ClassLoader#getResourceAsStream(String)}.
*
* @return *.bpmn files inside process plugin jar
*
* @see ClassLoader#getResourceAsStream(String)
*/
Stream<String> getBpmnFiles();

/**
* @return @{@link Configuration} annotated classes defining @{@link Bean} annotated factory methods
*/
Stream<Class<?>> getSpringConfigClasses();

/**
* @param fhirContext
* the applications fhir context, never <code>null</code>
* @param classLoader
* the classLoader that was used to initialize the process plugin, never <code>null</code>
* @return {@link ResourceProvider} with FHIR resources needed to enable the included processes
*/
default ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader classLoader)
{
return ResourceProvider.empty();
}

/**
* @return dependencies to other processes by jar name (excluding '.jar'). The system will add ".jar" and
* "-SNAPSHOT.jar" while searching for jars, e.g. "bar-1.2.3"
*/
default List<String> getDependencyNamesAndVersions()
{
return Collections.emptyList();
}
}
Loading

0 comments on commit fe19d75

Please sign in to comment.