summaryrefslogtreecommitdiffstats
path: root/model/policy-model/src
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-06-29 13:57:14 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2021-07-02 16:03:51 +0100
commit5f0ec1c2d95c377fbec428f11464e93fe442b5ef (patch)
tree4aef07097fa4d64550db116a1b1b4acd1aa42590 /model/policy-model/src
parentba55109db1e5eea013dcffd1be29cf06fe2bbcb1 (diff)
Cleanup input & outputFields from Task definition
1) Remove the usage of inputField and outputField from Task definition. 2) Fix issues around populating events to task in case of State Finalizer Logic. Change-Id: Ief17f400729410b83c6b7c665980d443e0cf6f28 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'model/policy-model/src')
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java39
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java165
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java10
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java38
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java61
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java15
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java5
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java58
-rw-r--r--model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt2
-rw-r--r--model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt3
10 files changed, 24 insertions, 372 deletions
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
index 4ee176d97..aec144a46 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
@@ -25,8 +25,6 @@ package org.onap.policy.apex.model.policymodel.concepts;
import java.util.List;
import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeSet;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
@@ -45,7 +43,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
@@ -425,19 +422,6 @@ public class AxPolicyModel extends AxModel {
* @return the result
*/
private AxValidationResult validateTaskKeys(final AxTask task, AxValidationResult result) {
- for (final AxField field : task.getInputFieldSet()) {
- if (getSchemas().get(field.getSchema()) == null) {
- result.addValidationMessage(new AxValidationMessage(task.getKey(), this.getClass(),
- ValidationResult.INVALID, "task input field schema " + field.getSchema().getId() + DOES_NOT_EXIST));
- }
- }
- for (final AxField field : task.getOutputFieldSet()) {
- if (getSchemas().get(field.getSchema()) == null) {
- result.addValidationMessage(
- new AxValidationMessage(task.getKey(), this.getClass(), ValidationResult.INVALID,
- "task output field schema " + field.getSchema().getId() + DOES_NOT_EXIST));
- }
- }
for (final AxArtifactKey contextAlbumKey : task.getContextAlbumReferences()) {
if (albums.get(contextAlbumKey) == null) {
result.addValidationMessage(new AxValidationMessage(task.getKey(), this.getClass(),
@@ -489,19 +473,6 @@ public class AxPolicyModel extends AxModel {
ValidationResult.INVALID, "state default task " + state.getDefaultTask().getId() + DOES_NOT_EXIST));
}
- // Check task input fields and event fields are compatible for default tasks with no task
- // selection logic
- if (state.getTaskSelectionLogic().getKey().equals(AxReferenceKey.getNullKey())
- && triggerEvent != null && defaultTask != null) {
- final Set<AxField> unhandledTaskInputFields = new TreeSet<>(defaultTask.getInputFieldSet());
- unhandledTaskInputFields.removeAll(triggerEvent.getFields());
- for (final AxField unhandledTaskInputField : unhandledTaskInputFields) {
- result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "task input field " + unhandledTaskInputField + " for task "
- + defaultTask.getId() + " not in trigger event " + triggerEvent.getId()));
- }
- }
-
for (final AxStateOutput stateOutput : state.getStateOutputs().values()) {
if (events.getEventMap().get(stateOutput.getOutgoingEvent()) == null) {
result.addValidationMessage(new AxValidationMessage(stateOutput.getKey(), this.getClass(),
@@ -562,16 +533,6 @@ public class AxPolicyModel extends AxModel {
ValidationResult.INVALID, "output event " + stateOutput.getOutgoingEvent().getId()
+ " for state output " + stateOutput.getId() + DOES_NOT_EXIST));
}
-
- if (task != null && usedEvent != null) {
- final Set<AxField> unhandledTaskOutputFields = new TreeSet<>(task.getOutputFieldSet());
- unhandledTaskOutputFields.removeAll(usedEvent.getFields());
- for (final AxField unhandledTaskOutputField : unhandledTaskOutputFields) {
- result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "task output field " + unhandledTaskOutputField + " for task "
- + task.getId() + " not in output event " + usedEvent.getId()));
- }
- }
}
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
index a30a80acc..7eba99af0 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
@@ -56,9 +56,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
-import org.onap.policy.apex.model.eventmodel.concepts.AxField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
import org.onap.policy.common.utils.validation.Assertions;
/**
@@ -78,12 +75,6 @@ import org.onap.policy.common.utils.validation.Assertions;
* <ol>
* <li>The task key must not be a null key and must be valid, see validation in
* {@link AxArtifactKey}
- * <li>The task must have at least one input field
- * <li>The parent of each input field of a task must be that task
- * <li>Each input field must be valid, see validation in {@link AxInputField}
- * <li>The task must have at least one output field
- * <li>The parent of each output field of a task must be that task
- * <li>Each output field must be valid, see validation in {@link AxOutputField}
* <li>The parent of each task parameter of a task must be that task
* <li>Each task parameter must be valid, see validation in {@link AxTaskParameter}
* <li>The parent of the task logic in a task must be that task
@@ -99,7 +90,7 @@ import org.onap.policy.common.utils.validation.Assertions;
@XmlType(
name = "AxTask",
namespace = "http://www.onap.org/policy/apex-pdp",
- propOrder = {"key", "inputEvent", "outputEvents", "inputFields", "outputFields", "taskParameters",
+ propOrder = {"key", "inputEvent", "outputEvents", "taskParameters",
"contextAlbumReferenceSet", "taskLogic"})
@Getter
@Setter
@@ -130,14 +121,6 @@ public class AxTask extends AxConcept {
private Map<String, AxEvent> outputEvents;
@OneToMany(cascade = CascadeType.ALL)
- @XmlElement(name = "inputFields", required = true)
- private Map<String, AxInputField> inputFields;
-
- @OneToMany(cascade = CascadeType.ALL)
- @XmlElement(name = "outputFields", required = true)
- private Map<String, AxOutputField> outputFields;
-
- @OneToMany(cascade = CascadeType.ALL)
@XmlElement(name = "taskParameters", required = true)
private Map<String, AxTaskParameter> taskParameters;
@@ -181,8 +164,6 @@ public class AxTask extends AxConcept {
*/
public AxTask(final AxArtifactKey key) {
this(key, // Task Key
- new TreeMap<>(), // Input fields
- new TreeMap<>(), // Output Fields
new TreeMap<>(), // Task Parameters
new TreeSet<>(), // Context Album References
new AxTaskLogic(new AxReferenceKey(key)) // Task Logic
@@ -193,27 +174,20 @@ public class AxTask extends AxConcept {
* This Constructor defines all the fields of the task.
*
* @param key the key of the task
- * @param inputFields the input fields that the task expects
- * @param outputFields the output fields that the task emits
* @param taskParameters the task parameters that are used to initialize tasks of this type
* @param contextAlbumReferenceSet the context album reference set defines the context that may
* be used by Task Logic in the state
* @param taskLogic the task logic that performs the domain specific work of the task
*/
- public AxTask(final AxArtifactKey key, final Map<String, AxInputField> inputFields,
- final Map<String, AxOutputField> outputFields, final Map<String, AxTaskParameter> taskParameters,
- final Set<AxArtifactKey> contextAlbumReferenceSet, final AxTaskLogic taskLogic) {
+ public AxTask(final AxArtifactKey key, final Map<String, AxTaskParameter> taskParameters,
+ final Set<AxArtifactKey> contextAlbumReferenceSet, final AxTaskLogic taskLogic) {
super();
Assertions.argumentNotNull(key, "key may not be null");
- Assertions.argumentNotNull(inputFields, "inputFields may not be null");
- Assertions.argumentNotNull(outputFields, "outputFields may not be null");
Assertions.argumentNotNull(taskParameters, "taskParameters may not be null");
Assertions.argumentNotNull(contextAlbumReferenceSet, "contextAlbumReferenceSet may not be null");
Assertions.argumentNotNull(taskLogic, "taskLogic may not be null");
this.key = key;
- this.inputFields = inputFields;
- this.outputFields = outputFields;
this.taskParameters = taskParameters;
this.contextAlbumReferenceSet = contextAlbumReferenceSet;
this.taskLogic = taskLogic;
@@ -222,23 +196,13 @@ public class AxTask extends AxConcept {
/**
* When a task is unmarshalled from disk or from the database, the parent of contained objects
* is not defined. This method is called by JAXB after unmarshaling and is used to set the
- * parent keys of all {@link AxInputField}, {@link AxOutputField}, and {@link AxTaskParameter}
- * instance in the task.
+ * parent keys of all {@link AxTaskParameter} instance in the task.
*
* @param unmarshaler the unmarshaler that is unmarshaling the model
* @param parent the parent object of this object in the unmarshaler
*/
public void afterUnmarshal(final Unmarshaller unmarshaler, final Object parent) {
taskLogic.getKey().setParentArtifactKey(key);
-
- for (final AxInputField inputField : inputFields.values()) {
- inputField.getKey().setParentArtifactKey(key);
- inputField.getKey().setParentLocalName("InField");
- }
- for (final AxOutputField outputField : outputFields.values()) {
- outputField.getKey().setParentArtifactKey(key);
- outputField.getKey().setParentLocalName("OutField");
- }
for (final AxTaskParameter parameter : taskParameters.values()) {
parameter.getKey().setParentArtifactKey(key);
}
@@ -250,12 +214,6 @@ public class AxTask extends AxConcept {
@Override
public List<AxKey> getKeys() {
final List<AxKey> keyList = key.getKeys();
- for (final AxInputField inputField : inputFields.values()) {
- keyList.addAll(inputField.getKeys());
- }
- for (final AxOutputField outputField : outputFields.values()) {
- keyList.addAll(outputField.getKeys());
- }
for (final AxTaskParameter taskParameter : taskParameters.values()) {
keyList.addAll(taskParameter.getKeys());
}
@@ -267,85 +225,6 @@ public class AxTask extends AxConcept {
}
/**
- * Gets the raw input fields that the task expects as a tree map.
- *
- * @return the raw input fields that the task expects
- */
- public Map<String, AxField> getRawInputFields() {
- return new TreeMap<>(inputFields);
- }
-
- /**
- * Convenience method to get the input fields as a set.
- *
- * @return the input fields as a set
- */
- public Set<AxField> getInputFieldSet() {
- final Set<AxField> inputFieldSet = new TreeSet<>();
- for (final AxInputField field : inputFields.values()) {
- inputFieldSet.add(field);
- }
- return inputFieldSet;
- }
-
- /**
- * Copy the input fields from the given map into the task. This method is used to get a copy of
- * the input fields, which can be useful for unit testing of policies and tasks.
- *
- * @param fields the fields to copy into the task
- */
- public void duplicateInputFields(final Map<String, AxField> fields) {
- Assertions.argumentNotNull(fields, "fields may not be null");
-
- for (final AxField field : fields.values()) {
- final AxReferenceKey fieldKey = new AxReferenceKey(this.getKey().getName(), this.getKey().getVersion(),
- "inputFields", field.getKey().getLocalName());
- final AxInputField inputField = new AxInputField(fieldKey, field.getSchema());
- inputFields.put(inputField.getKey().getLocalName(), inputField);
- }
- }
-
- /**
- * Gets the raw output fields that the task emits as a tree map.
- *
- * @return the raw output fields as a tree map
- */
- public Map<String, AxField> getRawOutputFields() {
- return new TreeMap<>(outputFields);
- }
-
- /**
- * Gets the output fields that the task emits as a set.
- *
- * @return the output fields as a set
- */
- public Set<AxField> getOutputFieldSet() {
- final Set<AxField> outputFieldSet = new TreeSet<>();
- for (final AxOutputField field : outputFields.values()) {
- outputFieldSet.add(field);
- }
- return outputFieldSet;
- }
-
- /**
- * Copy the output fields from the given map into the task. This method is used to get a copy of
- * the output fields, which can be useful for unit testing of policies and tasks.
- *
- * @param fields the fields to copy into the task
- */
- public void duplicateOutputFields(final Map<String, AxField> fields) {
- Assertions.argumentNotNull(fields, "fields may not be null");
-
- for (final AxField field : fields.values()) {
- final AxReferenceKey fieldKey = new AxReferenceKey(this.getKey().getName(), this.getKey().getVersion(),
- "outputFields", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldKey, field.getSchema());
- outputFields.put(outputField.getKey().getLocalName(), outputField);
- }
- }
-
-
- /**
* Gets the context album reference set defines the context that may be used by Task Logic in
* the state.
*
@@ -446,12 +325,6 @@ public class AxTask extends AxConcept {
@Override
public void clean() {
key.clean();
- for (final AxInputField inputField : inputFields.values()) {
- inputField.clean();
- }
- for (final AxOutputField outputField : outputFields.values()) {
- outputField.clean();
- }
for (final AxTaskParameter parameter : taskParameters.values()) {
parameter.clean();
}
@@ -471,10 +344,6 @@ public class AxTask extends AxConcept {
builder.append(":(");
builder.append("key=");
builder.append(key);
- builder.append(",inputFields=");
- builder.append(inputFields);
- builder.append(",outputFields=");
- builder.append(outputFields);
builder.append(",taskParameters=");
builder.append(taskParameters);
builder.append(",contextAlbumReferenceSet=");
@@ -498,18 +367,6 @@ public class AxTask extends AxConcept {
final AxTask copy = ((AxTask) copyObject);
copy.setKey(key);
- final Map<String, AxInputField> newInputFields = new TreeMap<>();
- for (final Entry<String, AxInputField> inputFieldEntry : inputFields.entrySet()) {
- newInputFields.put(inputFieldEntry.getKey(), new AxInputField(inputFieldEntry.getValue()));
- }
- copy.setInputFields(newInputFields);
-
- final Map<String, AxOutputField> newOutputFields = new TreeMap<>();
- for (final Entry<String, AxOutputField> outputFieldEntry : outputFields.entrySet()) {
- newOutputFields.put(outputFieldEntry.getKey(), new AxOutputField(outputFieldEntry.getValue()));
- }
- copy.setOutputFields(newOutputFields);
-
final Map<String, AxTaskParameter> newTaskParameter = new TreeMap<>();
for (final Entry<String, AxTaskParameter> taskParameterEntry : taskParameters.entrySet()) {
newTaskParameter.put(taskParameterEntry.getKey(), new AxTaskParameter(taskParameterEntry.getValue()));
@@ -535,8 +392,6 @@ public class AxTask extends AxConcept {
final int prime = 31;
int result = 1;
result = prime * result + key.hashCode();
- result = prime * result + inputFields.hashCode();
- result = prime * result + outputFields.hashCode();
result = prime * result + taskParameters.hashCode();
result = prime * result + contextAlbumReferenceSet.hashCode();
result = prime * result + taskLogic.hashCode();
@@ -563,12 +418,6 @@ public class AxTask extends AxConcept {
if (!key.equals(other.key)) {
return false;
}
- if (!inputFields.equals(other.inputFields)) {
- return false;
- }
- if (!outputFields.equals(other.outputFields)) {
- return false;
- }
if (!taskParameters.equals(other.taskParameters)) {
return false;
}
@@ -597,12 +446,6 @@ public class AxTask extends AxConcept {
if (!key.equals(other.key)) {
return key.compareTo(other.key);
}
- if (!inputFields.equals(other.inputFields)) {
- return (inputFields.hashCode() - other.inputFields.hashCode());
- }
- if (!outputFields.equals(other.outputFields)) {
- return (outputFields.hashCode() - other.outputFields.hashCode());
- }
if (!taskParameters.equals(other.taskParameters)) {
return (taskParameters.hashCode() - other.taskParameters.hashCode());
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java
index 3a4c36bc5..6731caf30 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java
@@ -29,8 +29,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
import org.onap.policy.apex.model.eventmodel.concepts.AxField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicy;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
import org.onap.policy.apex.model.policymodel.concepts.AxState;
@@ -163,14 +161,6 @@ public class PolicyAnalyser {
for (final AxArtifactKey contextAlbumKey : task.getContextAlbumReferences()) {
result.getContextAlbumUsage().get(contextAlbumKey).add(task.getKey());
}
-
- // Task data type usage
- for (final AxInputField inputField : task.getInputFields().values()) {
- result.getContextSchemaUsage().get(inputField.getSchema()).add(task.getKey());
- }
- for (final AxOutputField outputField : task.getOutputFields().values()) {
- result.getContextSchemaUsage().get(outputField.getSchema()).add(task.getKey());
- }
}
/**
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
index 48022e878..b699b5d48 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
@@ -37,8 +37,6 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
import org.onap.policy.apex.model.eventmodel.concepts.AxField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator;
/**
@@ -183,32 +181,6 @@ public class PolicyModelTest {
result = model.validate(result);
assertEquals(ValidationResult.VALID, result.getValidationResult());
- final AxInputField badInField = new AxInputField(
- new AxReferenceKey(model.getTasks().get("task").getKey(), "BadInField"),
- new AxArtifactKey("NonExistantSchema", "0.0.1"));
- model.getTasks().get("task").getInputFields().put(badInField.getKey().getLocalName(), badInField);
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.INVALID, result.getValidationResult());
-
- model.getTasks().get("task").getInputFields().remove(badInField.getKey().getLocalName());
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.VALID, result.getValidationResult());
-
- final AxOutputField badOutField = new AxOutputField(
- new AxReferenceKey(model.getTasks().get("task").getKey(), "BadOutField"),
- new AxArtifactKey("NonExistantSchema", "0.0.1"));
- model.getTasks().get("task").getOutputFields().put(badOutField.getKey().getLocalName(), badOutField);
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.INVALID, result.getValidationResult());
-
- model.getTasks().get("task").getOutputFields().remove(badOutField.getKey().getLocalName());
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.VALID, result.getValidationResult());
-
model.getTasks().get("task").getContextAlbumReferences()
.add(new AxArtifactKey("NonExistantContextAlbum", "0.0.1"));
result = new AxValidationResult();
@@ -267,16 +239,6 @@ public class PolicyModelTest {
result = model.validate(result);
assertEquals(ValidationResult.VALID, result.getValidationResult());
- model.getTasks().get("task").getInputFields().put(badInField.getKey().getLocalName(), badInField);
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.INVALID, result.getValidationResult());
-
- model.getTasks().get("task").getInputFields().remove(badInField.getKey().getLocalName());
- result = new AxValidationResult();
- result = model.validate(result);
- assertEquals(ValidationResult.VALID, result.getValidationResult());
-
model.getPolicies().get("policy").getStateMap().get("state").setTaskSelectionLogic(savedTaskSelectionLogic);
result = new AxValidationResult();
result = model.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
index 95266acc8..89dc9a048 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
@@ -25,7 +25,6 @@ package org.onap.policy.apex.model.policymodel.concepts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.util.Map;
import java.util.TreeMap;
@@ -36,9 +35,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
-import org.onap.policy.apex.model.eventmodel.concepts.AxField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
/**
* Test policy tasks.
@@ -49,19 +45,15 @@ public class TasksTest {
@Test
public void testTasks() {
- final TreeMap<String, AxInputField> ifEmptyMap = new TreeMap<>();
- final TreeMap<String, AxOutputField> ofEmptyMap = new TreeMap<>();
final TreeMap<String, AxTaskParameter> tpEmptyMap = new TreeMap<>();
final TreeSet<AxArtifactKey> ctxtEmptySet = new TreeSet<>();
- final TreeMap<String, AxInputField> ifMap = new TreeMap<>();
- final TreeMap<String, AxOutputField> ofMap = new TreeMap<>();
final TreeMap<String, AxTaskParameter> tpMap = new TreeMap<>();
final TreeSet<AxArtifactKey> ctxtSet = new TreeSet<>();
assertNotNull(new AxTask());
assertNotNull(new AxTask(new AxArtifactKey()));
- assertNotNull(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic()));
+ assertNotNull(new AxTask(new AxArtifactKey(), tpMap, ctxtSet, new AxTaskLogic()));
final AxTask task = new AxTask();
@@ -70,40 +62,15 @@ public class TasksTest {
assertEquals("TaskName:0.0.1", task.getKey().getId());
assertEquals("TaskName:0.0.1", task.getKeys().get(0).getId());
- final AxArtifactKey f0SchemaKey = new AxArtifactKey("FS0", "0.0.1");
-
- final AxInputField if0 = new AxInputField(new AxReferenceKey(taskKey, "IF0"), f0SchemaKey, false);
- final AxInputField if1 = new AxInputField(new AxReferenceKey(taskKey, "IF1"), f0SchemaKey, false);
- final AxOutputField of0 = new AxOutputField(new AxReferenceKey(taskKey, "OF0"), f0SchemaKey, false);
- final AxOutputField of1 = new AxOutputField(new AxReferenceKey(taskKey, "OF1"), f0SchemaKey, false);
final AxTaskParameter tp0 = new AxTaskParameter(new AxReferenceKey(taskKey, "TP0"), "DefaultValue");
final AxArtifactKey cr0 = new AxArtifactKey("ContextReference", "0.0.1");
final AxTaskLogic tl = new AxTaskLogic(taskKey, "LogicName", "LogicFlavour", "Logic");
- ifMap.put(if0.getKey().getLocalName(), if0);
- ofMap.put(of0.getKey().getLocalName(), of0);
tpMap.put(tp0.getKey().getLocalName(), tp0);
ctxtSet.add(cr0);
- task.setInputFields(ifMap);
- assertEquals(ifMap, task.getInputFields());
- assertTrue(task.getInputFieldSet().contains(if0));
- assertTrue(task.getRawInputFields().keySet().contains(if0.getKey().getLocalName()));
-
- task.setOutputFields(ofMap);
- assertEquals(ofMap, task.getOutputFields());
- assertTrue(task.getOutputFieldSet().contains(of0));
- assertTrue(task.getRawOutputFields().keySet().contains(of0.getKey().getLocalName()));
task.setInputEvent(new AxEvent());
task.setOutputEvents(Map.of("Event", new AxEvent()));
- final TreeMap<String, AxField> ifDupMap = new TreeMap<>();
- final TreeMap<String, AxField> ofDupMap = new TreeMap<>();
- ifDupMap.put(if1.getKey().getLocalName(), if1);
- ofDupMap.put(of1.getKey().getLocalName(), of1);
- task.duplicateInputFields(ifDupMap);
- task.duplicateOutputFields(ofDupMap);
- assertTrue(ifMap.containsKey("IF1"));
- assertTrue(ofMap.containsKey("OF1"));
task.setTaskParameters(tpMap);
assertEquals(tpMap, task.getTaskParameters());
@@ -188,25 +155,23 @@ public class TasksTest {
assertEquals(task, clonedTask);
assertNotNull(task);
assertNotEquals(task, (Object) "Hello");
- assertNotEquals(task, new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl));
- assertNotEquals(task, new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl));
- assertNotEquals(task, new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl));
- assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl));
- assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl));
- assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic()));
- assertEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(new AxArtifactKey(), tpMap, ctxtSet, tl));
+ assertEquals(task, new AxTask(taskKey, tpMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, tpEmptyMap, ctxtSet, tl));
+ assertNotEquals(task, new AxTask(taskKey, tpMap, ctxtEmptySet, tl));
+ assertNotEquals(task, new AxTask(taskKey, tpMap, ctxtSet, new AxTaskLogic()));
+ assertEquals(task, new AxTask(taskKey, tpMap, ctxtSet, tl));
assertEquals(0, task.compareTo(task));
assertEquals(0, task.compareTo(clonedTask));
assertNotEquals(0, task.compareTo(new AxArtifactKey()));
assertNotEquals(0, task.compareTo(null));
- assertNotEquals(0, task.compareTo(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl)));
- assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl)));
- assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl)));
- assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl)));
- assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl)));
- assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic())));
- assertEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl)));
+ assertNotEquals(0, task.compareTo(new AxTask(new AxArtifactKey(), tpMap, ctxtSet, tl)));
+ assertEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, tl)));
+ assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpEmptyMap, ctxtSet, tl)));
+ assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtEmptySet, tl)));
+ assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, new AxTaskLogic())));
+ assertEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, tl)));
assertNotNull(task.getKeys());
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
index 3192079d7..3e3051021 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,19 +113,7 @@ public class ApexPolicyModelTest {
+ "org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n"
+ "AxArtifactKey:(name=contextAlbum1,version=0.0.1):"
+ "org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n"
- + "AxReferenceKey:"
- + "(parentKeyName=policy,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=state):"
- + "org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel:INVALID:"
- + "task output field AxOutputField:(key=AxReferenceKey:"
- + "(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0),"
- + "fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false) for task "
- + "task:0.0.1 not in output event outEvent0:0.0.1\n" + "AxReferenceKey:"
- + "(parentKeyName=policy,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=state):"
- + "org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel:INVALID:"
- + "task output field AxOutputField:(key=AxReferenceKey:"
- + "(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1),"
- + "fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false) for task "
- + "task:0.0.1 not in output event outEvent0:0.0.1\n" + "********************************";
+ + "********************************";
private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n"
+ "AxArtifactKey:(name=policyModel_KeyInfo,version=0.0.1):"
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
index 3ff85c898..b1e2d5cbd 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,8 +51,8 @@ public class PolicyAnalyserTest {
private static final String EXPECTED_ANALYSIS_RESULT = "" + "Context Schema usage\n" + " MapType:0.0.1\n"
+ " contextAlbum0:0.0.1\n" + " StringType:0.0.1\n" + " contextAlbum1:0.0.1\n"
+ " eventContextItem0:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n" + " outEvent1:0.0.1\n"
- + " task:0.0.1\n" + " eventContextItem1:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n"
- + " outEvent1:0.0.1\n" + " task:0.0.1\n" + "Context Album usage\n" + " contextAlbum0:0.0.1\n"
+ + " eventContextItem1:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n"
+ + " outEvent1:0.0.1\n" + "Context Album usage\n" + " contextAlbum0:0.0.1\n"
+ " task:0.0.1\n" + " policy:0.0.1:NULL:state\n" + " contextAlbum1:0.0.1\n" + " task:0.0.1\n"
+ " policy:0.0.1:NULL:state\n" + "Event usage\n" + " inEvent:0.0.1\n" + " policy:0.0.1:NULL:state\n"
+ " outEvent0:0.0.1\n" + " policy:0.0.1:NULL:state\n" + " outEvent1:0.0.1 (unused)\n" + "Task usage\n"
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java
index ea2de8603..85040221a 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java
@@ -36,8 +36,6 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
import org.onap.policy.apex.model.eventmodel.concepts.AxField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
-import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicies;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicy;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
@@ -117,27 +115,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol
final AxTask task = new AxTask(new AxArtifactKey("task", "0.0.1"));
- for (final AxField field : inEvent.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "inputFields", field.getKey().getLocalName());
- final AxInputField inputField = new AxInputField(fieldkey, field.getSchema());
- task.getInputFields().put(inputField.getKey().getLocalName(), inputField);
- }
-
- for (final AxField field : outEvent0.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "outputFields", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema());
- task.getOutputFields().put(outputField.getKey().getLocalName(), outputField);
- }
-
- for (final AxField field : outEvent1.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "outputFields", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema());
- task.getOutputFields().put(outputField.getKey().getLocalName(), outputField);
- }
-
task.setInputEvent(inEvent);
task.setOutputEvents(Map.of(outEvent0.getId(), outEvent0, outEvent1.getId(), outEvent1));
@@ -271,27 +248,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol
final AxTask task = new AxTask(new AxArtifactKey("taskA", "0.0.1"));
- for (final AxField field : inEvent.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "inputFieldsA", field.getKey().getLocalName());
- final AxInputField inputField = new AxInputField(fieldkey, field.getSchema());
- task.getInputFields().put(inputField.getKey().getLocalName(), inputField);
- }
-
- for (final AxField field : outEvent0.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "outputFieldsA", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema());
- task.getOutputFields().put(outputField.getKey().getLocalName(), outputField);
- }
-
- for (final AxField field : outEvent1.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(),
- "outputFieldsA", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema());
- task.getOutputFields().put(outputField.getKey().getLocalName(), outputField);
- }
-
task.setInputEvent(inEvent);
task.setOutputEvents(Map.of(outEvent0.getId(), outEvent0, outEvent1.getId(), outEvent1));
@@ -400,20 +356,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol
final AxTask anotherTask = new AxTask(new AxArtifactKey("anotherTask", "0.0.1"));
- for (final AxField field : inEvent.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(anotherTask.getKey().getName(),
- anotherTask.getKey().getVersion(), "inputFields", field.getKey().getLocalName());
- final AxInputField inputField = new AxInputField(fieldkey, field.getSchema());
- anotherTask.getInputFields().put(inputField.getKey().getLocalName(), inputField);
- }
-
- for (final AxField field : outEvent0.getFields()) {
- final AxReferenceKey fieldkey = new AxReferenceKey(anotherTask.getKey().getName(),
- anotherTask.getKey().getVersion(), "outputFields", field.getKey().getLocalName());
- final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema());
- anotherTask.getOutputFields().put(outputField.getKey().getLocalName(), outputField);
- }
-
anotherTask.setInputEvent(inEvent);
anotherTask.setOutputEvents(Map.of(outEvent0.getId(), outEvent0));
final AxTaskParameter taskPar0 = new AxTaskParameter(new AxReferenceKey(anotherTask.getKey(), "taskParameter0"),
diff --git a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt
index d3aad785e..7dd0b3955 100644
--- a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt
+++ b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt
@@ -33,7 +33,7 @@ left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtif
*** all right keys in left
*** all values in left and right are identical
*** list of identical entries in left and right
-key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),inputFields={IEPAR0=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), IEPAR1=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},outputFields={OE0PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE0PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false), OE1PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE1PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic))
+key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic))
*** policy differences ***
left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtifactKey:(name=PolicyModel,version=0.0.1)
*** all left keys in right
diff --git a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt
index f566a7e5f..149bec002 100644
--- a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt
+++ b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt
@@ -33,7 +33,7 @@ left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtif
*** all right keys in left
*** all values in left and right are identical
*** list of identical entries in left and right
-key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),inputFields={IEPAR0=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), IEPAR1=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},outputFields={OE0PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE0PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false), OE1PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE1PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic))
+key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic))
*** policy differences ***
left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtifactKey:(name=PolicyModel,version=0.0.1)
*** all left keys in right
@@ -66,4 +66,3 @@ key=AxArtifactKey:(name=policy,version=0.0.1),value=AxKeyInfo:(artifactId=AxArti
key=AxArtifactKey:(name=task,version=0.0.1),value=AxKeyInfo:(artifactId=AxArtifactKey:(name=task,version=0.0.1),uuid=0ce9168c-e6df-414f-9646-6da464b6e016,description=Generated description for concept referred to by key "task:0.0.1")
key=AxArtifactKey:(name=tasks,version=0.0.1),value=AxKeyInfo:(artifactId=AxArtifactKey:(name=tasks,version=0.0.1),uuid=0ce9168c-e6df-414f-9646-6da464b6e017,description=Generated description for concept referred to by key "tasks:0.0.1")
***********************************
-