diff --git a/src/main/resources/camunda/set_aside_judgment_request.bpmn b/src/main/resources/camunda/set_aside_judgment_request.bpmn index f7181d345..b0ee251eb 100644 --- a/src/main/resources/camunda/set_aside_judgment_request.bpmn +++ b/src/main/resources/camunda/set_aside_judgment_request.bpmn @@ -1,6 +1,6 @@ - - + + @@ -26,11 +26,8 @@ - Flow_0gpaflx - Flow_0y6slka - Flow_09tvpjs - Flow_1ofksnn - Flow_06nigsi + Flow_12hfo5j + Flow_JO_LIVE_FEED_DISABLED Flow_1og0z75 @@ -59,12 +56,9 @@ Flow_0qjr8zn - Flow_0gpaflx Flow_0r8cqwr + Flow_0gpaflx - - ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} - @@ -72,12 +66,11 @@ Flow_0r8cqwr - Flow_0y6slka + Flow_09zyg1n ${!empty flowFlags.TWO_RESPONDENT_REPRESENTATIVES && flowFlags.TWO_RESPONDENT_REPRESENTATIVES} - Flow_0vaobyf Flow_0l3rt07 @@ -114,7 +107,7 @@ Flow_09tvpjs Flow_1qcagy1 - + ${empty flowFlags.DASHBOARD_SERVICE_ENABLED || !flowFlags.DASHBOARD_SERVICE_ENABLED} @@ -124,12 +117,11 @@ Flow_1qcagy1 - Flow_1ofksnn + Flow_0tz0nzo ${!empty flowFlags.DASHBOARD_SERVICE_ENABLED || flowFlags.DASHBOARD_SERVICE_ENABLED} - @@ -159,9 +151,39 @@ ${JUDGMENT_SET_ASIDE_ERROR==true} - + ${empty JUDGMENT_SET_ASIDE_ERROR || JUDGMENT_SET_ASIDE_ERROR==false} + + ${!empty flowFlags.ONE_RESPONDENT_REPRESENTATIVE && flowFlags.ONE_RESPONDENT_REPRESENTATIVE} + + + Flow_06nigsi + Flow_0gpaflx + Flow_09tvpjs + Flow_0tz0nzo + Flow_09zyg1n + Flow_JO_LIVE_FEED_ENABLED + Flow_JO_LIVE_FEED_DISABLED + + + ${!empty flowFlags.IS_JO_LIVE_FEED_ACTIVE && flowFlags.IS_JO_LIVE_FEED_ACTIVE} + + + + + + + NOTIFY_RPA_ON_CONTINUOUS_FEED + + + Flow_JO_LIVE_FEED_ENABLED + Flow_12hfo5j + + + + ${empty flowFlags.IS_JO_LIVE_FEED_ACTIVE || !flowFlags.IS_JO_LIVE_FEED_ACTIVE} + Judgment set aside because of error? @@ -189,12 +211,6 @@ - - - - - - @@ -224,16 +240,6 @@ - - - - - - - - - - @@ -248,6 +254,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -267,8 +295,8 @@ - - + + @@ -281,7 +309,7 @@ - + @@ -293,11 +321,6 @@ - - - - - @@ -315,32 +338,27 @@ - + - - - - + + + - + - - + + - + - - - - @@ -362,15 +380,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SetAsideJudgmentTest.java b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SetAsideJudgmentTest.java index 8e00e8249..64b65d1f8 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SetAsideJudgmentTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/bpmn/SetAsideJudgmentTest.java @@ -26,6 +26,8 @@ class SetAsideJudgmentTest extends BpmnBaseTest { //ACTIVITY IDs public static final String CREATE_DASHBOARD_NOTIFICATION_SET_ASIDE_JUDGEMENT_CLAIMANT_ACTIVITY_ID = "GenerateDashboardNotificationSetAsideJudgmentClaimant"; + public static final String NOTIFY_RPA_ON_CONTINUOUS_FEED = "NOTIFY_RPA_ON_CONTINUOUS_FEED"; + public static final String NOTIFY_RPA_ON_CONTINUOUS_FEED_ID = "NotifyRoboticsOnContinuousFeed"; public SetAsideJudgmentTest() { super("set_aside_judgment_request.bpmn", PROCESS_ID); @@ -33,27 +35,28 @@ public SetAsideJudgmentTest() { @ParameterizedTest @CsvSource({ - "true, true, true, true", - "true, true, true, false", - "true, true, false, true", - "true, true, false, false", - "true, false, true, true", - "true, false, true, false", - "true, false, false, true", - "true, false, false, false", - "false, true, true, true", - "false, true, true, false", - "false, true, false, true", - "false, true, false, false", - "false, false, true, true", - "false, false, true, false", - "false, false, false, true", - "false, false, false, false" + "true, true, true, true, true", + "true, true, true, false, true", + "true, true, false, true, false", + "true, true, false, false, false", + "true, false, true, true, true", + "true, false, true, false, false", + "true, false, false, true, true", + "true, false, false, false, false", + "false, true, true, true, true", + "false, true, true, false, false", + "false, true, false, true, true", + "false, true, false, false, false", + "false, false, true, true,true", + "false, false, true, false, false", + "false, false, false, true, true", + "false, false, false, false, false" }) void shouldSuccessfullyNotifySetAsideJudgmentRequest(boolean twoRepresentatives, boolean isLiPDefendant, boolean dashboardServiceEnabled, - boolean judgmentSetAsideError) { + boolean judgmentSetAsideError, + boolean isJoFeedLive) { //assert process has started assertFalse(processInstance.isEnded()); @@ -66,7 +69,8 @@ void shouldSuccessfullyNotifySetAsideJudgmentRequest(boolean twoRepresentatives, ONE_RESPONDENT_REPRESENTATIVE, !twoRepresentatives, TWO_RESPONDENT_REPRESENTATIVES, twoRepresentatives, UNREPRESENTED_DEFENDANT_ONE, isLiPDefendant, - DASHBOARD_SERVICE_ENABLED, dashboardServiceEnabled)); + DASHBOARD_SERVICE_ENABLED, dashboardServiceEnabled, + IS_JO_LIVE_FEED_ACTIVE, isJoFeedLive)); variables.put(JUDGMENT_SET_ASIDE_ERROR, judgmentSetAsideError); //complete the start business process @@ -164,6 +168,18 @@ void shouldSuccessfullyNotifySetAsideJudgmentRequest(boolean twoRepresentatives, } } + if (isJoFeedLive) { + //Notify RPA + ExternalTask notifyRPA = assertNextExternalTask(PROCESS_CASE_EVENT); + assertCompleteExternalTask( + notifyRPA, + PROCESS_CASE_EVENT, + NOTIFY_RPA_ON_CONTINUOUS_FEED, + NOTIFY_RPA_ON_CONTINUOUS_FEED_ID, + variables + ); + } + //end business process ExternalTask endBusinessProcess = assertNextExternalTask(END_BUSINESS_PROCESS); completeBusinessProcess(endBusinessProcess);