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.8.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Oct 11, 2022
2 parents f372b75 + 4ae8598 commit 259490a
Show file tree
Hide file tree
Showing 218 changed files with 8,667 additions and 774 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ dsf-fhir/dsf-fhir-validation/src/main/resources/fhir/bundle.xml
###
# dsf-docker-test-setup ignores
###
dsf-docker-test-setup/bpe/last_event/time.file
dsf-docker-test-setup/bpe/log/*.log
dsf-docker-test-setup/bpe/log/*.log.gz
dsf-docker-test-setup/bpe/plugin/*.jar
Expand All @@ -56,7 +55,6 @@ dsf-docker-test-setup-3medic-ttp/**/fhir/.env
###
# dsf-docker-test-setup-3medic-ttp-docker ignores
###
dsf-docker-test-setup-3medic-ttp-docker/**/bpe/last_event/time.file
dsf-docker-test-setup-3medic-ttp-docker/**/bpe/log/*.log
dsf-docker-test-setup-3medic-ttp-docker/**/bpe/log/*.log.gz
dsf-docker-test-setup-3medic-ttp-docker/**/bpe/plugin/*.jar
Expand Down
84 changes: 82 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ preferred-citation:
doi: 10.3233/SHTI210060
type: proceedings
title: "HiGHmed Data Sharing Framework (HiGHmed DSF)"
version: 0.7.0
date-released: 2022-06-21
version: 0.8.0
date-released: 2022-10-11
url: https://github.com/highmed/highmed-dsf/wiki
repository-code: https://github.com/highmed/highmed-dsf
repository-artifact: https://github.com/highmed/highmed-dsf/releases
Expand Down Expand Up @@ -95,3 +95,83 @@ references:
year: 2021
pages: 111-118
doi: 10.3233/SHTI210548
- type: proceedings
authors:
- family-names: Prokosch
given-names: Hans-Ulrich
- family-names: Bahls
given-names: Thomas
- family-names: Bialke
given-names: Martin
- family-names: Eils
given-names: Jürgen
- family-names: Fegeler
given-names: Christian
- family-names: Gruendner
given-names: Julian
- family-names: Haarbrandt
given-names: Birger
- family-names: Hampf
given-names: Christopher
- family-names: Hoffmann
given-names: Wolfgang
- family-names: Hund
given-names: Hauke
- family-names: Kampf
given-names: Marvin
- family-names: Kapsner
given-names: Lorenz A.
- family-names: Kasprzak
given-names: Piotr
- family-names: Kohlbacher
given-names: Oliver
- family-names: Krefting
given-names: Dagmar
- family-names: Mang
given-names: Jonathan M.
- family-names: Marschollek
given-names: Michael
- family-names: Mate
given-names: Sebastian
- family-names: Müller
given-names: Armin
- family-names: Prasser
given-names: Fabian
- family-names: Sass
given-names: Julian
- family-names: Semler
given-names: Sebastian
- family-names: Stenzhorn
given-names: Holger
- family-names: Thun
given-names: Sylvia
- family-names: Zenker
given-names: Sven
- family-names: Eils
given-names: Roland
title: "The COVID-19 Data Exchange Platform of the German University Medicine"
journal: Stud Health Technol Inform
volume: 294
year: 2022
pages: 674-678
doi: 10.3233/SHTI220554
- type: proceedings
authors:
- family-names: Wettstein
given-names: Reto
- family-names: Kussel
given-names: Tobias
- family-names: Hund
given-names: Hauke
- family-names: Fegeler
given-names: Christian
- family-names: Dugas
given-names: Martin
- family-names: Hamacher
given-names: Kay
title: "Secure Multi-Party Computation Based Distributed Feasibility Queries – A HiGHmed Use Case"
journal: Stud Health Technol Inform
volume: 296
year: 2022
pages: 41-49
doi: 10.3233/SHTI220802
7 changes: 6 additions & 1 deletion dsf-bpe/dsf-bpe-process-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -86,6 +86,11 @@
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public interface ConstantsBase
String BPMN_EXECUTION_VARIABLE_TTP_IDENTIFIER = "ttpIdentifier";
String BPMN_EXECUTION_VARIABLE_LEADING_MEDIC_IDENTIFIER = "leadingMedicIdentifier";
String BPMN_EXECUTION_VARIABLE_ALTERNATIVE_BUSINESS_KEY = "alternativeBusinessKey";
String BPMN_EXECUTION_VARIABLE_QUESTIONNAIRE_RESPONSE_ID = "questionnaireResponseId";
String BPMN_EXECUTION_VARIABLE_QUESTIONNAIRE_RESPONSE_COMPLETED = "questionnaireResponseCompleted";

/**
* Used to distinguish if I am at the moment in a process called by another process by a CallActivity or not
Expand All @@ -38,6 +40,10 @@ public interface ConstantsBase
String CODESYSTEM_HIGHMED_BPMN_VALUE_CORRELATION_KEY = "correlation-key";
String CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR = "error";

String CODESYSTEM_HIGHMED_BPMN_USER_TASK = "http://highmed.org/fhir/CodeSystem/bpmn-user-task";
String CODESYSTEM_HIGHMED_BPMN_USER_TASK_VALUE_BUSINESS_KEY = "business-key";
String CODESYSTEM_HIGHMED_BPMN_USER_TASK_VALUE_USER_TASK_ID = "user-task-id";

/**
* @deprecated as of release 0.6.0, use {@link #CODESYSTEM_HIGHMED_ORGANIZATION_ROLE} instead
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.highmed.dsf.bpe.delegate;

import static org.highmed.dsf.bpe.ConstantsBase.BPMN_EXECUTION_VARIABLE_LEADING_TASK;
import static org.highmed.dsf.bpe.ConstantsBase.BPMN_EXECUTION_VARIABLE_TASK;
import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN;
import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR;

Expand All @@ -14,7 +12,6 @@
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
import org.highmed.dsf.fhir.task.TaskHelper;
import org.highmed.dsf.fhir.variables.FhirResourceValues;
import org.hl7.fhir.r4.model.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -28,6 +25,10 @@ public abstract class AbstractServiceDelegate implements JavaDelegate, Initializ
private final TaskHelper taskHelper;
private final ReadAccessHelper readAccessHelper;

/**
* @deprecated as of release 0.8.0, use {@link #getExecution()} instead
*/
@Deprecated
protected DelegateExecution execution;

public AbstractServiceDelegate(FhirWebserviceClientProvider clientProvider, TaskHelper taskHelper,
Expand Down Expand Up @@ -60,7 +61,7 @@ public final void execute(DelegateExecution execution) throws Exception
// Error boundary event, do not stop process execution
catch (BpmnError error)
{
Task task = getTask(execution);
Task task = getTask();

logger.debug("Error while executing service delegate " + getClass().getName(), error);
logger.error(
Expand All @@ -73,7 +74,7 @@ public final void execute(DelegateExecution execution) throws Exception
// Not an error boundary event, stop process execution
catch (Exception exception)
{
Task task = getTask(execution);
Task task = getTask();

logger.debug("Error while executing service delegate " + getClass().getName(), exception);
logger.error("Process {} has fatal error in step {} for task with id {}, reason: {}",
Expand All @@ -95,13 +96,6 @@ public final void execute(DelegateExecution execution) throws Exception
}
}

private Task getTask(DelegateExecution execution)
{
return execution.getParentId() == null || execution.getParentId().equals(execution.getProcessInstanceId())
? getLeadingTaskFromExecutionVariables()
: getCurrentTaskFromExecutionVariables();
}

/**
* Method called by a BPMN service task
*
Expand All @@ -115,6 +109,11 @@ private Task getTask(DelegateExecution execution)
*/
protected abstract void doExecute(DelegateExecution execution) throws BpmnError, Exception;

protected final DelegateExecution getExecution()
{
return execution;
}

protected final TaskHelper getTaskHelper()
{
return taskHelper;
Expand All @@ -130,6 +129,18 @@ protected final ReadAccessHelper getReadAccessHelper()
return readAccessHelper;
}

/**
* @return the active task from execution variables, i.e. the leading task if the main process is running or the
* current task if a subprocess is running.
* @throws IllegalStateException
* if execution of this service delegate has not been started
* @see ConstantsBase#BPMN_EXECUTION_VARIABLE_TASK
*/
protected final Task getTask()
{
return taskHelper.getTask(execution);
}

/**
* @return the current task from execution variables, the task resource that started the current process or
* subprocess
Expand All @@ -139,10 +150,7 @@ protected final ReadAccessHelper getReadAccessHelper()
*/
protected final Task getCurrentTaskFromExecutionVariables()
{
if (execution == null)
throw new IllegalStateException("execution not started");

return (Task) execution.getVariable(BPMN_EXECUTION_VARIABLE_TASK);
return taskHelper.getCurrentTaskFromExecutionVariables(execution);
}

/**
Expand All @@ -153,15 +161,11 @@ protected final Task getCurrentTaskFromExecutionVariables()
*/
protected final Task getLeadingTaskFromExecutionVariables()
{
if (execution == null)
throw new IllegalStateException("execution not started");

Task leadingTask = (Task) execution.getVariable(BPMN_EXECUTION_VARIABLE_LEADING_TASK);
return leadingTask != null ? leadingTask : getCurrentTaskFromExecutionVariables();
return taskHelper.getLeadingTaskFromExecutionVariables(execution);
}

/**
* <i>Uses this method to update the process engine variable {@link ConstantsBase#BPMN_EXECUTION_VARIABLE_TASK},
* <i>Use this method to update the process engine variable {@link ConstantsBase#BPMN_EXECUTION_VARIABLE_TASK},
* after modifying the {@link Task}.</i>
*
* @param task
Expand All @@ -172,17 +176,13 @@ protected final Task getLeadingTaskFromExecutionVariables()
*/
protected final void updateCurrentTaskInExecutionVariables(Task task)
{
if (execution == null)
throw new IllegalStateException("execution not started");

Objects.requireNonNull(task, "task");
execution.setVariable(BPMN_EXECUTION_VARIABLE_TASK, FhirResourceValues.create(task));
taskHelper.updateCurrentTaskInExecutionVariables(execution, task);
}

/**
* <i>Uses this method to update the process engine variable
* <i>Use this method to update the process engine variable
* {@link ConstantsBase#BPMN_EXECUTION_VARIABLE_LEADING_TASK}, after modifying the {@link Task}.</i>
*
* <p>
* Updates the current task if no leading task is set.
*
* @param task
Expand All @@ -193,15 +193,6 @@ protected final void updateCurrentTaskInExecutionVariables(Task task)
*/
protected final void updateLeadingTaskInExecutionVariables(Task task)
{
if (execution == null)
throw new IllegalStateException("execution not started");

Objects.requireNonNull(task, "task");
Task leadingTask = (Task) execution.getVariable(BPMN_EXECUTION_VARIABLE_LEADING_TASK);

if (leadingTask != null)
execution.setVariable(BPMN_EXECUTION_VARIABLE_LEADING_TASK, FhirResourceValues.create(task));
else
updateCurrentTaskInExecutionVariables(task);
taskHelper.updateLeadingTaskInExecutionVariables(execution, task);
}
}
Loading

0 comments on commit 259490a

Please sign in to comment.