summaryrefslogtreecommitdiffstats
path: root/controlloop
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl4
1 files changed, 3 insertions, 1 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 93b4e0a8a..acc980686 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
@@ -203,6 +203,8 @@ rule "${policyName}.EVENT"
// Retract it from memory
//
retract($event);
+ } else if ($event.closedLoopEventStatus != ControlLoopEventStatus.ONSET) {
+ throw new ControlLoopException($event.closedLoopEventStatus + " received with no prior onset");
} else {
//
// Create an EventManager
@@ -261,7 +263,7 @@ rule "${policyName}.EVENT"
VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
notification.notification = ControlLoopNotificationType.REJECTED;
- notification.message = "Exception occurred " + e.getMessage();
+ notification.message = "Exception occurred: " + e.getMessage();
notification.policyName = drools.getRule().getName();
notification.policyScope = "${policyScope}";
notification.policyVersion = "${policyVersion}";