Skip to content

Commit

Permalink
Merge pull request #117 from hmcts/uat-fix
Browse files Browse the repository at this point in the history
Change Request to change the permission from CTSC to Court Admin for …
  • Loading branch information
sathishkannan-hmcts authored Mar 21, 2024
2 parents b5acc14 + eac8b7c commit 63f993c
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@
</rule>
<rule id="DecisionRule_05kvogz">
<inputEntry id="UnaryTests_0cb5u2c">
<text>"manageOrders","serviceOfApplication","createBundle","adminEditAndApproveAnOrder","editAndApproveAnOrder","returnApplication","sendOrReplyToMessages","adminRemoveLegalRepresentativeC100","adminRemoveLegalRepresentativeFL401","c100ManageFlags","fl401ManageFlags","statementOfService"</text>
<text>"manageOrders","serviceOfApplication","createBundle","adminEditAndApproveAnOrder","returnApplication","sendOrReplyToMessages","adminRemoveLegalRepresentativeC100","adminRemoveLegalRepresentativeFL401","c100ManageFlags","fl401ManageFlags","statementOfService"</text>
</inputEntry>
<outputEntry id="LiteralExpression_1o5rfjh">
<text></text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,10 @@ caseData.allegationsOfHarmYesNo="Yes") then 3000 else 5000</text>
</inputEntry>
<inputEntry id="UnaryTests_1glizm3">
<text>"checkApplicationFL401", "checkApplicationResubmittedFL401",
"sendToGateKeeperFL401", "sendToGateKeeperResubmittedFL401",
"sendToGateKeeperFL401", "sendToGateKeeperResubmittedFL401", "sendToGateKeeperC100", "sendToGateKeeperResubmittedC100",
"produceHearingBundleFL401", "produceHearingBundleC100", "serviceOfApplicationFL401","adminServeOrderFL401", "updateHearingActualsFL401", "requestSolicitorOrderFL401", "reviewCorrespondenceFL401", "serviceOfApplicationC100","adminServeOrderC100",
"updateHearingActualsC100", "requestSolicitorOrderC100",
"reviewCorrespondenceC100", "reviewSpecificAccessRequestAdmin", "removeLegalRepresentativeFL401","reviewDocumentsForSolAndCafcassFL401","reviewDocumentsForSolAndCafcassC100","reviewAdminOrderByManager","createHearingRequest","createMultipleHearingRequest","createHearingRequestReserveListAssist","reviewRaRequestsFL401","reviewInactiveRaRequestsFL401","recreateApplicationPack","appStatementOfServiceBySol","appStatementOfServiceByLiP","appStatementOfServiceByBailiff","arrangeBailiffSOA","appStatementOfServiceByAdmin","confidentialCheckSOA","completefl416AndServe"</text>
"reviewCorrespondenceC100", "reviewSpecificAccessRequestAdmin", "removeLegalRepresentativeFL401","reviewDocumentsForSolAndCafcassFL401","reviewDocumentsForSolAndCafcassC100","reviewAdminOrderByManager","createHearingRequest","createMultipleHearingRequest","createHearingRequestReserveListAssist","reviewRaRequestsFL401","reviewInactiveRaRequestsFL401","recreateApplicationPack","appStatementOfServiceBySol","appStatementOfServiceByLiP","appStatementOfServiceByBailiff","arrangeBailiffSOA","appStatementOfServiceByAdmin","confidentialCheckSOA","completefl416AndServe","removeLegalRepresentativeC100","replyToMessageForCourtAdminC100","reviewRaRequestsC100","reviewInactiveRaRequestsC100","listWithoutNoticeHearingC100"</text>
</inputEntry>
<outputEntry id="LiteralExpression_1131kat">
<text>"roleCategory"</text>
Expand All @@ -777,8 +777,7 @@ caseData.allegationsOfHarmYesNo="Yes") then 3000 else 5000</text>
<inputEntry id="UnaryTests_1cssptr">
<text>"checkApplicationC100", "checkApplicationResubmittedC100",
"addCaseNumber", "addCaseNumberResubmitted",
"sendToGateKeeperC100", "sendToGateKeeperResubmittedC100",
"reviewSpecificAccessRequestCTSC","removeLegalRepresentativeC100","replyToMessageForCourtAdminC100","reviewRaRequestsC100","reviewInactiveRaRequestsC100","listWithoutNoticeHearingC100"</text>
"reviewSpecificAccessRequestCTSC"</text>
</inputEntry>
<outputEntry id="LiteralExpression_18u6y8m">
<text>"roleCategory"</text>
Expand Down
35 changes: 32 additions & 3 deletions src/main/resources/wa-task-permissions-privatelaw-prlapps.dmn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:camunda="http://camunda.org/schema/1.0/dmn" id="wa-permissions-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.11.0">
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:camunda="http://camunda.org/schema/1.0/dmn" id="wa-permissions-definition" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.1.0">
<decision id="wa-task-permissions-privatelaw-prlapps" name="Private Law Permissions DMN">
<decisionTable id="DecisionTable_1pr5oic" hitPolicy="RULE ORDER">
<input id="InputClause_12crj6e" label="Task Type" biodi:width="578" camunda:inputVariable="taskType">
Expand Down Expand Up @@ -600,8 +600,7 @@
<description>CTSC task permissions</description>
<inputEntry id="UnaryTests_14xrsqw">
<text>"checkApplicationC100", "checkApplicationResubmittedC100",
"addCaseNumber", "addCaseNumberResubmitted",
"sendToGateKeeperC100", "sendToGateKeeperResubmittedC100","removeLegalRepresentativeC100","replyToMessageForCourtAdminC100","reviewRaRequestsC100","reviewInactiveRaRequestsC100","listWithoutNoticeHearingC100"</text>
"addCaseNumber", "addCaseNumberResubmitted"</text>
</inputEntry>
<inputEntry id="UnaryTests_1pv1c0z">
<text></text>
Expand All @@ -628,6 +627,36 @@
<text>false</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1evorlb">
<description>CTSC task permissions</description>
<inputEntry id="UnaryTests_1k15vbg">
<text>"sendToGateKeeperC100", "sendToGateKeeperResubmittedC100", "removeLegalRepresentativeC100", "replyToMessageForCourtAdminC100", "reviewRaRequestsC100", "reviewInactiveRaRequestsC100", "listWithoutNoticeHearingC100"</text>
</inputEntry>
<inputEntry id="UnaryTests_12k147l">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0eepq06">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_06cc2sz">
<text>"hearing-centre-admin"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1p4iqsg">
<text>"Read,Own,UnclaimAssign,Claim,Unclaim,UnassignClaim,CompleteOwn"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0o80ap0">
<text>"ADMIN"</text>
</outputEntry>
<outputEntry id="LiteralExpression_08xtbog">
<text>"SKILL:ABA5:CHECKAPPLICATIONC100"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0o7342c">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0gg5ytu">
<text>false</text>
</outputEntry>
</rule>
<rule id="DecisionRule_079udd1">
<description>CTSC task permissions</description>
<inputEntry id="UnaryTests_0ahkyod">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ static Stream<Arguments> scenarioProvider() {
Map.of(
"taskType", "reviewAdminOrderByManager",
"completionMode", "Auto"
),
Map.of()
)
)
),
Arguments.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ void evaluate_task_admin_reviewCorrespondencefl401(String taskType) {
@ParameterizedTest
@CsvSource(value = {
"checkApplicationC100", "checkApplicationResubmittedC100",
"addCaseNumber", "addCaseNumberResubmitted",
"sendToGateKeeperC100", "sendToGateKeeperResubmittedC100"
"addCaseNumber", "addCaseNumberResubmitted"
})
void evaluate_task_ctsc_checkApplicationc100(String taskType) {
VariableMap inputVariables = new VariableMapImpl();
Expand All @@ -435,6 +434,32 @@ void evaluate_task_ctsc_checkApplicationc100(String taskType) {
)));
}

@SuppressWarnings("checkstyle:indentation")
@ParameterizedTest
@CsvSource(value = {
"sendToGateKeeperC100", "sendToGateKeeperResubmittedC100"
})
void evaluate_task_ctsc_sendToGateKeeperc100(String taskType) {
VariableMap inputVariables = new VariableMapImpl();
inputVariables.putValue("taskAttributes", Map.of("taskType", taskType));

DmnDecisionTableResult dmnDecisionTableResult = evaluateDmnTable(inputVariables);

MatcherAssert.assertThat(dmnDecisionTableResult.getResultList(), is(List.of(
Map.of(
"name", "task-supervisor",
"value", "Read,Manage,Complete,Cancel,Assign,Unassign",
"autoAssignable", false
), Map.of(
"autoAssignable", false,
"name", "hearing-centre-admin",
"roleCategory", "ADMIN",
"value", "Read,Own,UnclaimAssign,Claim,Unclaim,UnassignClaim,CompleteOwn",
"authorisations","SKILL:ABA5:CHECKAPPLICATIONC100"
)
)));
}

@SuppressWarnings("checkstyle:indentation")
@ParameterizedTest
@CsvSource(value = {
Expand Down Expand Up @@ -557,8 +582,8 @@ void evaluate_task_admin_removeLegalRepresentativeC100(String taskType) {
"value", "Read,Manage,Complete,Cancel,Assign,Unassign"
), Map.of(
"autoAssignable", false,
"name", "ctsc",
"roleCategory", "CTSC",
"name", "hearing-centre-admin",
"roleCategory", "ADMIN",
"authorisations", "SKILL:ABA5:CHECKAPPLICATIONC100",
"value", "Read,Own,UnclaimAssign,Claim,Unclaim,UnassignClaim,CompleteOwn"
)
Expand Down Expand Up @@ -609,8 +634,8 @@ void evaluate_task_admin_reviewRaRequestsC100(String taskType) {
"value", "Read,Manage,Complete,Cancel,Assign,Unassign"
), Map.of(
"autoAssignable", false,
"name", "ctsc",
"roleCategory", "CTSC",
"name", "hearing-centre-admin",
"roleCategory", "ADMIN",
"authorisations", "SKILL:ABA5:CHECKAPPLICATIONC100",
"value", "Read,Own,UnclaimAssign,Claim,Unclaim,UnassignClaim,CompleteOwn"
)
Expand Down Expand Up @@ -662,8 +687,8 @@ void evaluate_task_admin_reviewInactiveRaRequestsC100(String taskType) {
"value", "Read,Manage,Complete,Cancel,Assign,Unassign"
), Map.of(
"autoAssignable", false,
"name", "ctsc",
"roleCategory", "CTSC",
"name", "hearing-centre-admin",
"roleCategory", "ADMIN",
"authorisations", "SKILL:ABA5:CHECKAPPLICATIONC100",
"value", "Read,Own,UnclaimAssign,Claim,Unclaim,UnassignClaim,CompleteOwn"
)
Expand Down Expand Up @@ -795,6 +820,6 @@ void if_this_test_fails_needs_updating_with_your_changes() {
DmnDecisionTableImpl logic = (DmnDecisionTableImpl) decision.getDecisionLogic();
assertThat(logic.getInputs().size(), is(2));
assertThat(logic.getOutputs().size(), is(7));
assertThat(logic.getRules().size(), is(25));
assertThat(logic.getRules().size(), is(26));
}
}

0 comments on commit 63f993c

Please sign in to comment.