From cdf56444c467516649eebd6d8f818bab6e8ffc4a Mon Sep 17 00:00:00 2001 From: Reto Wettstein Date: Tue, 3 Dec 2024 16:51:43 +0100 Subject: [PATCH] use BPMN errorMessageVariable --- .../data_transfer/message/SendData.java | 3 - .../data_transfer/service/DecryptData.java | 1 - .../data_transfer/service/DownloadData.java | 1 - .../data_transfer/service/InsertData.java | 1 - .../service/ValidateDataDms.java | 1 - src/main/resources/bpe/receive.bpmn | 8 +- src/main/resources/bpe/send.bpmn | 140 +++++++++--------- 7 files changed, 74 insertions(+), 81 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 240e3bb..bb9abaf 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 @@ -94,9 +94,6 @@ protected void handleSendTaskError(DelegateExecution execution, Variables variab ConstantsDataTransfer.CODESYSTEM_DATA_TRANSFER_VALUE_DATA_SET_STATUS, "Send data-set failed")); variables.updateTask(task); - variables.setString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_SEND_ERROR_MESSAGE, - "Send data-set failed"); - logger.warn( "Could not send data-set with id '{}' for project-identifier '{}' to DMS with identifier '{}' referenced in Task with id '{}' - {}", variables.getString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_SET_REFERENCE), diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DecryptData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DecryptData.java index f4cf3a5..c41afcb 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DecryptData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DecryptData.java @@ -92,7 +92,6 @@ protected void doExecute(DelegateExecution execution, Variables variables) exception.getMessage()); String error = "Decrypt data-set failed - " + exception.getMessage(); - variables.setString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR_MESSAGE, error); throw new BpmnError(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR, error, exception); } } diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DownloadData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DownloadData.java index b7c71b1..c995530 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DownloadData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/DownloadData.java @@ -81,7 +81,6 @@ protected void doExecute(DelegateExecution execution, Variables variables) exception.getMessage()); String error = "Download data-set failed - " + exception.getMessage(); - variables.setString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR_MESSAGE, error); throw new BpmnError(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR, error, exception); } } diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/InsertData.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/InsertData.java index fa61eb8..55b3904 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/InsertData.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/InsertData.java @@ -96,7 +96,6 @@ protected void doExecute(DelegateExecution execution, Variables variables) exception.getMessage()); String error = "Insert data-set failed - " + exception.getMessage(); - variables.setString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR_MESSAGE, error); throw new BpmnError(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR, error, exception); } } diff --git a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ValidateDataDms.java b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ValidateDataDms.java index 476cd3b..392d9bb 100644 --- a/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ValidateDataDms.java +++ b/src/main/java/de/medizininformatik_initiative/process/data_transfer/service/ValidateDataDms.java @@ -139,7 +139,6 @@ protected void doExecute(DelegateExecution execution, Variables variables) exception.getMessage()); String error = "Validate data-set failed - " + exception.getMessage(); - variables.setString(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR_MESSAGE, error); throw new BpmnError(ConstantsDataTransfer.BPMN_EXECUTION_VARIABLE_DATA_RECEIVE_ERROR, error, exception); } } diff --git a/src/main/resources/bpe/receive.bpmn b/src/main/resources/bpe/receive.bpmn index 529f9e8..649a208 100644 --- a/src/main/resources/bpe/receive.bpmn +++ b/src/main/resources/bpe/receive.bpmn @@ -28,19 +28,19 @@ Flow_1iwqqfr - + Flow_1a3apuy - + Flow_17wdowl - + Flow_1o874e3 - + Flow_1w6vljw diff --git a/src/main/resources/bpe/send.bpmn b/src/main/resources/bpe/send.bpmn index 6008563..19b37e8 100644 --- a/src/main/resources/bpe/send.bpmn +++ b/src/main/resources/bpe/send.bpmn @@ -1,5 +1,5 @@ - + Flow_0kkjyst @@ -91,7 +91,7 @@ Flow_09xay5j - + @@ -106,74 +106,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -236,6 +168,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +