From cecd4ac43f199ad9f020d38fb7d1651b296d1703 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 27 Jun 2018 11:04:11 -0400 Subject: Add time limit to local guard locking facility Modified the local policy guard locking facility to add a time parameter. Modified the control loop event manager to extend the lock when lockCurrentOperation() is re-invoked. Modified the rules to retract the lock if the lock request was denied. Reorder assertions in junit test. Change-Id: Ic9b77acbb4881a5a516f30eb56664bad1a5c4d7e Issue-ID: POLICY-872 Signed-off-by: Jim Hahn --- .../src/main/resources/__closedLoopControlName__.drl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'controlloop/templates/archetype-cl-amsterdam') 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 b1773f556..1274d6c16 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 @@ -449,6 +449,10 @@ rule "${policyName}.EVENT.MANAGER" retract($event); retract($manager); retract($clTimer); + + if(result.getB() != null) { + retract(result.getB()); + } } logger.info("{}: {}: starting operation={}", $params.getClosedLoopControlName(), drools.getRule().getName(), -- cgit 1.2.3-korg