summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2019-11-04 15:40:46 +0000
committera.sreekumar <ajith.sreekumar@est.tech>2019-11-04 15:53:12 +0000
commit8fb42ecb71ef40366af515c06ba5c31571a95caa (patch)
tree9301cbb54b45da00f2f5da7a9e3e3c6865ae3267
parent4171256446af0144c56b4f6016c7b9f748b9061d (diff)
Fixing multiple policies with optional event fields fails execution in APEX
Policy execution fails when multiple policy models are running and the policies have optional fields. Change-Id: Ifb1a45a25e3a88b8707fb8b76f8279b6ec0b91ce Issue-ID: POLICY-2211 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java3
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java
index e7a9a2af5..176699184 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
@@ -99,6 +98,6 @@ public class AxInputField extends AxField {
* @param field the input field to copy from
*/
public AxInputField(final AxInputField field) {
- super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()));
+ super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()), field.getOptional());
}
}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java
index 1dd2ecb7a..f224739eb 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
@@ -99,6 +98,6 @@ public class AxOutputField extends AxField {
* @param field the output field to copy from
*/
public AxOutputField(final AxOutputField field) {
- super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()));
+ super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()), field.getOptional());
}
}