diff options
author | 2019-06-20 10:09:21 -0400 | |
---|---|---|
committer | 2019-06-20 11:00:24 -0400 | |
commit | 1bf858e215f8d0b8cf074bffc81d1c3d1a03fd52 (patch) | |
tree | d43a6f8c5587d17148d82fc35b2e6e2d34134bd2 /controlloop/templates/archetype-cl-usecases | |
parent | d4704a70405cae2f6d9cb32ca30828db14be01b7 (diff) |
Set timeout to CL timeout if zero
Modified the rules to set the operational timeout to the overall
CL timeout if the operational timeout is zero.
Added code to check for zero timeout for the overall CL, too.
Change-Id: I28d41632f59e9bc2fce953267883d567abc92a49
Issue-ID: POLICY-1859
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-usecases')
-rw-r--r-- | controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 3f2bf572c..a9e17c3c4 100644 --- a/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -440,7 +440,8 @@ rule "EVENT.MANAGER" opTimer.setTimerType("Operation"); opTimer.setClosedLoopControlName($event.getClosedLoopControlName()); opTimer.setRequestId($event.getRequestId().toString()); - opTimer.setDelay(operation.getOperationTimeout().toString() + "s"); + Integer timeout = operation.getOperationTimeout(); + opTimer.setDelay(timeout > 0 ? timeout.toString() + "s" : $clTimer.getDelay()); insert(opTimer); // |