add structure only for PAP rule management 49/18049/3
authorJorge Hernandez <jh1730@att.com>
Tue, 10 Oct 2017 20:28:55 +0000 (15:28 -0500)
committerJorge Hernandez <jh1730@att.com>
Tue, 10 Oct 2017 20:43:15 +0000 (15:43 -0500)
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>
controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl

index fc0cd29..e601ed4 100644 (file)
@@ -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