aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl13
-rw-r--r--controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl3
2 files changed, 9 insertions, 7 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 6a73f8e8f..f28ee173f 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
@@ -451,11 +451,12 @@ rule "${policyName}.EVENT.MANAGER"
//
// insert operation timeout object
//
- ControlLoopTimer opTimer = new ControlLoopTimer();
- opTimer.setTimerType("Operation");
- opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- opTimer.setRequestId($event.getRequestId().toString());
- opTimer.setDelay(operation.getOperationTimeout().toString() + "s");
+ ControlLoopTimer opTimer = new ControlLoopTimer();
+ opTimer.setTimerType("Operation");
+ opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
+ opTimer.setRequestId($event.getRequestId().toString());
+ Integer timeout = operation.getOperationTimeout();
+ opTimer.setDelay(timeout > 0 ? timeout.toString() + "s" : $clTimer.getDelay());
insert(opTimer);
//
@@ -463,7 +464,7 @@ rule "${policyName}.EVENT.MANAGER"
//
insert(result.getB());
} else {
- logger.debug("The target resource {} is already processing",
+ logger.debug("The target resource {} is already processing",
$event.getAai().get($event.getTarget()));
notification = new VirtualControlLoopNotification($event);
notification.setNotification(ControlLoopNotificationType.REJECTED);
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);
//