From 8fb42ecb71ef40366af515c06ba5c31571a95caa Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Mon, 4 Nov 2019 15:40:46 +0000 Subject: 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 --- .../org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java | 3 +-- .../org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'model/event-model/src') 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()); } } -- cgit 1.2.3-korg