aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/archetype-cl-amsterdam
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-10-10 15:28:55 -0500
committerJorge Hernandez <jh1730@att.com>2017-10-10 15:43:15 -0500
commit704e2b4fd3da2ff0a7efccda2e12563c390a0ccf (patch)
treecbb43bb706ddc14088b49ac574ac757e81e1f17e /controlloop/templates/archetype-cl-amsterdam
parentbfd30fd2723d2c66fbacaf6de675d49e01c8995d (diff)
add structure only for PAP rule management
PAP currently generates a set up rule that inserts a Params object when the session is loaded. Since the official template also has an equivalent rule that is used by the drools applications team to perform initializations tasks, at runtime we end up with 2 Params objects with the same control loop data. This has sideeffects where the same rule becomes true for 2 Params objects therefore performing duplicated actions which introduces somewhat anomalous behavior. The PapParams is introduced to satisfy current PAP needs for management of rules. The structure is included here only for those purposes but it carries no significance at runtime during drools executions since the rules go by Params instead of PapParams. In the near future, the plan is to have the PAP not generating SET UP rules. There is a companion review on the PAP side to refer to PapParams instead of Params to fulfill the resolution of POLICY-302. Change-Id: I2f9ed3cee3d5d5209eecd43823cfc44a4b937600 Issue-ID: POLICY-302 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-amsterdam')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl21
1 files changed, 21 insertions, 0 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 fc0cd29b7..e601ed43f 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
@@ -75,18 +75,39 @@ import java.util.Iterator;
import org.onap.policy.drools.system.PolicyEngine;
+/*
+ * This structure mimics the Params structure.
+ * Its only purpose is to allow management of
+ * rules by the PAP component..
+ * It has no use at runtime since the rules go by
+ * Params for matching purposes.
+ */
+declare PapParams
+ closedLoopControlName : String
+ controlLoopYaml : String
+end
+
+/*
+ * Control Loop Identity
+ */
declare Params
closedLoopControlName : String
controlLoopYaml : String
end
+/*
+ * Operation Timer
+ */
declare OperationTimer
closedLoopControlName : String
requestID : String
delay : String
end
+/*
+ * Control Loop Timer
+ */
declare ControlLoopTimer
closedLoopControlName : String
requestID : String