diff --git a/src/main/resources/camunda/applicant_trial_ready_notify_others.bpmn b/src/main/resources/camunda/applicant_trial_ready_notify_others.bpmn index bb47dd19f..fcd8f2c01 100644 --- a/src/main/resources/camunda/applicant_trial_ready_notify_others.bpmn +++ b/src/main/resources/camunda/applicant_trial_ready_notify_others.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,8 @@ - Flow_0g0jkyp + Flow_1mcw97n + Flow_1ui9efm Flow_1hce35l @@ -75,7 +76,28 @@ Flow_1gsn98m Flow_0g0jkyp - + + + + + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT + + + Flow_1lr6m8a + Flow_1mcw97n + + + + Flow_0g0jkyp + Flow_1lr6m8a + Flow_1ui9efm + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + Two Respondent Representatives? @@ -92,14 +114,8 @@ - - - - - - - + @@ -115,11 +131,24 @@ - + + + + + + + + + + + + + + @@ -127,12 +156,12 @@ - - + + - - + + @@ -152,28 +181,48 @@ - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/bundle_creation_notification.bpmn b/src/main/resources/camunda/bundle_creation_notification.bpmn index c0a8ccf32..3e4642881 100644 --- a/src/main/resources/camunda/bundle_creation_notification.bpmn +++ b/src/main/resources/camunda/bundle_creation_notification.bpmn @@ -13,7 +13,7 @@ - Flow_1gsn98m + Flow_1utz42u Flow_1hce35l @@ -26,7 +26,7 @@ Flow_10x6e34 Flow_1gsn98m - + @@ -76,6 +76,26 @@ Flow_10x6e34 + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_BUNDLE_CREATED_FOR_DEFENDANT1 + + + Flow_1gsn98m + Flow_1ubtncf + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_BUNDLE_CREATED_FOR_CLAIMANT1 + + + Flow_1ubtncf + Flow_1utz42u + + Two Respondent Representatives? @@ -86,6 +106,10 @@ + + + + @@ -124,11 +148,15 @@ - + - - + + + + + + @@ -136,12 +164,6 @@ - - - - - - @@ -163,6 +185,20 @@ + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/claim_settled_lip.bpmn b/src/main/resources/camunda/claim_settled_lip.bpmn index b0bff74d3..00ade2acb 100644 --- a/src/main/resources/camunda/claim_settled_lip.bpmn +++ b/src/main/resources/camunda/claim_settled_lip.bpmn @@ -29,7 +29,7 @@ - Flow_1gw6mfj + Flow_063ybh5 Flow_0qyhi90 @@ -46,7 +46,29 @@ Flow_1gw6mfj - + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1 + + + + Flow_1gw6mfj + Flow_0xmpjzj + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_DEFENDANT1 + + + + Flow_0xmpjzj + Flow_063ybh5 + + @@ -63,14 +85,22 @@ - - - + + + + + + + + + + + - + @@ -88,16 +118,26 @@ - + + + - + - - + + + + + + + + + + diff --git a/src/main/resources/camunda/claimant_response_cui.bpmn b/src/main/resources/camunda/claimant_response_cui.bpmn index bd1430f02..7a4e2514c 100644 --- a/src/main/resources/camunda/claimant_response_cui.bpmn +++ b/src/main/resources/camunda/claimant_response_cui.bpmn @@ -17,7 +17,7 @@ Flow_Full_Defence Flow_0slswz6 Flow_Full_PartAdmit - Flow_124xgmr + Flow_15z0dwe @@ -50,8 +50,9 @@ - Flow_0mqrfuz - Flow_1osir9u + Flow_0b51r7j + Flow_0axr7i4 + Flow_0fmipfu Flow_1utmlsv @@ -68,11 +69,12 @@ Flow_0slswz6 Flow_0xb2qk0 IN_MEDIATION_FLOW - Flow_124xgmr + Flow_13nmhiz + Flow_15z0dwe Flow_0v6zgri - + ${flowState == "MAIN.FULL_ADMISSION"||flowState == "MAIN.FULL_ADMIT_PAY_IMMEDIATELY"||flowState == "MAIN.FULL_ADMIT_PAY_IMMEDIATELY"} @@ -106,7 +108,7 @@ ${flowState == "MAIN.FULL_ADMIT_REJECT_REPAYMENT" || flowState == "MAIN.PART_ADMIT_REJECT_REPAYMENT"} - + Flow_0pcu8vp Flow_089b2nt Flow_0xsst33 @@ -121,10 +123,10 @@ Flow_089b2nt Flow_0o8yi48 - + ${flowState == "MAIN.IN_MEDIATION"} - + ${flowState != "MAIN.IN_MEDIATION" && !(!empty flowFlags.LIP_JUDGMENT_ADMISSION && flowFlags.LIP_JUDGMENT_ADMISSION)} @@ -132,6 +134,7 @@ Flow_Full_Defence Flow_15u1zrg Flow_1fuyad6 + Flow_13nmhiz ${flowState == "MAIN.FULL_DEFENCE_PROCEED"} @@ -202,10 +205,9 @@ Flow_0xsst33 Flow_0o8yi48 - Flow_0t0s2be Flow_0mqrfuz - + @@ -249,24 +251,67 @@ Flow_1osir9u - + Flow_0beyd6n Flow_0pcu8vp - Flow_0t0s2be + Flow_0axr7i4 ${empty flowFlags.CLAIM_ISSUE_BILINGUAL || !flowFlags.CLAIM_ISSUE_BILINGUAL } - - ${!empty flowFlags.CLAIM_ISSUE_BILINGUAL && flowFlags.CLAIM_ISSUE_BILINGUAL } - ${flowState != "MAIN.IN_MEDIATION" && (!empty flowFlags.LIP_JUDGMENT_ADMISSION && flowFlags.LIP_JUDGMENT_ADMISSION)} - + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_0mqrfuz + Flow_1du76y6 + + + + ${(!(!empty flowFlags.AGREED_TO_MEDIATION && flowFlags.AGREED_TO_MEDIATION)) && flowFags.SETTLE_THE_CLAIM} + + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_1du76y6 + Flow_0b51r7j + + + + ${!empty flowFlags.CLAIM_ISSUE_BILINGUAL && flowFlags.CLAIM_ISSUE_BILINGUAL } + + ${flowState == "MAIN.FULL_DEFENCE_NOT_PROCEED"} + + + + CREATE_CLAIMANT_CCJ_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_1osir9u + Flow_1wzorro + + + + + + CREATE_DEFENDANT_CCJ_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_1wzorro + Flow_0fmipfu + + @@ -279,7 +324,7 @@ - + @@ -299,7 +344,7 @@ - + @@ -317,7 +362,7 @@ - + @@ -369,9 +414,25 @@ - + + + + + + + + + + + + + + + + + @@ -388,8 +449,8 @@ - - + + @@ -399,7 +460,7 @@ - + @@ -445,14 +506,14 @@ - + - + @@ -512,7 +573,7 @@ - + @@ -541,8 +602,7 @@ - - + @@ -551,15 +611,6 @@ - - - - - - - - - @@ -568,15 +619,50 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + + + + + + + + + + diff --git a/src/main/resources/camunda/claimant_response_spec.bpmn b/src/main/resources/camunda/claimant_response_spec.bpmn index e9655edf1..9aa6f9bdc 100644 --- a/src/main/resources/camunda/claimant_response_spec.bpmn +++ b/src/main/resources/camunda/claimant_response_spec.bpmn @@ -1,24 +1,13 @@ - + Flow_0g2t112 - Flow_0tgwl48 + Flow_1ico438 - - - - - - Flow_17evp7q - Flow_0hq1951 - Flow_1kfl2cu - Flow_12qlpg4 - Flow_0tgwl48 - @@ -60,10 +49,9 @@ Flow_0u83asq Flow_00f0sau Flow_1m8na44 - Flow_17evp7q + Flow_12hrz4u - Flow_19mft34 Flow_FULL_DEFENCE_NOT_PROCEED @@ -225,7 +213,7 @@ Flow_1wvs49g Flow_0rus79u - Flow_0hq1951 + Flow_0rg51dv ${(!empty flowFlags.AGREED_TO_MEDIATION && flowFlags.AGREED_TO_MEDIATION)} @@ -233,7 +221,6 @@ ${!(!empty flowFlags.AGREED_TO_MEDIATION && flowFlags.AGREED_TO_MEDIATION)} - Flow_0ruvuz3 Flow_0q6fka6 @@ -339,7 +326,7 @@ Flow_0sizv5e - Flow_1kfl2cu + Flow_0iyna5v Flow_1ld7h4t @@ -353,7 +340,6 @@ ${empty flowFlags.UNREPRESENTED_DEFENDANT_ONE || (!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && !flowFlags.UNREPRESENTED_DEFENDANT_ONE)} - ${flowState == "MAIN.FULL_ADMIT_REJECT_REPAYMENT" || flowState == "MAIN.PART_ADMIT_REJECT_REPAYMENT"} @@ -409,9 +395,8 @@ Flow_ADMIT_PART_SETTLE_CLAIM - Flow_12qlpg4 + Flow_0unqxdq - @@ -479,6 +464,48 @@ ${!empty flowFlags.TWO_RESPONDENT_REPRESENTATIVES && flowFlags.TWO_RESPONDENT_REPRESENTATIVES} + + + + + Flow_1m8fu45 + Flow_1mxjyba + Flow_1ico438 + + + + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_0gv891n + Flow_1m8fu45 + + + + Flow_12hrz4u + Flow_0rg51dv + Flow_0iyna5v + Flow_0unqxdq + Flow_189q5fx + + + + + + + Flow_189q5fx + Flow_0gv891n + Flow_1mxjyba + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + 2 Respondent representatives @@ -511,182 +538,324 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - + + + - - - - - + + + - - - + + + + - + - - - + + + - + - - - - - + + + - - - + + + - - - - + + + + - - - - - - - + + + + - - - - + + + - - - + + + + - - - - - - - + + + - - - - - - - + + + + + - - - - + + + - - - + + + + - - - - + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + + - + - - - + + + - + - - - - - - - - - - - - - - + + + - + - - - + + + - + - - - - - + + + + + + - - - + + + - - - - + + + + + + @@ -697,327 +866,195 @@ - - - - - - - - - - + + + + - - - - - - + + + - - - + + + + + - - - + + + - + - - - + + + + - + - - - - - - + + + + - - - - + + + + + + + + - + - - - - - - - + + + - + - - - - - + + + + - - - - - - - - + + + - - - - - + + + - - - + + + - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - + + + + - + - + - - + + - + - - - + + + - - - + + + + + + + - - - + + + + - - - + + + - - - + + + + + - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1042,6 +1079,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/create_claim_spec_after_payment.bpmn b/src/main/resources/camunda/create_claim_spec_after_payment.bpmn index 90d38c03c..668d4fcff 100644 --- a/src/main/resources/camunda/create_claim_spec_after_payment.bpmn +++ b/src/main/resources/camunda/create_claim_spec_after_payment.bpmn @@ -1,5 +1,5 @@ - + @@ -58,65 +58,6 @@ Flow_0uugzyo Flow_1iq21xs - - - - NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_CONTINUING_ONLINE_SPEC - - - Flow_0m7rqcj - Flow_0xi0k6y - - - - - NOTIFY_RPA_ON_CONTINUOUS_FEED - - - Flow_0wzcptl - Flow_104uutx - Flow_RPA_Continuous_Feed_Completed - - - - - NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC - - - Flow_0xi0k6y - Flow_0wzcptl - - - - - - Flow_RPA_Case_Handed_Offline_Completed - Flow_RPA_Continuous_Feed_Completed - Flow_1ppx3ep - Flow_07e8le1 - Flow_17vsjp4 - - - Flow_17vsjp4 - - - - - NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC - - - Flow_077qhcm - Flow_1ppx3ep - - - - - NOTIFY_APPLICANT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC - - - Flow_0wambq9 - Flow_077qhcm - Flow_1fr3g5j Flow_0zhxvcm @@ -166,20 +107,6 @@ Flow_0szloke Flow_0crivtb - - - - PROCESS_CLAIM_ISSUE_SPEC - - - Flow_0szloke - Flow_17iwrz6 - - - Flow_17iwrz6 - Flow_0wambq9 - Flow_0m7rqcj - ${flowState == "MAIN.PENDING_CLAIM_ISSUED_UNREPRESENTED_DEFENDANT"} @@ -203,13 +130,9 @@ ${empty flowFlags.LIP_CASE || !flowFlags.LIP_CASE} - - - - ${!empty flowFlags.LIP_CASE && flowFlags.LIP_CASE} @@ -229,7 +152,6 @@ ${flowState == "MAIN.PENDING_CLAIM_ISSUED_UNREPRESENTED_DEFENDANT_ONE_V_ONE_SPEC"} - @@ -317,11 +239,123 @@ Flow_07e8le1 + + + + + + + + + + PROCESS_CLAIM_ISSUE_SPEC + + + Flow_0szloke + Flow_07blx0g + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + + + NOTIFY_RPA_ON_CONTINUOUS_FEED + + + Flow_104uutx + Flow_086k21r + Flow_RPA_Continuous_Feed_Completed + + + + + NOTIFY_APPLICANT_SOLICITOR1_FOR_CLAIM_CONTINUING_ONLINE_SPEC + + + Flow_0m7rqcj + Flow_086k21r + + + + + NOTIFY_APPLICANT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC + + + Flow_0wambq9 + Flow_1gwa00l + + + Flow_0ce9o0c + Flow_0wambq9 + Flow_0m7rqcj + + + + + NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC + + + Flow_02kkae4 + Flow_0dqhmaf + Flow_0ce9o0c + + + Flow_07blx0g + Flow_11dfc5e + Flow_0dqhmaf + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT1 + + + Flow_11dfc5e + Flow_02kkae4 + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + + + Flow_17vsjp4 + + + + + + Flow_RPA_Case_Handed_Offline_Completed + Flow_RPA_Continuous_Feed_Completed + Flow_07e8le1 + Flow_0emumd9 + Flow_1trj012 + Flow_17vsjp4 + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_APPLICANT1 + + + Flow_17zp4gv + Flow_0emumd9 + + + Flow_1gwa00l + Flow_17zp4gv + Flow_1trj012 + - + @@ -344,28 +378,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -387,15 +399,6 @@ - - - - - - - - - @@ -438,6 +441,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -487,8 +532,8 @@ - - + + @@ -505,48 +550,31 @@ - - + + - + - - - - - - - - - - + + - - - - - - - + + - - - - - - + + - - - + + + - + @@ -589,15 +617,11 @@ - + - + - - - - @@ -642,8 +666,65 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/create_lip_claim.bpmn b/src/main/resources/camunda/create_lip_claim.bpmn index a16b10280..a7aa8cfe7 100644 --- a/src/main/resources/camunda/create_lip_claim.bpmn +++ b/src/main/resources/camunda/create_lip_claim.bpmn @@ -1,5 +1,5 @@ - + @@ -51,9 +51,6 @@ Flow_1f9xfbw - - Flow_17vsjp4 - @@ -63,14 +60,7 @@ Flow_1f9xfbw Flow_06x85j3 - - - - - - Flow_0ad6bt0 - Flow_17vsjp4 - + ${empty flowFlags.CLAIM_ISSUE_HWF|| !flowFlags.CLAIM_ISSUE_HWF} @@ -90,9 +80,40 @@ Flow_1hi4tb8 Flow_0ad6bt0 - + ${!empty flowFlags.CLAIM_ISSUE_HWF&& flowFlags.CLAIM_ISSUE_HWF} + + Flow_17vsjp4 + + + + + + Flow_0lhg2f5 + Flow_1wbmgtt + Flow_17vsjp4 + + + + + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CLAIMANT1 + + + Flow_0012tae + Flow_0lhg2f5 + + + + + + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1 + + + Flow_0ad6bt0 + Flow_1wbmgtt + + @@ -100,6 +121,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -120,16 +197,10 @@ - - - - - - @@ -140,62 +211,24 @@ + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/camunda/defendant_response_cui.bpmn b/src/main/resources/camunda/defendant_response_cui.bpmn index 46eaeb9e2..93f2998bc 100644 --- a/src/main/resources/camunda/defendant_response_cui.bpmn +++ b/src/main/resources/camunda/defendant_response_cui.bpmn @@ -1,5 +1,5 @@ - + Flow_01gz2ld @@ -13,7 +13,7 @@ - Flow_0wp7bda + Flow_08c114p Flow_0jauxrx @@ -63,7 +63,7 @@ Flow_1q86awx Flow_genereateDQLip - + Flow_02rgqek Flow_0zskc69 @@ -93,21 +93,53 @@ GENERATE_RESPONSE_CUI_SEALED - Flow_generateLipResponsePdf - Flow_0wp7bda + Flow_1hktj3p + Flow_08c114p - GENERATE_RESPONSE_DQ_LIP_SEALED - Flow_genereateDQLip Flow_0zskc69 - Flow_generateLipResponsePdf + Flow_0u423n9 + Flow_1gzwah2 + Flow_1hktj3p + + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE + + + Flow_1yuq0bd + Flow_0pltviq + + + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE + + + Flow_0pltviq + Flow_0u423n9 - + + + + + Flow_genereateDQLip + Flow_1yuq0bd + Flow_1gzwah2 + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + @@ -119,12 +151,6 @@ - - - - - - @@ -141,7 +167,7 @@ - + @@ -153,12 +179,29 @@ + + + + + + - + - + + + + + + + + + + + + @@ -168,8 +211,8 @@ - - + + @@ -198,8 +241,8 @@ - - + + @@ -207,17 +250,17 @@ - - + + - + - + - + @@ -229,13 +272,37 @@ - - + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/defendant_response_deadline_check.bpmn b/src/main/resources/camunda/defendant_response_deadline_check.bpmn new file mode 100644 index 000000000..6a7e71f06 --- /dev/null +++ b/src/main/resources/camunda/defendant_response_deadline_check.bpmn @@ -0,0 +1,121 @@ + + + + + Flow_08iu903 + + + + Flow_496ce35l + + + + + + + Flow_1tlh6bl + Flow_496ce35l + + + + + + + Flow_08iu903 + Flow_1fopw39w + + + Flow_083n0- + + + Flow_083n0- + + + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE_DEADLINE_CLAIMANT + + + Flow_1fopw39w + Flow_09n87f3 + + + + + + + CREATE_DASHBOARD_NOTIFICATION_RESPONSE_DEADLINE_DEFENDANT + + + Flow_09n87f3 + Flow_1tlh6bl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/defendant_response_deadline_check_scheduler.bpmn b/src/main/resources/camunda/defendant_response_deadline_check_scheduler.bpmn new file mode 100644 index 000000000..e8cb531e0 --- /dev/null +++ b/src/main/resources/camunda/defendant_response_deadline_check_scheduler.bpmn @@ -0,0 +1,45 @@ + + + + + + + Flow_04039t + Flow_p65r9p + + + Flow_04039t + + 0 1 16 * * ? + + + + Flow_p65r9p + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/defendant_sign_settlement_agreement.bpmn b/src/main/resources/camunda/defendant_sign_settlement_agreement.bpmn index 3c0a1e95f..daafeca4e 100644 --- a/src/main/resources/camunda/defendant_sign_settlement_agreement.bpmn +++ b/src/main/resources/camunda/defendant_sign_settlement_agreement.bpmn @@ -18,7 +18,7 @@ - Flow_162ion3 + Flow_1bcrztk Flow_0s09rb1 @@ -63,7 +63,17 @@ Flow_0iou2ms Flow_162ion3 - + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_SETTLEMENT_DEFENDANT_RESPONSE + + + Flow_162ion3 + Flow_1bcrztk + + @@ -78,19 +88,9 @@ - - - - - - - - - - @@ -100,7 +100,21 @@ - + + + + + + + + + + + + + + + @@ -118,8 +132,8 @@ - - + + @@ -131,11 +145,15 @@ - + - - + + + + + + diff --git a/src/main/resources/camunda/extend_response_deadline.bpmn b/src/main/resources/camunda/extend_response_deadline.bpmn index 585ba435d..e157acb60 100644 --- a/src/main/resources/camunda/extend_response_deadline.bpmn +++ b/src/main/resources/camunda/extend_response_deadline.bpmn @@ -61,30 +61,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -98,17 +74,17 @@ - + - + - + - + @@ -116,6 +92,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/full_admit_pay_immediately_no_payment_scheduler.bpmn b/src/main/resources/camunda/full_admit_pay_immediately_no_payment_scheduler.bpmn new file mode 100644 index 000000000..20302c075 --- /dev/null +++ b/src/main/resources/camunda/full_admit_pay_immediately_no_payment_scheduler.bpmn @@ -0,0 +1,42 @@ + + + + + + + Flow_03at42s + Flow_1m5i8op + + + Flow_03at42s + + 0 0 0 * * ? + + + + Flow_1m5i8op + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/generate_spec_DJ_form.bpmn b/src/main/resources/camunda/generate_spec_DJ_form.bpmn index 8e79e4b75..438e7459b 100644 --- a/src/main/resources/camunda/generate_spec_DJ_form.bpmn +++ b/src/main/resources/camunda/generate_spec_DJ_form.bpmn @@ -1,20 +1,20 @@ - + Flow_1if0h68 - Flow_1hce35l + Flow_1pxsm5z - - Flow_1qrohha - Flow_1hce35l + Flow_1o15cg9 + Flow_0sqjo72 + Flow_1pxsm5z @@ -70,10 +70,54 @@ Flow_1y44i39 - Flow_1qrohha + Flow_13enwr4 - + + Flow_1l14y21 + Flow_10egr21 + Flow_0qufirr + + + + ${empty flowFlags.LIP_CASE || !flowFlags.LIP_CASE} + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1 + + + Flow_0qufirr + Flow_0tx4fcw + + + ${!empty flowFlags.LIP_CASE && flowFlags.LIP_CASE} + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1 + + + Flow_10egr21 + Flow_0tx4fcw + Flow_1o15cg9 + + + + + Flow_13enwr4 + Flow_1l14y21 + Flow_0sqjo72 + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + @@ -83,50 +127,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -145,8 +151,30 @@ + + + + + + - + + + + + + + + + + + + + + + + + @@ -154,6 +182,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/generate_trial_ready_document_applicant.bpmn b/src/main/resources/camunda/generate_trial_ready_document_applicant.bpmn index 53f67de76..c285c8d3f 100644 --- a/src/main/resources/camunda/generate_trial_ready_document_applicant.bpmn +++ b/src/main/resources/camunda/generate_trial_ready_document_applicant.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,8 @@ - Flow_0g0jkyp + Flow_0mn574t + Flow_1eku1ak Flow_1hce35l @@ -42,34 +43,35 @@ Flow_0w5oqgt Flow_0g0jkyp - + + + + + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT + + + Flow_1c3e93l + Flow_0mn574t + + + + Flow_0g0jkyp + Flow_1c3e93l + Flow_1eku1ak + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + - - - - - - - - - - - - - - - - - - - - @@ -82,14 +84,21 @@ - - + + - + - - + + + + + + + + + @@ -97,6 +106,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/generate_trial_ready_document_respondent1.bpmn b/src/main/resources/camunda/generate_trial_ready_document_respondent1.bpmn index 10036dff4..7d31b7b32 100644 --- a/src/main/resources/camunda/generate_trial_ready_document_respondent1.bpmn +++ b/src/main/resources/camunda/generate_trial_ready_document_respondent1.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,8 @@ - Flow_1j7lj74 + Flow_0l67tt7 + Flow_1enwrp0 Flow_1hce35l @@ -42,34 +43,35 @@ Flow_15epnsg Flow_1j7lj74 - + + + + + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT + + + Flow_1f22sv3 + Flow_0l67tt7 + + + + Flow_1j7lj74 + Flow_1f22sv3 + Flow_1enwrp0 + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + - - - - - - - - - - - - - - - - - - - - @@ -83,13 +85,20 @@ - + + + + - + - - + + + + + + @@ -97,6 +106,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/hearing_fee_unpaid.bpmn b/src/main/resources/camunda/hearing_fee_unpaid.bpmn index be20d323a..cdd580c1f 100644 --- a/src/main/resources/camunda/hearing_fee_unpaid.bpmn +++ b/src/main/resources/camunda/hearing_fee_unpaid.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,8 @@ - Flow_1gsn98m + Flow_1rcw4z2 + Flow_1alrz9a Flow_1hce35l @@ -26,7 +27,7 @@ Flow_10x6e34 Flow_1gsn98m - + @@ -76,6 +77,37 @@ + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_DEFENDANT1 + + + Flow_1lqsfn7 + Flow_15sglnj + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_CLAIMANT1 + + + Flow_15sglnj + Flow_1rcw4z2 + + + + Flow_1gsn98m + Flow_1lqsfn7 + Flow_1alrz9a + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + Two Respondent Representatives? @@ -86,65 +118,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -163,16 +142,104 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/hearing_process.bpmn b/src/main/resources/camunda/hearing_process.bpmn index 848447e8e..be4a5911f 100644 --- a/src/main/resources/camunda/hearing_process.bpmn +++ b/src/main/resources/camunda/hearing_process.bpmn @@ -23,7 +23,7 @@ - Flow_0mjjy8b + Flow_08i1zph Flow_1ew3g5l @@ -97,7 +97,7 @@ Flow_0zriviu Flow_0mjjy8b - + Flow_1w620yk Flow_05en6qt @@ -140,6 +140,26 @@ ${empty flowFlags.LIP_CASE || (!empty flowFlags.LIP_CASE && !flowFlags.LIP_CASE)} + + + + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT + + + Flow_0mjjy8b + Flow_1tzlguk + + + + + + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT + + + Flow_1tzlguk + Flow_08i1zph + + Two Respondent Representatives? @@ -152,12 +172,26 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -182,7 +216,7 @@ - + @@ -217,8 +251,8 @@ - - + + @@ -232,27 +266,21 @@ - - - - - - - + + + - - - - + + + + + + + + - + - - - - - - @@ -262,6 +290,9 @@ + + + @@ -271,32 +302,41 @@ + + + + + + - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + @@ -306,12 +346,6 @@ - - - - - - diff --git a/src/main/resources/camunda/inform_agreed_extension_date_spec.bpmn b/src/main/resources/camunda/inform_agreed_extension_date_spec.bpmn index 21dba3fe9..37ca90ad4 100644 --- a/src/main/resources/camunda/inform_agreed_extension_date_spec.bpmn +++ b/src/main/resources/camunda/inform_agreed_extension_date_spec.bpmn @@ -1,5 +1,5 @@ - + Flow_0cbpb7a @@ -39,7 +39,8 @@ Flow_1fq1z2b - Flow_1gw6mfj + Flow_0cda428 + Flow_0vv2014 Flow_0qyhi90 @@ -100,7 +101,7 @@ ${(!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && flowFlags.UNREPRESENTED_DEFENDANT_ONE)} ${(!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && flowFlags.UNREPRESENTED_DEFENDANT_ONE)} - + Flow_14kz7pj Flow_0kem10c @@ -120,126 +121,191 @@ + + + + CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1 + + + Flow_0gbby9h + Flow_0cda428 + + + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_DEFENDANT_RESPONSE_DATE + + + Flow_0zjhzd8 + Flow_0gbby9h + + + + Flow_1gw6mfj + Flow_0zjhzd8 + Flow_0vv2014 + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - - + + + + + + + + + + + + - - + + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/mediation_successful.bpmn b/src/main/resources/camunda/mediation_successful.bpmn index 3d689133f..7879c11ff 100644 --- a/src/main/resources/camunda/mediation_successful.bpmn +++ b/src/main/resources/camunda/mediation_successful.bpmn @@ -1,5 +1,5 @@ - + @@ -8,35 +8,32 @@ - - Flow_18nnml0 - - - - - - - - - Flow_18nnml0 - Flow_0ocywq9 - - - Flow_0zmuneb - - - - Flow_0zmuneb - - ${!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && flowFlags.UNREPRESENTED_DEFENDANT_ONE} ${!empty flowFlags.TWO_RESPONDENT_REPRESENTATIVES && flowFlags.TWO_RESPONDENT_REPRESENTATIVES} - + + Flow_0paxcik + Flow_0x92wv6 + Flow_10um00o + Flow_09di6e6 + + + ${empty flowFlags.UNREPRESENTED_DEFENDANT_ONE || (!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && !flowFlags.UNREPRESENTED_DEFENDANT_ONE)} + + + + ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} + + + + + + + @@ -55,24 +52,54 @@ Flow_0ocywq9 Flow_1tov26x - - Flow_1tov26x - Flow_10um00o - Flow_09di6e6 + + Flow_0vd4pw7 + + + + + + Flow_1xy778f + Flow_0xkos0b + Flow_0vd4pw7 + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_RESPONDENT + + + Flow_0hi9c7w + Flow_1xy778f + + + Flow_0poxkbp + Flow_13e5miv + Flow_1q5altd + Flow_0hi9c7w + Flow_0xkos0b - - ${empty flowFlags.UNREPRESENTED_DEFENDANT_ONE || (!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && !flowFlags.UNREPRESENTED_DEFENDANT_ONE)} + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} - - - ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} - - - Flow_0p4tgrl - Flow_1abeu64 - Flow_0poxkbp - + + Flow_0zmuneb + + + Flow_0zmuneb + + + + + + + + Flow_18nnml0 + Flow_0ocywq9 + @@ -82,19 +109,11 @@ Flow_09di6e6 Flow_0p4tgrl - - Flow_0vd4pw7 - - - - - - Flow_1q5altd - Flow_0poxkbp - Flow_13e5miv - Flow_0vd4pw7 - - + + Flow_0p4tgrl + Flow_1abeu64 + Flow_0poxkbp + @@ -104,7 +123,32 @@ Flow_1abeu64 Flow_13e5miv - + + Flow_18nnml0 + + + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + + Flow_1tov26x + Flow_0paxcik + Flow_0lb9l26 + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_APPLICANT + + + Flow_0lb9l26 + Flow_0x92wv6 + @@ -112,119 +156,171 @@ + + + + + + - + - + - + - + - - - + + - - + + - - - - - + + - + - - + + + - + - + - - + + + + + + + + + + + - + - + - - - - - - - - - - + + - + - + - - - + + + - + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/mediation_unsuccessful.bpmn b/src/main/resources/camunda/mediation_unsuccessful.bpmn index c18d7fb2a..6917e1345 100644 --- a/src/main/resources/camunda/mediation_unsuccessful.bpmn +++ b/src/main/resources/camunda/mediation_unsuccessful.bpmn @@ -1,5 +1,5 @@ - + @@ -49,7 +49,6 @@ ${empty flowFlags.UNREPRESENTED_DEFENDANT_ONE || (!empty flowFlags.UNREPRESENTED_DEFENDANT_ONE && !flowFlags.UNREPRESENTED_DEFENDANT_ONE)} - @@ -63,31 +62,13 @@ Flow_1mxdu3t - Flow_15fy8lo Flow_08nz2a1 Flow_0miwr61 - - Flow_0vd4pw7 - - + ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} - - ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} - - - - - - - Flow_15fy8lo - Flow_08nz2a1 - Flow_07q2pp0 - Flow_0b9vym8 - Flow_0vd4pw7 - @@ -95,7 +76,7 @@ Flow_0miwr61 - Flow_07q2pp0 + Flow_1w5mjzx @@ -104,11 +85,57 @@ Flow_0z75338 - Flow_0b9vym8 + Flow_1tctuer ${!empty flowFlags.TWO_RESPONDENT_REPRESENTATIVES && flowFlags.TWO_RESPONDENT_REPRESENTATIVES} + + + + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + Flow_0vd4pw7 + + + + + + Flow_1y3ke6f + Flow_06zu1qs + Flow_0vd4pw7 + + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL + + + Flow_0cuo6rm + Flow_1y3ke6f + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + + + Flow_1tctuer + Flow_08nz2a1 + Flow_1w5mjzx + Flow_13ibbt0 + Flow_06zu1qs + + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL + + + Flow_13ibbt0 + Flow_0cuo6rm + @@ -117,75 +144,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -221,20 +179,31 @@ + + + + + + + - + - + - + - - + + + - - + + + + + @@ -243,6 +212,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/notify_claimant_hwf_outcome.bpmn b/src/main/resources/camunda/notify_claimant_hwf_outcome.bpmn index 918eff3bf..d368fac7b 100644 --- a/src/main/resources/camunda/notify_claimant_hwf_outcome.bpmn +++ b/src/main/resources/camunda/notify_claimant_hwf_outcome.bpmn @@ -26,7 +26,7 @@ - Flow_0posdss + Flow_1f1oo6o Flow_1og0z75 @@ -43,7 +43,17 @@ Flow_1vs00o9 Flow_0posdss - + + + + + CLAIMANT1_HWF_DASHBOARD_NOTIFICATION + + + Flow_0posdss + Flow_1f1oo6o + + @@ -73,7 +83,11 @@ - + + + + + @@ -96,10 +110,14 @@ - + - + + + + + diff --git a/src/main/resources/camunda/request_judgement_by_admission.bpmn b/src/main/resources/camunda/request_judgement_by_admission.bpmn index 92da2bbc7..9a03f0647 100644 --- a/src/main/resources/camunda/request_judgement_by_admission.bpmn +++ b/src/main/resources/camunda/request_judgement_by_admission.bpmn @@ -1,5 +1,5 @@ - + Flow_07qelqa @@ -30,7 +30,8 @@ - Flow_1rs25i9 + Flow_0eqwbb5 + Flow_05b6yzf Flow_1kj896s @@ -41,10 +42,11 @@ Flow_0udr06v - Flow_17hbpws + Flow_0rytysz + Flow_1wglvre Flow_1rs25i9 - + @@ -102,10 +104,52 @@ Flow_19cylsq - Flow_17hbpws + Flow_0zprj10 - + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1 + + + Flow_1x3rvdu + Flow_0rytysz + + + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1 + + + Flow_0zah3ig + Flow_0eqwbb5 + + + + Flow_0zprj10 + Flow_1x3rvdu + Flow_1wglvre + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + Flow_1rs25i9 + Flow_0zah3ig + Flow_05b6yzf + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + @@ -122,20 +166,11 @@ - - - - - - - - - - + @@ -144,16 +179,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + @@ -173,48 +230,86 @@ - - + + - - + + - - + + - + - + - - + + - + - - + + - - + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/respondent1_trial_ready_notify_others.bpmn b/src/main/resources/camunda/respondent1_trial_ready_notify_others.bpmn index 3d125d78e..3731d7854 100644 --- a/src/main/resources/camunda/respondent1_trial_ready_notify_others.bpmn +++ b/src/main/resources/camunda/respondent1_trial_ready_notify_others.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,8 @@ - Flow_1j7lj74 + Flow_0kqfw0p + Flow_1yoifpb Flow_1hce35l @@ -75,7 +76,28 @@ Flow_1gsn98m Flow_1j7lj74 - + + + + + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT + + + Flow_0tycdey + Flow_0kqfw0p + + + + Flow_1j7lj74 + Flow_0tycdey + Flow_1yoifpb + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + Two Respondent Representatives? @@ -92,14 +114,8 @@ - - - - - - - + @@ -114,11 +130,24 @@ - + + + + + + + + + + + + + + @@ -126,12 +155,12 @@ - - + + + - @@ -151,28 +180,48 @@ - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/settlement_no_defendant_response_scheduler.bpmn b/src/main/resources/camunda/settlement_no_defendant_response_scheduler.bpmn new file mode 100644 index 000000000..6ff2864b5 --- /dev/null +++ b/src/main/resources/camunda/settlement_no_defendant_response_scheduler.bpmn @@ -0,0 +1,42 @@ + + + + + + + Flow_03at42s + Flow_1m5i8op + + + Flow_03at42s + + 0 0 1 * * ? + + + + Flow_1m5i8op + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/trial_ready_notification.bpmn b/src/main/resources/camunda/trial_ready_notification.bpmn index b7009a659..6a462a680 100644 --- a/src/main/resources/camunda/trial_ready_notification.bpmn +++ b/src/main/resources/camunda/trial_ready_notification.bpmn @@ -1,5 +1,5 @@ - + Flow_08myj65 @@ -13,7 +13,7 @@ - Flow_1gsn98m + Flow_1fzvq5i Flow_1hce35l @@ -26,7 +26,7 @@ Flow_10x6e34 Flow_1gsn98m - + @@ -76,6 +76,26 @@ Flow_10x6e34 + + + + CREATE_DASHBOARD_NOTIFICATION_CP_TRIAL_ARRANGEMENTS_DEFENDANT + + + Flow_1gsn98m + Flow_0maaykt + + + + + + CREATE_DASHBOARD_NOTIFICATION_CP_TRIAL_ARRANGEMENTS_CLAIMANT + + + Flow_0maaykt + Flow_1fzvq5i + + Two Respondent Representatives? @@ -86,62 +106,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -160,6 +130,20 @@ + + + + + + + + + + + + + + @@ -169,10 +153,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/camunda/upload_translated_claimant_intention_document_notify.bpmn b/src/main/resources/camunda/upload_translated_claimant_intention_document_notify.bpmn index 5fc8f2d59..6f9ea7dfe 100644 --- a/src/main/resources/camunda/upload_translated_claimant_intention_document_notify.bpmn +++ b/src/main/resources/camunda/upload_translated_claimant_intention_document_notify.bpmn @@ -26,7 +26,7 @@ - Flow_04ufl57 + Flow_18gxrql Flow_1t08sfu Flow_0d2uvw4 @@ -54,7 +54,7 @@ Flow_07cqff5 Flow_04ufl57 - + @@ -111,6 +111,26 @@ Flow_07cqff5 + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_10ievy6 + Flow_18gxrql + + + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + + + Flow_04ufl57 + Flow_10ievy6 + + @@ -129,11 +149,11 @@ - + - + @@ -158,12 +178,20 @@ - + + + + + + + + + @@ -179,8 +207,8 @@ - - + + @@ -207,11 +235,12 @@ - + - - + + + @@ -234,6 +263,14 @@ + + + + + + + + diff --git a/src/main/resources/camunda/upload_translated_document_claim_issue_notify.bpmn b/src/main/resources/camunda/upload_translated_document_claim_issue_notify.bpmn index 389fbb835..f550c44e1 100644 --- a/src/main/resources/camunda/upload_translated_document_claim_issue_notify.bpmn +++ b/src/main/resources/camunda/upload_translated_document_claim_issue_notify.bpmn @@ -13,7 +13,7 @@ - Flow_0eym6t6 + Flow_0hmh5a1 Flow_0tgwl48 @@ -83,7 +83,17 @@ Flow_0x0c9sg Flow_0eym6t6 - + + + + + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_APPLICANT1 + + + Flow_0eym6t6 + Flow_0hmh5a1 + + @@ -108,22 +118,26 @@ - - - - - - - - - + - + + + + + + + + + + + + + @@ -132,8 +146,8 @@ - - + + @@ -153,19 +167,23 @@ - + - - + + - - + + + + + + diff --git a/src/main/resources/camunda/upload_translated_document_notify.bpmn b/src/main/resources/camunda/upload_translated_document_notify.bpmn index 690a27076..4e4230b63 100644 --- a/src/main/resources/camunda/upload_translated_document_notify.bpmn +++ b/src/main/resources/camunda/upload_translated_document_notify.bpmn @@ -12,7 +12,8 @@ - Flow_1kb2qfb + Flow_190qp5x + Flow_03o5f9d Flow_0qmsc9o @@ -62,8 +63,39 @@ Flow_1kb2qfb - + + + + + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE + + + Flow_15lo1fu + Flow_08y5po9 + + + + + + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE + + + Flow_08y5po9 + Flow_190qp5x + + + + Flow_1kb2qfb + Flow_15lo1fu + Flow_03o5f9d + + + ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED && flowFlags.DASHBOARD_SERVICE_ENABLED} + + + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} + @@ -81,23 +113,34 @@ - - + + - - + + - + + + + - + - - + + + + + + + + + + @@ -115,23 +158,47 @@ - + - - + + + - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ApplicantTrialReadyNotifyOthersTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ApplicantTrialReadyNotifyOthersTest.java index c540f6f3c..eb655e3db 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ApplicantTrialReadyNotifyOthersTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ApplicantTrialReadyNotifyOthersTest.java @@ -24,6 +24,8 @@ class ApplicantTrialReadyNotifyOthersTest extends BpmnBaseTest { = "NOTIFY_RESPONDENT_SOLICITOR1_FOR_OTHER_TRIAL_READY"; public static final String GENERATE_TRIAL_READY_FORM_APPLICANT = "GENERATE_TRIAL_READY_FORM_APPLICANT"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT + = "CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT"; //ACTIVITY IDs private static final String NOTIFY_RESPONDENT_SOLICITOR2_FOR_OTHER_TRIAL_READY_ACTIVITY_ID @@ -32,6 +34,8 @@ class ApplicantTrialReadyNotifyOthersTest extends BpmnBaseTest { = "OtherTrialReadyNotifyRespondentSolicitor1"; public static final String GENERATE_TRIAL_READY_FORM_APPLICANT_ACTIVITY_ID = "GenerateTrialReadyFormApplicant"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT_ACTIVITY_ID + = "GenerateDefendantDashboardNotificationTrialArrangementsNotifyParty"; public ApplicantTrialReadyNotifyOthersTest() { super("applicant_trial_ready_notify_others.bpmn", PROCESS_ID); @@ -50,7 +54,8 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing(boolean variables.put("flowFlags", Map.of( ONE_RESPONDENT_REPRESENTATIVE, !twoRepresentatives, TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, - UNREPRESENTED_DEFENDANT_ONE, false)); + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -84,6 +89,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing(boolean variables ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT_ACTIVITY_ID, + variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -104,7 +116,8 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearingLiP(boole variables.put("flowFlags", Map.of( TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, UNREPRESENTED_DEFENDANT_ONE, true, - UNREPRESENTED_DEFENDANT_TWO, twoRepresentatives)); + UNREPRESENTED_DEFENDANT_TWO, twoRepresentatives, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -138,6 +151,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearingLiP(boole variables ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT_ACTIVITY_ID, + variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BpmnBaseTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BpmnBaseTest.java index e8ea1f1dd..4848fe840 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BpmnBaseTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BpmnBaseTest.java @@ -49,6 +49,7 @@ public abstract class BpmnBaseTest { public static final String PIP_ENABLED = "PIP_ENABLED"; public static final String LIP_JUDGMENT_ADMISSION = "LIP_JUDGMENT_ADMISSION"; public static final String CLAIM_ISSUE_BILINGUAL = "CLAIM_ISSUE_BILINGUAL"; + public static final String DASHBOARD_SERVICE_ENABLED = "DASHBOARD_SERVICE_ENABLED"; public final String bpmnFileName; public final String processId; diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BundleCreationNotificationTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BundleCreationNotificationTest.java index 3ebde450d..82f23bd65 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BundleCreationNotificationTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/BundleCreationNotificationTest.java @@ -73,6 +73,22 @@ void shouldSuccessfullyCompleteBundleCreatedMultiparty(boolean twoRepresentative "BundleCreationNotifyApplicantSolicitor1" ); + //complete the Dashboard creation for defendant + ExternalTask defendantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(defendantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_BUNDLE_CREATED_FOR_DEFENDANT1", + "CreateBundleCreatedDashboardNotificationsForDefendant1" + ); + + //complete the Dashboard creation for claimant + ExternalTask applicantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(applicantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_BUNDLE_CREATED_FOR_CLAIMANT1", + "CreateBundleCreatedDashboardNotificationsForClaimant1" + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimSettledLiPTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimSettledLiPTest.java index 76eae4093..ccb12a2a9 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimSettledLiPTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimSettledLiPTest.java @@ -19,6 +19,13 @@ public class ClaimSettledLiPTest extends BpmnBaseTest { private static final String NOTIFY_DEFENDANT_CLAIMANT_SETTLE_THE_CLAIM_ACTIVITY_ID = "NotifyDefendantClaimantSettleTheClaim"; + private static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1 + = "CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1"; + + //Activity IDs + private static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1_ACTIVITY_ID + = "CreateClaimSettledDashboardNotificationsForClaimant1"; + public ClaimSettledLiPTest() { super(FILE_NAME, PROCESS_ID); } @@ -29,6 +36,8 @@ public void shouldSuccessfullyCompleteClaimSettledLiP() { VariableMap variables = Variables.createVariables(); startBusinessProcess(variables); notifyRespondentClaimantSettleTheClaim(); + createDashboardNotificationForClaimant(); + createDashboardNotificationForDefendant(); completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -41,4 +50,24 @@ private void notifyRespondentClaimantSettleTheClaim() { NOTIFY_DEFENDANT_CLAIMANT_SETTLE_THE_CLAIM_ACTIVITY_ID ); } + + private void createDashboardNotificationForClaimant() { + ExternalTask dashboardNotificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationTask, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_CLAIMANT1_ACTIVITY_ID + ); + } + + private void createDashboardNotificationForDefendant() { + ExternalTask dashboardNotificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationTask, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_SETTLED_FOR_DEFENDANT1", + "CreateClaimSettledDashboardNotificationsForDefendant1" + ); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseCuiTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseCuiTest.java index afe0fd04c..969d3c6c0 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseCuiTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseCuiTest.java @@ -39,6 +39,9 @@ public class ClaimantResponseCuiTest extends BpmnBaseTest { private static final String GENERATE_JUDGMENT_BY_DETERMINATION_RESPONSE_DOC = "GENERATE_JUDGMENT_BY_DETERMINATION_RESPONSE_DOC"; + private static final String CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE"; + //Activity IDs private static final String NOTIFY_LIP_RESPONDENT_CLAIMANT_CONFIRM_TO_PROCEED_ACTIVITY_ID = "NotifyLiPRespondentClaimantConfirmToProceed"; @@ -70,6 +73,10 @@ public class ClaimantResponseCuiTest extends BpmnBaseTest { = "GenerateJudgmentByDeterminationPdf"; private static final String PROCEED_OFFLINE_EVENT = "PROCEEDS_IN_HERITAGE_SYSTEM"; private static final String PROCEED_OFFLINE_EVENT_ACTIVITY_ID = "ProceedOffline"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID = "GenerateDashboardNotificationRespondent1"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_ACTIVITY_ID + = "GenerateClaimantDashboardNotificationClaimantResponse"; public ClaimantResponseCuiTest() { super( @@ -105,6 +112,8 @@ void shouldRunProcess() { notifyApplicantClaimantConfirmsToProceed(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -136,6 +145,8 @@ void shouldRunProcess_ClaimIsInMediation() { generateDQPdf(); generateRPAContinuousFeed(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -169,6 +180,8 @@ void shouldRunProcess_ClaimIsInFullAdmitRepaymentAccept() { generateDQPdf(); proceedCaseOffline(); notifyRPACaseHandledOffline(); + generateClaimantDashboardNotificationForCCJClaimantResponse(); + generateDefendantDashboardNotificationForCCJClaimantResponse(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -202,6 +215,8 @@ void shouldRunProcess_ClaimIsInPartAdmitRepaymentAccept() { generateDQPdf(); proceedCaseOffline(); notifyRPACaseHandledOffline(); + generateClaimantDashboardNotificationForCCJClaimantResponse(); + generateDefendantDashboardNotificationForCCJClaimantResponse(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -240,6 +255,8 @@ void shouldRunProcess_ClaimIsInFullAdmitRejectRepayment() { generateJudgmentByDeterminationPdf(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -274,6 +291,8 @@ void shouldRunProcess_ClaimIsInPartAdmitRejectPayment() { generateJudgmentByDeterminationPdf(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -305,6 +324,8 @@ void shouldRunProcess_ClaimFullDefenceNotAgreeMediation() { notifyApplicantClaimantConfirmsToProceed(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -335,6 +356,8 @@ void shouldRunProcess_ClaimIsInPartAdmitPayImmediately() { notifyApplicantClaimantConfirmsToProceed(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -363,7 +386,6 @@ void shouldRunProcess_ClaimIssueInBilingual() { notifyRespondentClaimantConfirmsToProceed(); notifyApplicantClaimantConfirmsToProceed(); generateDQPdf(); - updateClaimState(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -394,6 +416,8 @@ void shouldRunProcess_whenFullDefenceWithRejectAll() { notifyApplicantClaimantConfirmsToProceed(); generateDQPdf(); updateClaimState(); + createClaimantDashboardNotification(); + createDefendantDashboardNotification(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -410,6 +434,10 @@ private void notifyRespondentClaimantConfirmsToProceed() { assertCompletedCaseEvent(NOTIFY_LIP_RESPONDENT_CLAIMANT_CONFIRM_TO_PROCEED, NOTIFY_LIP_RESPONDENT_CLAIMANT_CONFIRM_TO_PROCEED_ACTIVITY_ID); } + private void createClaimantDashboardNotification() { + assertCompletedCaseEvent(CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, GENERATE_DASHBOARD_NOTIFICATION_ACTIVITY_ID); + } + private void notifyClaimantClaimantRejectRepayment() { assertCompletedCaseEvent(NOTIFY_CLAIMANT_FOR_RESPONDENT1_REJECT_REPAYMENT, NOTIFY_CLAIMANT_FOR_RESPONDENT1_REJECT_REPAYMENT_ACTIVITY_ID); } @@ -434,7 +462,11 @@ private void updateClaimState() { assertCompletedCaseEvent(UPDATE_CLAIMANT_INTENTION_CLAIM_STATE_EVENT, UPDATE_CLAIMANT_INTENTION_CLAIM_STATE_EVENT_ID); } - private void assertCompletedCaseEvent(String eventName, String activityId) { + private void createDefendantDashboardNotification() { + assertCompletedCaseEvent(CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID); + } + + private void assertCompletedCaseEvent(String eventName, String activityId) { ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( notificationTask, @@ -481,6 +513,14 @@ private void notifyRPACaseHandledOffline() { assertCompletedCaseEvent(NOTIFY_RPA_ON_CASE_HANDED_OFFLINE, NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID); } + private void generateClaimantDashboardNotificationForCCJClaimantResponse() { + assertCompletedCaseEvent("CREATE_CLAIMANT_CCJ_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE", "GenerateClaimantCCJDashboardNotificationClaimantResponse"); + } + + private void generateDefendantDashboardNotificationForCCJClaimantResponse() { + assertCompletedCaseEvent("CREATE_DEFENDANT_CCJ_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE", "GenerateDefendantCCJDashboardNotificationForClaimantResponse"); + } + private void proceedCaseOffline() { assertCompletedCaseEvent(PROCEED_OFFLINE_EVENT, PROCEED_OFFLINE_EVENT_ACTIVITY_ID); } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseSpecTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseSpecTest.java index 9533c50ee..c99e90bb4 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseSpecTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/ClaimantResponseSpecTest.java @@ -37,6 +37,8 @@ class ClaimantResponseSpecTest extends BpmnBaseTest { "NOTIFY_LIP_DEFENDANT_PART_ADMIT_CLAIM_SETTLED"; private static final String NOTIFY_LIP_DEFENDANT_PART_ADMIT_CLAIM_SETTLED_ACTIVITY_ID = "ClaimantAgreedSettledPartAdmitNotifyLip"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID = "GenerateDashboardNotificationRespondent1"; public ClaimantResponseSpecTest() { super("claimant_response_spec.bpmn", "CLAIMANT_RESPONSE_PROCESS_ID_SPEC"); @@ -53,6 +55,7 @@ void shouldSuccessfullyCompleteClaimantResponseWithQD_WhenApplicantConfirmsToPro VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.FULL_ADMIT_AGREE_REPAYMENT"); + variables.putValue("flowFlags", Map.of(DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -92,6 +95,7 @@ void shouldSuccessfullyCompleteClaimantResponseWithQD_WhenApplicantConfirmsToPro NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID, variables ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -111,6 +115,7 @@ void shouldSuccessfullyCompleteWhenPayImmediately() { VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.FULL_ADMIT_PAY_IMMEDIATELY"); + variables.putValue("flowFlags", Map.of(DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -141,6 +146,7 @@ void shouldSuccessfullyCompleteWhenPayImmediately() { NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID, variables ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -160,6 +166,7 @@ void shouldSuccessfullyCompleteClaimantResponseWithQD_WhenApplicantRejectToProce VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.FULL_ADMIT_REJECT_REPAYMENT"); + variables.putValue("flowFlags", Map.of(DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -196,6 +203,7 @@ void shouldSuccessfullyCompleteClaimantResponseWithQD_WhenApplicantRejectToProce NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID, variables ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -218,7 +226,8 @@ void shouldSuccessfullyCompleteClaimantResponseAndProcessGenAppLocationWithDQ_Wh variables.put(FLOW_FLAGS, Map.of( AGREED_TO_MEDIATION, false, GENERAL_APPLICATION_ENABLED, true, - "SDO_ENABLED", true + "SDO_ENABLED", true, + DASHBOARD_SERVICE_ENABLED, true )); //complete the start business process @@ -288,6 +297,7 @@ void shouldSuccessfullyCompleteClaimantResponseAndProcessGenAppLocationWithDQ_Wh NOTIFY_RPA_ON_CONTINUOUS_FEED_ACTIVITY_ID, variables ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -308,7 +318,8 @@ void shouldSuccessfullyCompleteClaimantResponseToLip_WhenApplicantConfirmsNotToP VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.FULL_DEFENCE_NOT_PROCEED"); variables.put(FLOW_FLAGS, Map.of( - UNREPRESENTED_DEFENDANT_ONE, true + UNREPRESENTED_DEFENDANT_ONE, true, + DASHBOARD_SERVICE_ENABLED, true )); //complete the start business process @@ -339,6 +350,7 @@ void shouldSuccessfullyCompleteClaimantResponseToLip_WhenApplicantConfirmsNotToP NOTIFY_LIP_RESP_FOR_CLAIMANT_CONFIRMS_NOT_TO_PROCEED, NOTIFY_LIP_RESP_FOR_CLAIMANT_CONFIRMS_NOT_TO_PROCEED_ACTIVITY_ID ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -357,7 +369,9 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenInMediation() { VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.IN_MEDIATION"); variables.put("flowFlags", Map.of( - ONE_RESPONDENT_REPRESENTATIVE, true)); + ONE_RESPONDENT_REPRESENTATIVE, true, + DASHBOARD_SERVICE_ENABLED, true)); + ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); assertCompleteExternalTask( startBusiness, @@ -400,7 +414,7 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenInMediation() { NOTIFY_RPA_ON_CONTINUOUS_FEED_ACTIVITY_ID, variables ); - + createDefendantDashboardNotification(); ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -418,7 +432,9 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenInMediation1v2DifferentSol() variables.putValue("flowState", "MAIN.IN_MEDIATION"); variables.put("flowFlags", Map.of( ONE_RESPONDENT_REPRESENTATIVE, false, - TWO_RESPONDENT_REPRESENTATIVES, true)); + TWO_RESPONDENT_REPRESENTATIVES, true, + DASHBOARD_SERVICE_ENABLED, true)); + ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); assertCompleteExternalTask( startBusiness, @@ -470,6 +486,8 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenInMediation1v2DifferentSol() variables ); + createDefendantDashboardNotification(); + ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -487,6 +505,7 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenApplicantToSettle() { VariableMap variables = Variables.createVariables(); variables.putValue("flowState", "MAIN.PART_ADMIT_AGREE_SETTLE"); + variables.putValue("flowFlags", Map.of(DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -506,6 +525,7 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenApplicantToSettle() { NOTIFY_LIP_DEFENDANT_PART_ADMIT_CLAIM_SETTLED, NOTIFY_LIP_DEFENDANT_PART_ADMIT_CLAIM_SETTLED_ACTIVITY_ID ); + createDefendantDashboardNotification(); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); @@ -513,4 +533,14 @@ void shouldSuccessfullyCompleteClaimantResponse_WhenApplicantToSettle() { assertNoExternalTasksLeft(); } + + private void createDefendantDashboardNotification() { + ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + notificationTask, + PROCESS_CASE_EVENT, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID + ); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimLipTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimLipTest.java index 5c4fa5944..39daa4a52 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimLipTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimLipTest.java @@ -21,6 +21,10 @@ public class CreateClaimLipTest extends BpmnBaseTest { private static final String CREATE_SERVICE_REQUEST_CUI_ACTIVITY_ID = "CreateServiceRequestCUI"; private static final String GENERATE_PDF_FORM_EVENT = "GENERATE_DRAFT_FORM"; private static final String GENERATE_PDF_FORM_ACTIVITY_ID = "GenerateDraftForm"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CUI_EVENT = "GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CLAIMANT1"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CUI_ACTIVITY_ID = "GenerateDashboardNotificationClaimFeeRequired"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1 = "GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1_ACTIVITY_ID = "GenerateDashboardNotificationClaimIssueHwfClaimant1"; //Notify applicant 1 claim submitted private static final String NOTIFY_APPLICANT1_CLAIM_SUBMITTED_EVENT = "NOTIFY_APPLICANT1_CLAIM_SUBMITTED"; @@ -41,6 +45,7 @@ void shouldSuccessfullyCreateLipClaim() { notifyApplicant1ClaimSubmitted(variables); generateDraftForm(variables); createServiceRequestCui(variables); + generateDashboardNotificationClaimFeeRequired(variables); completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -54,6 +59,7 @@ void shouldPauseServiceRequestApiCall_WhenHwFApplied() { completeClaimIssue(variables); notifyApplicant1ClaimSubmitted(variables); generateDraftForm(variables); + generateDashboardNotificationHwfRequested(variables); completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -104,4 +110,26 @@ private void generateDraftForm(final VariableMap variables) { variables ); } + + private void generateDashboardNotificationClaimFeeRequired(final VariableMap variables) { + ExternalTask assignTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + assignTask, + PROCESS_CASE_EVENT, + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CUI_EVENT, + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_FEE_REQUIRED_CUI_ACTIVITY_ID, + variables + ); + } + + private void generateDashboardNotificationHwfRequested(final VariableMap variables) { + ExternalTask assignTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + assignTask, + PROCESS_CASE_EVENT, + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1, + GENERATE_DASHBOARD_NOTIFICATION_CLAIM_ISSUE_HWF_CLAIMANT1_ACTIVITY_ID, + variables + ); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimSpecAfterPaymentTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimSpecAfterPaymentTest.java index 83d4a8a1e..af4af892b 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimSpecAfterPaymentTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/CreateClaimSpecAfterPaymentTest.java @@ -77,6 +77,8 @@ public class CreateClaimSpecAfterPaymentTest extends BpmnBaseTest { public static final String SET_LIP_RESPONDENT_RESPONSE_DEADLINE_EVENT = "SET_LIP_RESPONDENT_RESPONSE_DEADLINE"; private static final String SET_LIP_RESPONDENT_RESPONSE_DEADLINE_ACTIVITY_ID = "SetRespondent1Deadline"; private static final String NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_NO_ACTIVITY_ID = "Activity_0ooszcc"; + private static final String CREATE_ISSUE_CLAIM_DASHBOARD_NOTIFICATIONS_FOR_CLAIMANT1_ACTIVITY_ID = "CreateIssueClaimDashboardNotificationsForApplicant1"; + private static final String CREATE_ISSUE_CLAIM_DASHBOARD_NOTIFICATIONS_FOR_CLAIMANT1_EVENT = "CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_APPLICANT1"; private static final String GENERATE_LIP_CLAIMANT_CLAIM_FORM_SPEC_EVENT = "GENERATE_LIP_CLAIMANT_CLAIM_FORM_SPEC"; private static final String GENERATE_LIP_CLAIMANT_CLAIM_FORM_SPEC_ACTIVITY_ID = "GenerateLipClaimantClaimFormForSpec"; private static final String GENERATE_LIP_DEFENDANT_CLAIM_FORM_SPEC_EVENT = "GENERATE_LIP_DEFENDANT_CLAIM_FORM_SPEC"; @@ -88,6 +90,11 @@ public class CreateClaimSpecAfterPaymentTest extends BpmnBaseTest { private static final String NOTIFY_LIP_CLAIMANT_CLAIM_SUBMISSION_ACTIVITY_ID = "NotifyLipClaimantClaimSubmission"; + private static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_EVENT + = "CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT1"; + private static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_ACTIVITY_ID + = "CreateIssueClaimDashboardNotificationsForDefendant1"; + public CreateClaimSpecAfterPaymentTest() { super("create_claim_spec_after_payment.bpmn", "CREATE_CLAIM_PROCESS_ID_SPEC_AFTER_PAYMENT"); } @@ -116,7 +123,8 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimRemainOnlineForUnrepresented VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( - "PIP_ENABLED", true)); + "PIP_ENABLED", true, + "DASHBOARD_SERVICE_ENABLED", true)); startBusinessProcess(variables); @@ -137,13 +145,13 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimRemainOnlineForUnrepresented variables ); - //complete the notification - ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + // complete the defendant dashboard notification + ExternalTask dashboardNotificationRespondentTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( - notificationTask, - PROCESS_CASE_EVENT, - NOTIFY_APPLICANT_SOLICITOR1_ONLINE_ISSUE_EVENT, - NOTIFY_APPLICANT_SOLICITOR1_ONLINE_UNREPRESENTED_ACTIVITY_ID + dashboardNotificationRespondentTask, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_ACTIVITY_ID ); //complete the respondent notification @@ -155,6 +163,15 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimRemainOnlineForUnrepresented NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_ACTIVITY_ID ); + //complete the notification + ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + notificationTask, + PROCESS_CASE_EVENT, + NOTIFY_APPLICANT_SOLICITOR1_ONLINE_ISSUE_EVENT, + NOTIFY_APPLICANT_SOLICITOR1_ONLINE_UNREPRESENTED_ACTIVITY_ID + ); + //complete the Robotics notification ExternalTask forRobotics = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( @@ -379,7 +396,8 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimIssued_UnregisteredDefendant LIP_CASE, true, GENERAL_APPLICATION_ENABLED, true, UNREPRESENTED_DEFENDANT_ONE, true, - PIP_ENABLED, true + PIP_ENABLED, true, + DASHBOARD_SERVICE_ENABLED, true )); //complete the start business process @@ -422,6 +440,24 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimIssued_UnregisteredDefendant variables ); + // complete the defendant dashboard notification + ExternalTask dashboardNotificationRespondentTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationRespondentTask, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_RESPONDENT_ACTIVITY_ID + ); + + //complete the respondent notification + ExternalTask notificationRespondentTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + notificationRespondentTask, + PROCESS_CASE_EVENT, + NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_EVENT, + NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_ACTIVITY_ID + ); + //complete the applicant notification ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( @@ -431,13 +467,13 @@ void shouldSuccessfullyCompleteCreateClaim_whenClaimIssued_UnregisteredDefendant NOTIFY_APPLICANT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_ACTIVITY_ID ); - //complete the respondent notification - ExternalTask notificationRespondentTask = assertNextExternalTask(PROCESS_CASE_EVENT); + //complete the claimant dashboard notification + ExternalTask claimantDashboardNotificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( - notificationRespondentTask, - PROCESS_CASE_EVENT, - NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_EVENT, - NOTIFY_RESPONDENT1_FOR_CLAIM_CONTINUING_ONLINE_SPEC_NO_ACTIVITY_ID + claimantDashboardNotificationTask, + PROCESS_CASE_EVENT, + CREATE_ISSUE_CLAIM_DASHBOARD_NOTIFICATIONS_FOR_CLAIMANT1_EVENT, + CREATE_ISSUE_CLAIM_DASHBOARD_NOTIFICATIONS_FOR_CLAIMANT1_ACTIVITY_ID ); //end business process diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseCuiTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseCuiTest.java index 16f4cd845..5d2d6b35f 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseCuiTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseCuiTest.java @@ -24,6 +24,11 @@ public class DefendantResponseCuiTest extends BpmnBaseTest { = "NOTIFY_LIP_DEFENDANT_RESPONSE_SUBMISSION"; private static final String GENERATE_RESPONSE_DQ_LIP_SEALED_PDF = "GENERATE_RESPONSE_DQ_LIP_SEALED"; private static final String GENERATE_LIP_RESPONSE_PDF = "GENERATE_RESPONSE_CUI_SEALED"; + private static final String GENERATE_CLAIMANT_DASHBOARD + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE"; + + private static final String GENERATE_DEFENDANT_DASHBOARD + = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE"; //ACTIVITY IDs private static final String NOTIFY_RESPONDENT_SOLICITOR_1_CONTACT_CHANGE_ACTIVITY_ID @@ -34,6 +39,10 @@ public class DefendantResponseCuiTest extends BpmnBaseTest { = "DefendantLipResponseNotifyDefendant"; private static final String GENERATE_LIP_DQ_PDF_ACTIVITY = "GenerateSealedLipDQPdf"; private static final String GENERATE_LIP_RESPONSE_PDF_ACTIVITY = "GenerateSealedLipResponsePdf"; + private static final String GENERATE_CLAIMANT_DASHBOARD_ACTIVITY + = "GenerateClaimantDashboardNotificationDefendantResponse"; + private static final String GENERATE_DEFENDANT_DASHBOARD_ACTIVITY + = "GenerateDefendantDashboardNotificationDefendantResponse"; public DefendantResponseCuiTest() { super( @@ -54,13 +63,16 @@ void shouldCompleteTheProcessWithNotificationsAndPdfGeneration_whenNotBilingualA VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( "CONTACT_DETAILS_CHANGE", true, - "RESPONDENT_RESPONSE_LANGUAGE_IS_BILINGUAL", false)); + "RESPONDENT_RESPONSE_LANGUAGE_IS_BILINGUAL", false, + "DASHBOARD_SERVICE_ENABLED", true)); assertBusinessProcessHasStarted(variables); verifyApplicantNotificationOfAddressChangeCompleted(); verifyDefendantLipNotificationOfResponseSubmissionCompleted(); verifyApplicantNotificationOfResponseSubmissionCompleted(); + verifyGenerateDashboardNotificationClaimant(); + verifyGenerateDashboardNotificationDefendant(); verifySealedDQGenerationCompleted(); verifySealedResponseGenerationCompleted(); @@ -79,11 +91,14 @@ void shouldSkipNotifyApplicantSolicitor_whenNoContactDetailsChange() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( - "CONTACT_DETAILS_CHANGE", false)); + "CONTACT_DETAILS_CHANGE", false, + "DASHBOARD_SERVICE_ENABLED", true)); assertBusinessProcessHasStarted(variables); verifyDefendantLipNotificationOfResponseSubmissionCompleted(); verifyApplicantNotificationOfResponseSubmissionCompleted(); + verifyGenerateDashboardNotificationClaimant(); + verifyGenerateDashboardNotificationDefendant(); verifySealedDQGenerationCompleted(); verifySealedResponseGenerationCompleted(); @@ -169,6 +184,20 @@ private void assertBusinessProcessHasStarted(VariableMap variables) { ); } + private void verifyGenerateDashboardNotificationClaimant() { + verifyTaskIsComplete( + GENERATE_CLAIMANT_DASHBOARD, + GENERATE_CLAIMANT_DASHBOARD_ACTIVITY + ); + } + + private void verifyGenerateDashboardNotificationDefendant() { + verifyTaskIsComplete( + GENERATE_DEFENDANT_DASHBOARD, + GENERATE_DEFENDANT_DASHBOARD_ACTIVITY + ); + } + private void endBusinessProcess() { ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckSchedulerTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckSchedulerTest.java new file mode 100644 index 000000000..9c9f4f853 --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckSchedulerTest.java @@ -0,0 +1,64 @@ +package uk.gov.hmcts.reform.civil.bpmn; + +import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.externaltask.LockedExternalTask; +import org.camunda.bpm.engine.impl.calendar.CronExpression; +import org.camunda.bpm.engine.management.JobDefinition; +import org.junit.jupiter.api.Test; + +import java.text.ParseException; +import java.time.LocalDateTime; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.assertj.core.api.Assertions.assertThat; + +class DefendantResponseDeadlineCheckSchedulerTest extends BpmnBaseTest { + + public static final String TOPIC_NAME = "DEFENDANT_RESPONSE_DEADLINE_CHECK"; + + public DefendantResponseDeadlineCheckSchedulerTest() { + super("defendant_response_deadline_check_scheduler.bpmn", "DEFENDANT_RESPONSE_DEADLINE_CHECK_SCHEDULER"); + } + + @Test + void schedulerShouldRaiseResponseDeadlineExceededExternalTask_whenStarted() throws ParseException { + //assert process has started + assertFalse(processInstance.isEnded()); + + //assert topic names + assertThat(getTopics()).containsOnly(TOPIC_NAME); + + //get jobs + List jobDefinitions = getJobs(); + + //assert that job is as expected + assertThat(jobDefinitions).hasSize(1); + assertThat(jobDefinitions.get(0).getJobType()).isEqualTo("timer-start-event"); + + String cronString = "0 1 16 * * ?"; + assertThat(jobDefinitions.get(0).getJobConfiguration()).isEqualTo("CYCLE: " + cronString); + assertCronTriggerFiresAtExpectedTime( + new CronExpression(cronString), + LocalDateTime.of(2024, 11, 30, 0, 0, 0), + LocalDateTime.of(2024, 11, 30, 16, 1, 0) + ); + + //get external tasks + List externalTasks = getExternalTasks(); + assertThat(externalTasks).hasSize(1); + + //fetch and complete task + List lockedExternalTasks = fetchAndLockTask(TOPIC_NAME); + + assertThat(lockedExternalTasks).hasSize(1); + completeTask(lockedExternalTasks.get(0).getId()); + + //assert no external tasks left + List externalTasksAfter = getExternalTasks(); + assertThat(externalTasksAfter).isEmpty(); + + //assert process is still active - timer event, so always running + assertFalse(processInstance.isEnded()); + } +} diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckTest.java new file mode 100644 index 000000000..5da08eada --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantResponseDeadlineCheckTest.java @@ -0,0 +1,78 @@ +package uk.gov.hmcts.reform.civil.bpmn; + +import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.variable.VariableMap; +import org.camunda.bpm.engine.variable.Variables; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertFalse; + +class DefendantResponseDeadlineCheckTest extends BpmnBaseTest { + + public static final String MESSAGE_NAME = "DEFENDANT_RESPONSE_DEADLINE_CHECK"; + public static final String PROCESS_ID = "DEFENDANT_RESPONSE_DEADLINE_CHECK"; + + public DefendantResponseDeadlineCheckTest() { + super("defendant_response_deadline_check.bpmn", "DEFENDANT_RESPONSE_DEADLINE_CHECK"); + } + + @Test + void shouldSuccessfullyCompleteTrialReadyMultiparty() { + + //assert process has started + assertFalse(processInstance.isEnded()); + + //assert message start event + assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); + + VariableMap variables = Variables.createVariables(); + + //complete the start business process + ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); + assertCompleteExternalTask( + startBusiness, + START_BUSINESS_TOPIC, + START_BUSINESS_EVENT, + START_BUSINESS_ACTIVITY, + variables + ); + + //complete the notification for claimant 1 + ExternalTask respondentNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(respondentNotification, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE_DEADLINE_CLAIMANT", + "GenerateClaimantDashboardNotificationDefendantResponseDeadlineCheck" + ); + + //complete the notification for defendant 1 + ExternalTask defendantNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(defendantNotification, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_RESPONSE_DEADLINE_DEFENDANT", + "GenerateDefendantDashboardNotificationRespondentResponseDeadlineCheck" + ); + + //end business process + ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); + completeBusinessProcess(endBusinessProcess); + + assertNoExternalTasksLeft(); + } + + @Test + void shouldAbort_whenStartBusinessProcessThrowsAnError() { + //assert process has started + assertFalse(processInstance.isEnded()); + + //assert message start event + assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); + + //fail the start business process + ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); + assertFailExternalTask(startBusiness, START_BUSINESS_TOPIC, START_BUSINESS_EVENT, START_BUSINESS_ACTIVITY); + + assertNoExternalTasksLeft(); + } +} diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantSignSettlementAgreementTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantSignSettlementAgreementTest.java index 05da8fb0e..17a7330ab 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantSignSettlementAgreementTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/DefendantSignSettlementAgreementTest.java @@ -14,6 +14,10 @@ class DefendantSignSettlementAgreementTest extends BpmnBaseTest { "NOTIFY_LIP_APPLICANT_FOR_SIGN_SETTLEMENT_AGREEMENT"; private static final String NOTIFY_LIP_RESPONDENT_FOR_SIGN_SETTLEMENT_AGREEMENT = "NOTIFY_LIP_RESPONDENT_FOR_SIGN_SETTLEMENT_AGREEMENT"; + private static final String DASHBOARD_NOTIFICATION_FOR_SIGN_SETTLEMENT_AGREEMENT_EVENT_ID = + "CREATE_DASHBOARD_NOTIFICATION_FOR_SETTLEMENT_DEFENDANT_RESPONSE"; + private static final String DASHBOARD_NOTIFICATION_FOR_SIGN_SETTLEMENT_AGREEMENT_ACTIVITY_ID = + "GenerateDashboardNotificationSignSettlementAgreement"; private static final String NOTIFY_LIP_APPLICANT_FOR_SIGN_SETTLEMENT_AGREEMENT_ID = "NotifyApplicantForSignSettlementAgreement"; private static final String NOTIFY_LIP_RESPONDENT_FOR_SIGN_SETTLEMENT_AGREEMENT_ID = @@ -36,6 +40,7 @@ void shouldSuccessfullyProcessDefendantSignAgreement() { notifyApplicantSignSettlementAgreement(); notifyRespondentSignSettlementAgreement(); generateSettlementAgreementDoc(); + generateDashboardNotificationSignSettlementAgreement(); endBusinessProcess(); assertNoExternalTasksLeft(); } @@ -65,6 +70,16 @@ private void notifyRespondentSignSettlementAgreement() { ); } + private void generateDashboardNotificationSignSettlementAgreement() { + ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + notificationTask, + PROCESS_CASE_EVENT, + DASHBOARD_NOTIFICATION_FOR_SIGN_SETTLEMENT_AGREEMENT_EVENT_ID, + DASHBOARD_NOTIFICATION_FOR_SIGN_SETTLEMENT_AGREEMENT_ACTIVITY_ID + ); + } + private void generateSettlementAgreementDoc() { ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/FullAdmitPayImmediatelyNoPaymentSchedulerTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/FullAdmitPayImmediatelyNoPaymentSchedulerTest.java new file mode 100644 index 000000000..290e0b6a4 --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/FullAdmitPayImmediatelyNoPaymentSchedulerTest.java @@ -0,0 +1,62 @@ +package uk.gov.hmcts.reform.civil.bpmn; + +import java.text.ParseException; +import java.time.LocalDateTime; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.externaltask.LockedExternalTask; +import org.camunda.bpm.engine.impl.calendar.CronExpression; +import org.camunda.bpm.engine.management.JobDefinition; +import static org.junit.jupiter.api.Assertions.assertFalse; +import org.junit.jupiter.api.Test; + +class FullAdmitPayImmediatelyNoPaymentSchedulerTest extends BpmnBaseTest { + + public static final String TOPIC_NAME = "FULL_ADMIT_PAY_IMMEDIATELY_NO_PAYMENT_CHECK"; + + public FullAdmitPayImmediatelyNoPaymentSchedulerTest() { + super("full_admit_pay_immediately_no_payment_scheduler.bpmn", "FULL_ADMIT_PAY_IMMEDIATELY_NO_PAYMENT_SCHEDULER"); + } + + @Test + void schedulerShouldRaiseFullAdmitPayImmediatelyNoPaymentCheckExternalTask_whenStarted() throws ParseException { + //assert process has started + assertFalse(processInstance.isEnded()); + + //assert topic names + assertThat(getTopics()).containsOnly(TOPIC_NAME); + + //get jobs + List jobDefinitions = getJobs(); + + //assert that job is as expected + assertThat(jobDefinitions).hasSize(1); + assertThat(jobDefinitions.get(0).getJobType()).isEqualTo("timer-start-event"); + + String cronString = "0 0 0 * * ?"; + assertThat(jobDefinitions.get(0).getJobConfiguration()).isEqualTo("CYCLE: " + cronString); + assertCronTriggerFiresAtExpectedTime( + new CronExpression(cronString), + LocalDateTime.of(2024, 11, 30, 0, 0, 0), + LocalDateTime.of(2024, 12, 1, 0, 0, 0) + ); + + //get external tasks + List externalTasks = getExternalTasks(); + assertThat(externalTasks).hasSize(1); + + //fetch and complete task + List lockedExternalTasks = fetchAndLockTask(TOPIC_NAME); + + assertThat(lockedExternalTasks).hasSize(1); + completeTask(lockedExternalTasks.get(0).getId()); + + //assert no external tasks left + List externalTasksAfter = getExternalTasks(); + assertThat(externalTasksAfter).isEmpty(); + + //assert process is still active - timer event so always running + assertFalse(processInstance.isEnded()); + } +} diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentApplicantTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentApplicantTest.java index ad6a1bb85..eafd656e0 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentApplicantTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentApplicantTest.java @@ -1,8 +1,12 @@ package uk.gov.hmcts.reform.civil.bpmn; import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.variable.VariableMap; +import org.camunda.bpm.engine.variable.Variables; import org.junit.jupiter.api.Test; +import java.util.Map; + import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -15,6 +19,12 @@ class GenerateTrialReadyDocumentApplicantTest extends BpmnBaseTest { public static final String GENERATE_TRIAL_READY_FORM_APPLICANT = "GENERATE_TRIAL_READY_FORM_APPLICANT"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT + = "CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT"; + + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT_ACTIVITY_ID + = "GenerateDefendantDashboardNotificationTrialArrangementsNotifyParty"; + //ACTIVITY IDs public static final String GENERATE_TRIAL_READY_FORM_APPLICANT_ACTIVITY_ID = "GenerateTrialReadyFormApplicant"; @@ -31,10 +41,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing() { //assert message start event assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); + VariableMap variables = Variables.createVariables(); + variables.putValue("flowFlags", Map.of("DASHBOARD_SERVICE_ENABLED", true)); + //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); assertCompleteExternalTask(startBusiness, START_BUSINESS_TOPIC, - START_BUSINESS_EVENT, START_BUSINESS_ACTIVITY); + START_BUSINESS_EVENT, START_BUSINESS_ACTIVITY, variables); ExternalTask notificationTask; @@ -45,6 +58,12 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing() { GENERATE_TRIAL_READY_FORM_APPLICANT_ACTIVITY_ID ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_DEFENDANT_ACTIVITY_ID + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentRespondent1Test.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentRespondent1Test.java index 5dd08345c..a9e3e7dda 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentRespondent1Test.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/GenerateTrialReadyDocumentRespondent1Test.java @@ -1,8 +1,12 @@ package uk.gov.hmcts.reform.civil.bpmn; import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.variable.VariableMap; +import org.camunda.bpm.engine.variable.Variables; import org.junit.jupiter.api.Test; +import java.util.Map; + import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -15,10 +19,16 @@ class GenerateTrialReadyDocumentRespondent1Test extends BpmnBaseTest { public static final String GENERATE_TRIAL_READY_FORM_RESPONDENT1 = "GENERATE_TRIAL_READY_FORM_RESPONDENT1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT + = "CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT"; + //ACTIVITY IDs public static final String GENERATE_TRIAL_READY_FORM_RESPONDENT1_ACTIVITY_ID = "GenerateTrialReadyFormRespondent1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT_ACTIVITY_ID + = "GenerateClaimantDashboardNotificationTrialArrangementsNotifyParty"; + public GenerateTrialReadyDocumentRespondent1Test() { super("generate_trial_ready_document_respondent1.bpmn", PROCESS_ID); } @@ -31,10 +41,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing() { //assert message start event assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); + VariableMap variables = Variables.createVariables(); + variables.putValue("flowFlags", Map.of("DASHBOARD_SERVICE_ENABLED", true)); + //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); assertCompleteExternalTask(startBusiness, START_BUSINESS_TOPIC, - START_BUSINESS_EVENT, START_BUSINESS_ACTIVITY); + START_BUSINESS_EVENT, START_BUSINESS_ACTIVITY, variables); ExternalTask notificationTask; @@ -45,6 +58,12 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyDefendantsHearing() { GENERATE_TRIAL_READY_FORM_RESPONDENT1_ACTIVITY_ID ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT_ACTIVITY_ID + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingFeeUnpaidTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingFeeUnpaidTest.java index c1ef26b3b..70327ba43 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingFeeUnpaidTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingFeeUnpaidTest.java @@ -35,7 +35,8 @@ void shouldSuccessfullyCompleteHearingFeeUnpaidMultiparty(boolean twoRepresentat variables.put("flowFlags", Map.of( ONE_RESPONDENT_REPRESENTATIVE, !twoRepresentatives, TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, - UNREPRESENTED_DEFENDANT_ONE, false)); + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -73,6 +74,22 @@ void shouldSuccessfullyCompleteHearingFeeUnpaidMultiparty(boolean twoRepresentat "HearingFeeUnpaidNotifyApplicantSolicitor1" ); + //complete the notification to applicant + ExternalTask defendantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(defendantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_DEFENDANT1", + "CreateHearingFeeUnpaidDashboardNotificationsForDefendant1" + ); + + //complete the notification to applicant + ExternalTask applicantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(applicantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_CLAIMANT1", + "CreateHearingFeeUnpaidDashboardNotificationsForClaimant1" + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -91,7 +108,8 @@ void shouldSuccessfullyCompleteHearingFeeUnpaidOnePartyLip() { VariableMap variables = Variables.createVariables(); variables.put("flowFlags", Map.of( - UNREPRESENTED_DEFENDANT_ONE, true)); + UNREPRESENTED_DEFENDANT_ONE, true, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -119,6 +137,22 @@ void shouldSuccessfullyCompleteHearingFeeUnpaidOnePartyLip() { "HearingFeeUnpaidNotifyApplicantSolicitor1" ); + //complete the notification to applicant + ExternalTask defendantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(defendantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_DEFENDANT1", + "CreateHearingFeeUnpaidDashboardNotificationsForDefendant1" + ); + + //complete the notification to applicant + ExternalTask applicantDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(applicantDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_HEARING_FEE_UNPAID_FOR_CLAIMANT1", + "CreateHearingFeeUnpaidDashboardNotificationsForClaimant1" + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingProcessTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingProcessTest.java index 5fcc4bf72..ce6448423 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingProcessTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/HearingProcessTest.java @@ -30,6 +30,10 @@ class HearingProcessTest extends BpmnBaseTest { = "SEND_HEARING_TO_LIP_DEFENDANT"; public static final String SEND_HEARING_TO_LIP_CLAIMANT = "SEND_HEARING_TO_LIP_CLAIMANT"; + public static final String CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT + = "CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT"; + public static final String CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT + = "CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT"; //ACTIVITY IDs private static final String NOTIFY_CLAIMANT_HEARING_ACTIVITY_ID @@ -47,6 +51,10 @@ class HearingProcessTest extends BpmnBaseTest { = "SendHearingToDefendantLIP"; private static final String SEND_HEARING_TO_LIP_CLAIMANT_ACTIVITY_ID = "SendHearingToClaimantLIP"; + private static final String CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID + = "GenerateDashboardNotificationHearingScheduledClaimant"; + private static final String CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID + = "GenerateDashboardNotificationHearingScheduledDefendant"; public HearingProcessTest() { super("hearing_process.bpmn", PROCESS_ID); @@ -96,6 +104,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyClaimantAndDefendantHearing_1 CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID, variables ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -154,6 +176,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyClaimantAndDefendantHearing_1 CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -217,6 +253,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyClaimantAndDefendantHearing_1 CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID, variables ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -281,6 +331,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyClaimantAndDefendantLipHearin CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -338,6 +402,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyClaimantAndDefendantLipHearin CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -395,6 +473,20 @@ void shouldSuccessfullyCompleteHearingFormAndNotifyDefendantLipHearing_1v1() { CREATE_SERVICE_REQUEST_API, CREATE_SERVICE_REQUEST_API_ACTIVITY_ID ); + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_CLAIMANT_ACTIVITY_ID, variables + ); + + //complete the dashboard notification process + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT, + CREATE_DASHBOARD_NOTIFICATION_HEARING_SCHEDULED_DEFENDANT_ACTIVITY_ID, variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/InformAgreedExtensionDateSpecTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/InformAgreedExtensionDateSpecTest.java index d27bb0292..6763df41f 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/InformAgreedExtensionDateSpecTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/InformAgreedExtensionDateSpecTest.java @@ -19,6 +19,10 @@ class InformAgreedExtensionDateSpecTest extends BpmnBaseTest { private static final String NOTIFY_RPA_ON_CONTINUOUS_FEED = "NOTIFY_RPA_ON_CONTINUOUS_FEED"; private static final String NOTIFY_RPA_ON_CONTINUOUS_FEED_ACTIVITY_ID = "NotifyRoboticsOnContinuousFeed"; + private static final String CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1 = "CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1"; + private static final String CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1_ACTIVITY_ID + = "GenerateDashboardNotificationMoreTimeRequestedForRespondent1"; + enum FlowState { PENDING_CLAIM_ISSUED; @@ -114,7 +118,8 @@ void shouldSuccessfullyCompleteNotifyClaimDeadline_whenCalled() { //assert message start event assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); VariableMap variables = Variables.createVariables(); - variables.putValue(FLOW_FLAGS, Map.of(UNREPRESENTED_DEFENDANT_ONE, true)); + variables.putValue(FLOW_FLAGS, Map.of(UNREPRESENTED_DEFENDANT_ONE, true, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -146,6 +151,24 @@ void shouldSuccessfullyCompleteNotifyClaimDeadline_whenCalled() { variables ); + ExternalTask dashboardNotificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationTask, + PROCESS_CASE_EVENT, + "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_DEFENDANT_RESPONSE_DATE", + "GenerateClaimantDashboardNotificationClaimantNewResponseDeadline", + variables + ); + + dashboardNotificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationTask, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1, + CREATE_DASHBOARD_NOTIFICATION_MORE_TIME_REQUEST_FOR_RESPONDENT1_ACTIVITY_ID, + variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationSuccessfulTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationSuccessfulTest.java index 6253fac16..60f756929 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationSuccessfulTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationSuccessfulTest.java @@ -40,7 +40,8 @@ void shouldSubmitSuccessfulMediationForLip() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( ONE_RESPONDENT_REPRESENTATIVE, false, - UNREPRESENTED_DEFENDANT_ONE, true + UNREPRESENTED_DEFENDANT_ONE, true, + DASHBOARD_SERVICE_ENABLED, true )); startBusinessProcess(variables); @@ -52,6 +53,15 @@ void shouldSubmitSuccessfulMediationForLip() { variables ); + //dashboardNotification applicant + ExternalTask dashboardApplicant = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardApplicant, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_APPLICANT", + "GenerateDashboardNotificationClaimantMediationSuccessful" + ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, @@ -60,6 +70,15 @@ void shouldSubmitSuccessfulMediationForLip() { variables ); + //dashboardNotification respondent + ExternalTask dashboardRespondent = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardRespondent, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_RESPONDENT", + "GenerateDashboardNotificationDefendantMediationSuccessful" + ); + completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -69,7 +88,8 @@ void shouldSubmitUnsuccessfulMediationFor1v1LR() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( ONE_RESPONDENT_REPRESENTATIVE, true, - UNREPRESENTED_DEFENDANT_ONE, false + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, true )); startBusinessProcess(variables); @@ -81,6 +101,15 @@ void shouldSubmitUnsuccessfulMediationFor1v1LR() { variables ); + //dashboardNotification applicant + ExternalTask dashboardApplicant = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardApplicant, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_APPLICANT", + "GenerateDashboardNotificationClaimantMediationSuccessful" + ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, @@ -89,6 +118,15 @@ void shouldSubmitUnsuccessfulMediationFor1v1LR() { variables ); + //dashboardNotification respondent + ExternalTask dashboardRespondent = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardRespondent, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_RESPONDENT", + "GenerateDashboardNotificationDefendantMediationSuccessful" + ); + completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -98,7 +136,8 @@ void shouldSubmitUnsuccessfulMediationFor1v2LR() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( TWO_RESPONDENT_REPRESENTATIVES, true, - UNREPRESENTED_DEFENDANT_ONE, false + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, true )); startBusinessProcess(variables); @@ -110,6 +149,15 @@ void shouldSubmitUnsuccessfulMediationFor1v2LR() { variables ); + //dashboardNotification applicant + ExternalTask dashboardApplicant = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardApplicant, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_APPLICANT", + "GenerateDashboardNotificationClaimantMediationSuccessful" + ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, @@ -126,6 +174,15 @@ void shouldSubmitUnsuccessfulMediationFor1v2LR() { variables ); + //dashboardNotification respondent + ExternalTask dashboardRespondent = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardRespondent, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_MEDIATION_SUCCESSFUL_FOR_RESPONDENT", + "GenerateDashboardNotificationDefendantMediationSuccessful" + ); + completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationUnsuccessfulTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationUnsuccessfulTest.java index 5190c9f07..0ccb25e15 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationUnsuccessfulTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/MediationUnsuccessfulTest.java @@ -15,6 +15,8 @@ public class MediationUnsuccessfulTest extends BpmnBaseTest { = "NOTIFY_MEDIATION_UNSUCCESSFUL_CLAIMANT_LR"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_LIP = "NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_LIP"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL + = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_1_LR = "NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_1_LR"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_2_LR @@ -24,10 +26,20 @@ public class MediationUnsuccessfulTest extends BpmnBaseTest { = "SendMediationUnsuccessfulClaimantLR"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_LIP_ACTIVITY_ID = "SendMediationUnsuccessfulDefendantLIP"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL_ACTIVITY_ID + = "GenerateDashboardNotificationDefendantMediationUnsuccessful"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_SOLICITOR_1_ACTIVITY_ID = "SendMediationUnsuccessfulDefendant1LR"; private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_SOLICITOR_2_ACTIVITY_ID = "SendMediationUnsuccessfulDefendant2LR"; + private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_CLAIMANT_LIP_ACTIVITY_ID + = "GenerateDashboardNotificationMediationUnsuccessfulRequestedForApplicant1"; + private static final String NOTIFY_MEDIATION_UNSUCCESSFUL_CLAIMANT_LIP + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL"; + private static final String CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL"; + private static final String CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL_ACTIVITY_ID + = "GenerateDashboardNotificationMediationUnsuccessfulRequestedForApplicant1"; public MediationUnsuccessfulTest() { super(FILE_NAME, PROCESS_ID); @@ -39,7 +51,8 @@ void shouldSubmitUnsuccessfulMediationForLip() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( ONE_RESPONDENT_REPRESENTATIVE, false, - UNREPRESENTED_DEFENDANT_ONE, true + UNREPRESENTED_DEFENDANT_ONE, true, + DASHBOARD_SERVICE_ENABLED, true )); startBusinessProcess(variables); @@ -58,6 +71,21 @@ void shouldSubmitUnsuccessfulMediationForLip() { NOTIFY_MEDIATION_UNSUCCESSFUL_DEFENDANT_LIP_ACTIVITY_ID, variables ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, + PROCESS_CASE_EVENT, + NOTIFY_MEDIATION_UNSUCCESSFUL_CLAIMANT_LIP, + NOTIFY_MEDIATION_UNSUCCESSFUL_CLAIMANT_LIP_ACTIVITY_ID, + variables + ); + + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, + PROCESS_CASE_EVENT, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_MEDIATION_UNSUCCESSFUL_ACTIVITY_ID, + variables + ); completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } @@ -68,7 +96,8 @@ void shouldSubmitUnsuccessfulMediationFor1v1LR() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( ONE_RESPONDENT_REPRESENTATIVE, true, - UNREPRESENTED_DEFENDANT_ONE, false + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, false )); startBusinessProcess(variables); @@ -97,7 +126,8 @@ void shouldSubmitUnsuccessfulMediationFor1v2LR() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( TWO_RESPONDENT_REPRESENTATIVES, true, - UNREPRESENTED_DEFENDANT_ONE, false + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, false )); startBusinessProcess(variables); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHWFTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHwFOutComeTest.java similarity index 71% rename from src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHWFTest.java rename to src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHwFOutComeTest.java index edb81f501..f2febc8f3 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHWFTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyClaimantHwFOutComeTest.java @@ -5,13 +5,13 @@ import org.camunda.bpm.engine.variable.Variables; import org.junit.jupiter.api.Test; -public class NotifyClaimantHWFTest extends BpmnBaseTest { +public class NotifyClaimantHwFOutComeTest extends BpmnBaseTest { private static final String FILE_NAME = "notify_claimant_hwf_outcome.bpmn"; private static final String MESSAGE_NAME = "NOTIFY_LIP_CLAIMANT_HWF_OUTCOME"; private static final String PROCESS_ID = "NOTIFY_LIP_CLAIMANT_HWF_OUTCOME"; - public NotifyClaimantHWFTest() { + public NotifyClaimantHwFOutComeTest() { super(FILE_NAME, PROCESS_ID); } @@ -28,6 +28,13 @@ void shouldNotifyClaimantWithHwfOutcome() { "NOTIFY_LIP_CLAIMANT_HWF_OUTCOME", "NotifyClaimantHwFOutcome" ); + ExternalTask claimant1HwfDashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + claimant1HwfDashboardNotification, + PROCESS_CASE_EVENT, + "CLAIMANT1_HWF_DASHBOARD_NOTIFICATION", + "Claimant1HwFDashboardNotification" + ); completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyTranslatedDocumentUploadedTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyTranslatedDocumentUploadedTest.java index 52f7f06ce..cd986958f 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyTranslatedDocumentUploadedTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/NotifyTranslatedDocumentUploadedTest.java @@ -5,6 +5,8 @@ import org.camunda.bpm.engine.variable.Variables; import org.junit.jupiter.api.Test; +import java.util.Map; + import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -26,6 +28,17 @@ public class NotifyTranslatedDocumentUploadedTest extends BpmnBaseTest { private static final String UPDATE_CLAIM_STATE_AFTER_TRANSLATED_DOCUMENT_UPLOADED = "UPDATE_CLAIM_STATE_AFTER_DOC_UPLOADED"; private static final String UPDATE_CLAIM_STATE_AFTER_TRANSLATED_DOCUMENT_UPLOADED_ID = "updateClaimStateAfterTranslateDocumentUploadedID"; + private static final String GENERATE_CLAIMANT_DASHBOARD + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE"; + + private static final String GENERATE_DEFENDANT_DASHBOARD + = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_DEFENDANT_RESPONSE"; + + private static final String GENERATE_CLAIMANT_DASHBOARD_ACTIVITY + = "GenerateClaimantDashboardNotificationDefendantResponse"; + private static final String GENERATE_DEFENDANT_DASHBOARD_ACTIVITY + = "GenerateDefendantDashboardNotificationDefendantResponse"; + public NotifyTranslatedDocumentUploadedTest() { super("upload_translated_document_notify.bpmn", PROCESS_ID); } @@ -35,6 +48,8 @@ void shouldNotifyTranslatedDocumentUploaded() { assertFalse(processInstance.isEnded()); assertThat(getProcessDefinitionByMessage(MESSAGE_NAME).getKey()).isEqualTo(PROCESS_ID); VariableMap variables = Variables.createVariables(); + variables.putValue("flowFlags", Map.of(DASHBOARD_SERVICE_ENABLED, true)); + startBusinessProcess(variables); ExternalTask notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); @@ -59,6 +74,20 @@ void shouldNotifyTranslatedDocumentUploaded() { UPDATE_CLAIM_STATE_AFTER_TRANSLATED_DOCUMENT_UPLOADED_ID, variables); + //complete the claimant dashboard generation + assertCompleteExternalTask(notificationTask, + PROCESS_CASE_EVENT, + GENERATE_CLAIMANT_DASHBOARD, + GENERATE_CLAIMANT_DASHBOARD_ACTIVITY + ); + + //complete the defendant dashboard generation + assertCompleteExternalTask(notificationTask, + PROCESS_CASE_EVENT, + GENERATE_DEFENDANT_DASHBOARD, + GENERATE_DEFENDANT_DASHBOARD_ACTIVITY + ); + completeBusinessProcess(assertNextExternalTask(END_BUSINESS_PROCESS)); } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/RequestJudgementByAdmissionTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/RequestJudgementByAdmissionTest.java index a1473b6d1..0d52db171 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/RequestJudgementByAdmissionTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/RequestJudgementByAdmissionTest.java @@ -41,6 +41,10 @@ public class RequestJudgementByAdmissionTest extends BpmnBaseTest { public static final String NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID = "NotifyRoboticsOnCaseHandedOffline"; public static final String GENERATE_DEFAULT_JUDGMENT_BY_ADMISSION_RESPONSE_DOC_ACTIVITY_ID = "GenerateJudgmentByAdmissonDoc"; + public static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1 = "CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1_ACTIVITY_ID = "GenerateDashboardNotificationClaimantIntentCCJRequestedForApplicant1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1 = "CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1_ACTIVITY_ID = "GenerateDashboardNotificationClaimantIntentCCJRequestedForRespondent1"; public RequestJudgementByAdmissionTest() { super("request_judgement_by_admission.bpmn", PROCESS_ID); @@ -54,7 +58,8 @@ void shouldSuccessfullyCompleteRequestJudgementByAdmission_withLr() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( - "LIP_CASE", false)); + "LIP_CASE", false, + "DASHBOARD_SERVICE_ENABLED", true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -90,6 +95,13 @@ void shouldSuccessfullyCompleteRequestJudgementByAdmission_withLr() { NOTIFY_RPA_ON_CASE_HANDED_OFFLINE, NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID ); + ExternalTask dashboardNotificationRespondent1 = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationRespondent1, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1_ACTIVITY_ID + ); ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -103,7 +115,8 @@ void shouldSuccessfullyCompleteRequestJudgementByAdmission_withLipClaimant() { VariableMap variables = Variables.createVariables(); variables.put(FLOW_FLAGS, Map.of( - "LIP_CASE", true)); + "LIP_CASE", true, + "DASHBOARD_SERVICE_ENABLED", true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -147,6 +160,14 @@ void shouldSuccessfullyCompleteRequestJudgementByAdmission_withLipClaimant() { GENERATE_DEFAULT_JUDGMENT_BY_ADMISSION_RESPONSE_DOC_ACTIVITY_ID ); + ExternalTask dashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotification, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_APPLICANT1_ACTIVITY_ID + ); + //complete the Robotics notification ExternalTask forRobotics = assertNextExternalTask(PROCESS_CASE_EVENT); assertCompleteExternalTask( @@ -155,6 +176,13 @@ void shouldSuccessfullyCompleteRequestJudgementByAdmission_withLipClaimant() { NOTIFY_RPA_ON_CASE_HANDED_OFFLINE, NOTIFY_RPA_ON_CASE_HANDED_OFFLINE_ACTIVITY_ID ); + ExternalTask dashboardNotificationRespondent1 = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + dashboardNotificationRespondent1, + PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1, + CREATE_DASHBOARD_NOTIFICATION_FOR_CCJ_REQUEST_FOR_RESPONDENT1_ACTIVITY_ID + ); ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/Respondent1TrialReadyNotifyOthersTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/Respondent1TrialReadyNotifyOthersTest.java index 284846146..be7a0a11f 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/Respondent1TrialReadyNotifyOthersTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/Respondent1TrialReadyNotifyOthersTest.java @@ -24,7 +24,8 @@ class Respondent1TrialReadyNotifyOthersTest extends BpmnBaseTest { = "NOTIFY_APPLICANT_SOLICITOR_FOR_OTHER_TRIAL_READY"; public static final String GENERATE_TRIAL_READY_FORM_RESPONDENT1 = "GENERATE_TRIAL_READY_FORM_RESPONDENT1"; - + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT + = "CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT"; //ACTIVITY IDs private static final String NOTIFY_RESPONDENT_SOLICITOR2_FOR_OTHER_TRIAL_READY_ACTIVITY_ID = "OtherTrialReadyNotifyRespondentSolicitor2"; @@ -32,6 +33,8 @@ class Respondent1TrialReadyNotifyOthersTest extends BpmnBaseTest { = "OtherTrialReadyNotifyApplicantSolicitor1"; public static final String GENERATE_TRIAL_READY_FORM_RESPONDENT1_ACTIVITY_ID = "GenerateTrialReadyFormRespondent1"; + public static final String CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT_ACTIVITY_ID + = "GenerateClaimantDashboardNotificationTrialArrangementsNotifyParty"; public Respondent1TrialReadyNotifyOthersTest() { super("respondent1_trial_ready_notify_others.bpmn", PROCESS_ID); @@ -50,7 +53,8 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyClaimantAndDefendantHearin variables.put("flowFlags", Map.of( ONE_RESPONDENT_REPRESENTATIVE, !twoRepresentatives, TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, - UNREPRESENTED_DEFENDANT_ONE, false)); + UNREPRESENTED_DEFENDANT_ONE, false, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -84,6 +88,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyClaimantAndDefendantHearin variables ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT_ACTIVITY_ID, + variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -104,7 +115,8 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyClaimantAndDefendantHearin variables.put("flowFlags", Map.of( TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, UNREPRESENTED_DEFENDANT_ONE, true, - UNREPRESENTED_DEFENDANT_TWO, twoRepresentatives)); + UNREPRESENTED_DEFENDANT_TWO, twoRepresentatives, + DASHBOARD_SERVICE_ENABLED, true)); //complete the start business process ExternalTask startBusiness = assertNextExternalTask(START_BUSINESS_TOPIC); @@ -138,6 +150,13 @@ void shouldSuccessfullyCompleteTrialReadyFormAndNotifyClaimantAndDefendantHearin variables ); + notificationTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTask, PROCESS_CASE_EVENT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT, + CREATE_DASHBOARD_NOTIFICATION_TRIAL_ARRANGEMENTS_NOTIFY_CLAIMANT_ACTIVITY_ID, + variables + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SettlementNoResponseFromDefendantSchedulerTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SettlementNoResponseFromDefendantSchedulerTest.java new file mode 100644 index 000000000..f57bf888b --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SettlementNoResponseFromDefendantSchedulerTest.java @@ -0,0 +1,62 @@ +package uk.gov.hmcts.reform.civil.bpmn; + +import java.text.ParseException; +import java.time.LocalDateTime; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.camunda.bpm.engine.externaltask.ExternalTask; +import org.camunda.bpm.engine.externaltask.LockedExternalTask; +import org.camunda.bpm.engine.impl.calendar.CronExpression; +import org.camunda.bpm.engine.management.JobDefinition; +import static org.junit.jupiter.api.Assertions.assertFalse; +import org.junit.jupiter.api.Test; + +class SettlementNoResponseFromDefendantSchedulerTest extends BpmnBaseTest { + + public static final String TOPIC_NAME = "SETTLEMENT_NO_RESPONSE_FROM_DEFENDANT_CHECK"; + + public SettlementNoResponseFromDefendantSchedulerTest() { + super("settlement_no_defendant_response_scheduler.bpmn", "SETTLEMENT_NO_RESPONSE_FROM_DEFENDANT_SCHEDULER"); + } + + @Test + void schedulerShouldRaiseSettlementNoResponseFromDefendantCheckExternalTask_whenStarted() throws ParseException { + //assert process has started + assertFalse(processInstance.isEnded()); + + //assert topic names + assertThat(getTopics()).containsOnly(TOPIC_NAME); + + //get jobs + List jobDefinitions = getJobs(); + + //assert that job is as expected + assertThat(jobDefinitions).hasSize(1); + assertThat(jobDefinitions.get(0).getJobType()).isEqualTo("timer-start-event"); + + String cronString = "0 0 1 * * ?"; + assertThat(jobDefinitions.get(0).getJobConfiguration()).isEqualTo("CYCLE: " + cronString); + assertCronTriggerFiresAtExpectedTime( + new CronExpression(cronString), + LocalDateTime.of(2024, 11, 30, 1, 0, 0), + LocalDateTime.of(2024, 12, 1, 1, 0, 0) + ); + + //get external tasks + List externalTasks = getExternalTasks(); + assertThat(externalTasks).hasSize(1); + + //fetch and complete task + List lockedExternalTasks = fetchAndLockTask(TOPIC_NAME); + + assertThat(lockedExternalTasks).hasSize(1); + completeTask(lockedExternalTasks.get(0).getId()); + + //assert no external tasks left + List externalTasksAfter = getExternalTasks(); + assertThat(externalTasksAfter).isEmpty(); + + //assert process is still active - timer event so always running + assertFalse(processInstance.isEnded()); + } +} diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/TrialReadyNotificationTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/TrialReadyNotificationTest.java index b8c7ed970..c0d49a464 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/TrialReadyNotificationTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/TrialReadyNotificationTest.java @@ -76,6 +76,20 @@ void shouldSuccessfullyCompleteTrialReadyMultiparty(boolean twoRepresentatives, "NOTIFY_APPLICANT_SOLICITOR1_FOR_TRIAL_READY", "TrialReadyNotifyApplicantSolicitor1" ); + //complete the dashboard notification for Respondent + ExternalTask respondentDashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(respondentDashboardNotification, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_CP_TRIAL_ARRANGEMENTS_DEFENDANT", + "GenerateDefendantDashboardNotificationTrialArrangements" + ); + //complete the dashboard notification for Applicant + ExternalTask applicantDashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(applicantDashboardNotification, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_CP_TRIAL_ARRANGEMENTS_CLAIMANT", + "GenerateClaimantDashboardNotificationTrialArrangements" + ); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimIssueDocumentTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimIssueDocumentTest.java index 51ea57510..a8146e4ba 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimIssueDocumentTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimIssueDocumentTest.java @@ -87,6 +87,13 @@ void shouldRunProcess() { UPDATE_CLAIM_STATE_AFTER_TRANSLATED_DOCUMENT_UPLOADED_ID ); + //complete the case state update + ExternalTask notificationTaskForDashboard = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTaskForDashboard, + PROCESS_CASE_EVENT, + "CREATE_DASHBOARD_NOTIFICATION_FOR_CLAIM_ISSUE_FOR_APPLICANT1", + "CreateIssueClaimDashboardNotificationsForApplicant1" + ); //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimantIntentionDocumentTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimantIntentionDocumentTest.java index eec046679..d3a4f391e 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimantIntentionDocumentTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/UploadTranslatedClaimantIntentionDocumentTest.java @@ -30,6 +30,12 @@ public class UploadTranslatedClaimantIntentionDocumentTest extends BpmnBaseTest = "NOTIFY_RPA_ON_CONTINUOUS_FEED"; private static final String NOTIFY_RPA_ON_CONTINUOUS_FEED_ACTIVITY_ID = "NotifyRoboticsOnContinuousFeed"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE = "CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE"; + private static final String CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID = "GenerateDashboardNotificationRespondent1"; + private static final String CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE + = "CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE"; + private static final String GENERATE_DASHBOARD_NOTIFICATION_ACTIVITY_ID + = "GenerateClaimantDashboardNotificationClaimantResponse"; public UploadTranslatedClaimantIntentionDocumentTest() { super("upload_translated_claimant_intention_document_notify.bpmn", "UPLOAD_TRANSLATED_DOCUMENT_CLAIMANT_INTENTION"); @@ -79,6 +85,23 @@ void shouldRunProcess() { UPDATE_CLAIM_STATE_ACTIVITY_ID ); + // generate dashboard notification task + ExternalTask generateDashboardNotificationsTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + generateDashboardNotificationsTask, + PROCESS_CASE_EVENT, + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, + GENERATE_DASHBOARD_NOTIFICATION_ACTIVITY_ID + ); + + //complete the Generate Dashboard Notification Respondent 1 + ExternalTask notificationTaskForDashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTaskForDashboardNotification, + PROCESS_CASE_EVENT, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess); @@ -197,6 +220,23 @@ void shouldRunProcess_ClaimIsHavingMediation() { UPDATE_CLAIM_STATE_ACTIVITY_ID ); + // generate dashboard notification task + ExternalTask generateDashboardNotificationsTask = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + generateDashboardNotificationsTask, + PROCESS_CASE_EVENT, + CREATE_CLAIMANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, + GENERATE_DASHBOARD_NOTIFICATION_ACTIVITY_ID + ); + + //complete the Generate Dashboard Notification Respondent 1 + ExternalTask notificationTaskForDashboardNotification = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask(notificationTaskForDashboardNotification, + PROCESS_CASE_EVENT, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE, + CREATE_DEFENDANT_DASHBOARD_NOTIFICATION_FOR_CLAIMANT_RESPONSE_EVENT_ID + ); + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess);