Skip to content

Commit 415b230

Browse files
committed
changes needed for breaking changes in DSF
1 parent c92a331 commit 415b230

File tree

68 files changed

+138
-124
lines changed

Some content is hidden

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

68 files changed

+138
-124
lines changed

dsf-bpe-process-data-sharing/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<artifactId>dsf-bpe-highmed-processes-pom</artifactId>
1111
<groupId>org.highmed.dsf</groupId>
12-
<version>0.6.0</version>
12+
<version>0.7.0-SNAPSHOT</version>
1313
</parent>
1414

1515
<properties>

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/DataSharingProcessPluginDefinition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
public class DataSharingProcessPluginDefinition implements ProcessPluginDefinition
2626
{
27-
public static final String VERSION = "0.6.0";
28-
public static final LocalDate RELEASE_DATE = LocalDate.of(2022, 5, 10);
27+
public static final String VERSION = "0.7.0";
28+
public static final LocalDate RELEASE_DATE = LocalDate.of(2022, 10, 17);
2929

3030
@Override
3131
public String getName()

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/message/SendErrors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public SendErrors(FhirWebserviceClientProvider clientProvider, TaskHelper taskHe
2929
@Override
3030
protected Stream<ParameterComponent> getAdditionalInputParameters(DelegateExecution execution)
3131
{
32-
Task task = getLeadingTaskFromExecutionVariables();
32+
Task task = getLeadingTaskFromExecutionVariables(execution);
3333
String taskUrl = new Reference(new IdType(getFhirWebserviceClientProvider().getLocalBaseUrl() + "/Task",
3434
task.getIdElement().getIdPart())).getReference();
3535
String errorMessage = createErrorMessage(taskUrl);

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/AbstractCheckResults.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ public AbstractCheckResults(FhirWebserviceClientProvider clientProvider, TaskHel
3333
protected void doExecute(DelegateExecution execution)
3434
{
3535
QueryResults results = (QueryResults) execution.getVariable(BPMN_EXECUTION_VARIABLE_QUERY_RESULTS);
36-
List<QueryResult> filteredResults = filterErroneousResultsAndAddErrorsToCurrentTaskOutputs(results);
37-
List<QueryResult> postProcessedResults = postProcessAllPassingResults(filteredResults);
36+
List<QueryResult> filteredResults = filterErroneousResultsAndAddErrorsToCurrentTaskOutputs(execution, results);
37+
List<QueryResult> postProcessedResults = postProcessAllPassingResults(execution, filteredResults);
3838

3939
execution.setVariable(BPMN_EXECUTION_VARIABLE_QUERY_RESULTS,
4040
QueryResultsValues.create(new QueryResults(postProcessedResults)));
4141
}
4242

43-
private List<QueryResult> filterErroneousResultsAndAddErrorsToCurrentTaskOutputs(QueryResults results)
43+
private List<QueryResult> filterErroneousResultsAndAddErrorsToCurrentTaskOutputs(DelegateExecution execution,
44+
QueryResults results)
4445
{
45-
Task task = getLeadingTaskFromExecutionVariables();
46+
Task task = getLeadingTaskFromExecutionVariables(execution);
4647
return results.getResults().stream().filter(r -> testResultAndAddPossibleError(r, task))
4748
.collect(Collectors.toList());
4849
}
@@ -60,12 +61,15 @@ protected boolean testResultAndAddPossibleError(QueryResult result, Task task)
6061
}
6162

6263
/**
64+
* @param execution
65+
* not <code>null</code>
6366
* @param passedResults
6467
* all {@link QueryResult} objects that passed the checks executed by
6568
* {@link #testResultAndAddPossibleError(QueryResult, Task)}
6669
* @return a list of {@link QueryResult} objects after post processing
6770
*/
68-
protected List<QueryResult> postProcessAllPassingResults(List<QueryResult> passedResults)
71+
protected List<QueryResult> postProcessAllPassingResults(DelegateExecution execution,
72+
List<QueryResult> passedResults)
6973
{
7074
return passedResults;
7175
}

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/CheckMedicSingleMedicResults.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.List;
1010

1111
import org.camunda.bpm.engine.delegate.BpmnError;
12+
import org.camunda.bpm.engine.delegate.DelegateExecution;
1213
import org.highmed.dsf.bpe.variable.QueryResult;
1314
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
1415
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
@@ -34,17 +35,18 @@ protected boolean testResultAndAddPossibleError(QueryResult result, Task task)
3435
}
3536

3637
@Override
37-
protected List<QueryResult> postProcessAllPassingResults(List<QueryResult> passedResults)
38+
protected List<QueryResult> postProcessAllPassingResults(DelegateExecution execution,
39+
List<QueryResult> passedResults)
3840
{
39-
if (!atLeastOneResultExists(passedResults))
41+
if (!atLeastOneResultExists(execution, passedResults))
4042
throw new BpmnError(BPMN_EXECUTION_ERROR_CODE_SINGLE_MEDIC_DATA_SHARING_RESULT);
4143

4244
return passedResults;
4345
}
4446

45-
private boolean atLeastOneResultExists(List<QueryResult> results)
47+
private boolean atLeastOneResultExists(DelegateExecution execution, List<QueryResult> results)
4648
{
47-
Task leadingTask = getLeadingTaskFromExecutionVariables();
49+
Task leadingTask = getLeadingTaskFromExecutionVariables(execution);
4850
String taskId = leadingTask.getId();
4951
String businessKey = getTaskHelper().getFirstInputParameterStringValue(leadingTask, CODESYSTEM_HIGHMED_BPMN,
5052
CODESYSTEM_HIGHMED_BPMN_VALUE_BUSINESS_KEY).orElse(null);

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/CheckTtpMultiMedicResults.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.List;
1010

1111
import org.camunda.bpm.engine.delegate.BpmnError;
12+
import org.camunda.bpm.engine.delegate.DelegateExecution;
1213
import org.highmed.dsf.bpe.variable.QueryResult;
1314
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
1415
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
@@ -34,17 +35,18 @@ protected boolean testResultAndAddPossibleError(QueryResult result, Task task)
3435
}
3536

3637
@Override
37-
protected List<QueryResult> postProcessAllPassingResults(List<QueryResult> passedResults)
38+
protected List<QueryResult> postProcessAllPassingResults(DelegateExecution execution,
39+
List<QueryResult> passedResults)
3840
{
39-
if (!atLeastOneResultExists(passedResults))
41+
if (!atLeastOneResultExists(execution, passedResults))
4042
throw new BpmnError(BPMN_EXECUTION_ERROR_CODE_MULTI_MEDIC_PSEUDONYMIZED_DATA_SHARING_RESULT);
4143

4244
return passedResults;
4345
}
4446

45-
private boolean atLeastOneResultExists(List<QueryResult> results)
47+
private boolean atLeastOneResultExists(DelegateExecution execution, List<QueryResult> results)
4648
{
47-
Task leadingTask = getLeadingTaskFromExecutionVariables();
49+
Task leadingTask = getLeadingTaskFromExecutionVariables(execution);
4850
String taskId = leadingTask.getId();
4951
String businessKey = getTaskHelper().getFirstInputParameterStringValue(leadingTask, CODESYSTEM_HIGHMED_BPMN,
5052
CODESYSTEM_HIGHMED_BPMN_VALUE_BUSINESS_KEY).orElse(null);

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/CheckTtpSingleMedicResults.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.List;
1010

1111
import org.camunda.bpm.engine.delegate.BpmnError;
12+
import org.camunda.bpm.engine.delegate.DelegateExecution;
1213
import org.highmed.dsf.bpe.variable.QueryResult;
1314
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
1415
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
@@ -34,17 +35,18 @@ protected boolean testResultAndAddPossibleError(QueryResult result, Task task)
3435
}
3536

3637
@Override
37-
protected List<QueryResult> postProcessAllPassingResults(List<QueryResult> passedResults)
38+
protected List<QueryResult> postProcessAllPassingResults(DelegateExecution execution,
39+
List<QueryResult> passedResults)
3840
{
39-
if (!atLeastOneResultExists(passedResults))
41+
if (!atLeastOneResultExists(execution, passedResults))
4042
throw new BpmnError(BPMN_EXECUTION_ERROR_CODE_MULTI_MEDIC_PSEUDONYMIZED_DATA_SHARING_RESULT);
4143

4244
return passedResults;
4345
}
4446

45-
private boolean atLeastOneResultExists(List<QueryResult> results)
47+
private boolean atLeastOneResultExists(DelegateExecution execution, List<QueryResult> results)
4648
{
47-
Task leadingTask = getLeadingTaskFromExecutionVariables();
49+
Task leadingTask = getLeadingTaskFromExecutionVariables(execution);
4850
String taskId = leadingTask.getId();
4951
String businessKey = getTaskHelper().getFirstInputParameterStringValue(leadingTask, CODESYSTEM_HIGHMED_BPMN,
5052
CODESYSTEM_HIGHMED_BPMN_VALUE_BUSINESS_KEY).orElse(null);

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/DownloadDataSharingResources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void afterPropertiesSet() throws Exception
6868
@Override
6969
protected void doExecute(DelegateExecution execution)
7070
{
71-
Task task = getCurrentTaskFromExecutionVariables();
71+
Task task = getCurrentTaskFromExecutionVariables(execution);
7272

7373
IdType researchStudyId = getResearchStudyId(task);
7474
FhirWebserviceClient client = getWebserviceClient(researchStudyId);

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/DownloadMultiMedicResults.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public DownloadMultiMedicResults(FhirWebserviceClientProvider clientProvider, Ta
2828
@Override
2929
protected List<QueryResult> getQueryResults(DelegateExecution execution)
3030
{
31-
Task task = getCurrentTaskFromExecutionVariables();
31+
Task task = getCurrentTaskFromExecutionVariables(execution);
3232
Reference requester = task.getRequester();
3333

3434
return getTaskHelper().getInputParameterWithExtension(task, CODESYSTEM_HIGHMED_DATA_SHARING,

dsf-bpe-process-data-sharing/src/main/java/org/highmed/dsf/bpe/service/DownloadResearchStudyResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void afterPropertiesSet() throws Exception
5252
@Override
5353
protected void doExecute(DelegateExecution execution)
5454
{
55-
Task task = getLeadingTaskFromExecutionVariables();
55+
Task task = getLeadingTaskFromExecutionVariables(execution);
5656
FhirWebserviceClient client = getFhirWebserviceClientProvider().getLocalWebserviceClient();
5757

5858
IdType researchStudyId = getResearchStudyId(task);

0 commit comments

Comments
 (0)