diff options
author | 2017-10-24 17:16:31 -0500 | |
---|---|---|
committer | 2017-10-24 17:16:31 -0500 | |
commit | 7e3ace91847ec5aaccfeeff638a8d2d9b17e45fc (patch) | |
tree | f897ceb7ef39462a59e2551be82e4a58489d9c6c /controlloop/templates/archetype-cl-amsterdam/src/main | |
parent | 1480d327ff8559c1d912108f7d3353fed03fcd2c (diff) |
change drl line to avoid velocity bug
generating a control loop project from archetype
(but not from junits) runs into velocity parse failures
as specified in ticket. The existing .drl code
for the line that fails the parsing has been slightly
modified to bypass this problem. In addition a
logging statement has been added to the catch.
Change-Id: I3eec82c9b710cc9d2a13dc68032a8a6074016b40
Issue-ID: POLICY-376
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-amsterdam/src/main')
-rw-r--r-- | controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl | 10 |
1 files changed, 7 insertions, 3 deletions
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 65a601188..a29941607 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 @@ -522,13 +522,17 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED" request = $operation.startOperation($event); } catch (AAIException e) { - //We got an exception, retract everything for this current operation - $operation.setOperationHasException(e.getMessage()); + String msg = e.getMessage(); + logger.warn("{}: {}: operation={}: AAI failure: {}", + $params.getClosedLoopControlName(), drools.getRule().getName(), + $operation, msg, e); + $operation.setOperationHasException(msg); retract($opTimer); retract($operation); caughtException = true; } - //Having the modify statement in the catch clause doesn't work for whatever reason + + // Having the modify statement in the catch clause doesn't work for whatever reason if (caughtException) { modify($manager) {finishOperation($operation)}; } |