From 6d0d6858c14920f366fa12336316ea8d5c66e46d Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 26 Sep 2017 16:21:02 -0500 Subject: Fix Use Case Template This is a WIP for getting guard to work. Currently the A&AI GET and named queries are connecting to the simulator and working in the labs. Guard is not connecting to simulator and needs further analysis. Issue-ID: POLICY-259 Change-Id: If9875bfd83cbd82dcae04a876b3818ec9c07b1f7 Signed-off-by: Daniel Cruz --- .../src/main/resources/__closedLoopControlName__.drl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'controlloop/templates/archetype-cl-amsterdam/src') diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index b10cc3bb7..343221f0d 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -506,7 +506,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED" $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" ) $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() ) $manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName, requestID == $event.requestID ) - $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.closedLoopControlName, onset.requestID == $event.requestID, getGuardApprovalStatus() == "Permit" ) + $operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.closedLoopControlName, onset.requestID == $event.requestID, "Permit".equalsIgnoreCase(getGuardApprovalStatus()) ) $lock : TargetLock (requestID == $event.requestID) then @@ -620,7 +620,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" // to the CallGuardTask() and set the first argument to null // (instead of XacmlPdpEngine). // - boolean guardEnabled = false; + boolean guardEnabled = true; if(guardEnabled){ @@ -682,7 +682,7 @@ rule "${policyName}.GUARD.RESPONSE" PolicyEngine.manager.deliver("POLICY-CL-MGT", notification); - if("Permit".equals($guardResponse.result)){ + if("Permit".equalsIgnoreCase($guardResponse.result)){ modify($operation){setGuardApprovalStatus($guardResponse.result)}; } -- cgit 1.2.3-korg