From 269b2bb66d9c97db52c92780f819a0902666509a Mon Sep 17 00:00:00 2001 From: Paul Pearson <46532983+paul-pearson@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:03:47 +0000 Subject: [PATCH 1/3] CIV-15113 Post translated doc tasks (#1140) * CIV-15151 added camunda flow for notifyinf * CIV-15151 added camunda flow for notifyinf * CIV-15151 added camunda flow for notifyinf * CIV-15151 added camunda flow for notifyinf * CIV-15151 added camunda flow for notifyinf * CIV-15151 updated GA end process * CIV-15151 updated GA end process * CIV-15151 updated GA end process * CIV-15151 updated GA end process * CIV-15115 fixed checkstyle issues * CIV-15115 updated tests * CIV-15113 Post translated doc tasks * CIV-15113 Move label * CIV-15113 Fix flow for LiPs, add tests * Update NotifyGATranslatedUploadedDocumentsTest.java --------- Co-authored-by: jeswanth Co-authored-by: jeswanth-hmcts <134285996+jeswanth-hmcts@users.noreply.github.com> Co-authored-by: Raja Mani Co-authored-by: jors95-moj Co-authored-by: Deepthi Doppalapudi <107422736+deepthidoppalapudihmcts@users.noreply.github.com> Co-authored-by: Johnny Vineall Co-authored-by: sankhajuria --- ...oad_translated_document_ga_lip_notify.bpmn | 128 ++++++++++++++++-- ...tifyGATranslatedUploadedDocumentsTest.java | 34 ++++- 2 files changed, 142 insertions(+), 20 deletions(-) diff --git a/src/main/resources/camunda/upload_translated_document_ga_lip_notify.bpmn b/src/main/resources/camunda/upload_translated_document_ga_lip_notify.bpmn index 558f1e098..8f46ea886 100644 --- a/src/main/resources/camunda/upload_translated_document_ga_lip_notify.bpmn +++ b/src/main/resources/camunda/upload_translated_document_ga_lip_notify.bpmn @@ -1,5 +1,5 @@ - + Flow_0g2t112 @@ -12,7 +12,8 @@ - Flow_0hg3qpe + Flow_1wq77hr + Flow_05b0ay8 Flow_0qmsc9o @@ -69,7 +70,7 @@ Flow_05nwln1 Flow_1tjecyy - + @@ -84,6 +85,49 @@ + + Flow_0hg3qpe + Flow_1u52am6 + Flow_06pv761 + + + ${empty flowFlags.LIP_APPLICANT || !flowFlags.LIP_APPLICANT} + + + + + SEND_TRANSLATED_ORDER_TO_LIP_APPLICANT + + + Flow_06pv761 + Flow_1o113vl + + + ${!empty flowFlags.LIP_APPLICANT && flowFlags.LIP_APPLICANT} + + + + + SEND_TRANSLATED_ORDER_TO_LIP_RESPONDENT + + + Flow_0zobuvp + Flow_1wq77hr + + + + Flow_1u52am6 + Flow_1o113vl + Flow_05b0ay8 + Flow_0zobuvp + + + ${empty flowFlags.LIP_RESPONDENT || !flowFlags.LIP_RESPONDENT} + + + + ${!empty flowFlags.LIP_RESPONDENT && flowFlags.LIP_RESPONDENT} + @@ -101,8 +145,9 @@ - - + + + @@ -112,21 +157,34 @@ - - + + - - + + - - + + + + + + + + + + + + - + + + + @@ -142,12 +200,12 @@ - - + + - + @@ -169,6 +227,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyGATranslatedUploadedDocumentsTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyGATranslatedUploadedDocumentsTest.java index 3f128df47..a8b3ccb32 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyGATranslatedUploadedDocumentsTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyGATranslatedUploadedDocumentsTest.java @@ -4,7 +4,8 @@ import org.camunda.bpm.engine.variable.VariableMap; import org.camunda.bpm.engine.variable.Variables; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; import java.util.Map; @@ -42,12 +43,13 @@ void setup() { processInstance = engine.getRuntimeService().startProcessInstanceByKey(processId); } - @Test - void shouldNotifyTranslatedDocumentUploaded() { + @ParameterizedTest + @CsvSource({"false,false", "true,false", "true,true", "false,true"}) + void shouldNotifyTranslatedDocumentUploaded(boolean lipApplicant, boolean lipRespondent) { VariableMap variables = Variables.createVariables(); variables.put("flowFlags", Map.of( - LIP_APPLICANT, false, - LIP_RESPONDENT, false)); + LIP_APPLICANT, lipApplicant, + LIP_RESPONDENT, lipRespondent)); //assert process has started assertFalse(processInstance.isEnded()); @@ -106,6 +108,28 @@ void shouldNotifyTranslatedDocumentUploaded() { "RespondentDashboardTranslatedDocUploadedGA", variables ); + if (lipApplicant) { + //post translated document to LiP applicant + ExternalTask bulkPrintApplicantTask = assertNextExternalTask(NOTIFY_EVENT); + assertCompleteExternalTask( + bulkPrintApplicantTask, + NOTIFY_EVENT, + "SEND_TRANSLATED_ORDER_TO_LIP_APPLICANT", + "BulkPrintOrderApplicant", + variables + ); + } + if (lipRespondent) { + //post translated document to LiP respondent + ExternalTask bulkPrintRespondentTask = assertNextExternalTask(NOTIFY_EVENT); + assertCompleteExternalTask( + bulkPrintRespondentTask, + NOTIFY_EVENT, + "SEND_TRANSLATED_ORDER_TO_LIP_RESPONDENT", + "BulkPrintOrderRespondent", + variables + ); + } //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); From cdb1a0449efd53dc28f685f607709475dbc7c7f7 Mon Sep 17 00:00:00 2001 From: Nigel Dunne <12184413+nigeldunne@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:27:41 +0000 Subject: [PATCH 2/3] DTSCCI-000 Rename process (#1163) * Rename process * Revert "Rename process" This reverts commit afb3ce7bb2fc2b068ec2b9bb1630f9b9cb22d254. * Rename process --- .../resources/camunda/apply_noc_decision_defendant_lip.bpmn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/camunda/apply_noc_decision_defendant_lip.bpmn b/src/main/resources/camunda/apply_noc_decision_defendant_lip.bpmn index fb95dbedb..46debed77 100644 --- a/src/main/resources/camunda/apply_noc_decision_defendant_lip.bpmn +++ b/src/main/resources/camunda/apply_noc_decision_defendant_lip.bpmn @@ -3,7 +3,7 @@ - + Flow_1s0jw89 From 5d16262fcdf95b3734cf6a1d630641551b91e7f2 Mon Sep 17 00:00:00 2001 From: Gareth Lancaster <90632240+Gareth40343@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:29:24 +0000 Subject: [PATCH 3/3] Update values.preview.template.yaml (#1139) --- charts/civil-camunda/values.preview.template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/civil-camunda/values.preview.template.yaml b/charts/civil-camunda/values.preview.template.yaml index f3fb7bba7..22f61dcbd 100644 --- a/charts/civil-camunda/values.preview.template.yaml +++ b/charts/civil-camunda/values.preview.template.yaml @@ -114,6 +114,7 @@ java: HMC_HEARINGS_SUBSCRIPTION_ENABLED: false ACA_SERVICE_API_BASEURL: http://${SERVICE_NAME}-aac-manage-case-assignment HMC_API_URL: http://${SERVICE_NAME}-wiremock + ROLE_ASSIGNMENT_URL: http://am-role-assignment-service-aat.service.core-compute-aat.internal postgresql: enabled: true releaseNameOverride: ${SERVICE_NAME}-postgresql