summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-08 12:14:08 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-08 12:14:08 +0200
commit4c14395a640b3f0f1d0422b5ff7f840ebee8e92d (patch)
treec8c9db66e7bdcafbe4f2d9147c60475cea1a0daa
parent25f65d0f6bd061facf88dab5859ddef1926dfecc (diff)
Add Holmes to the Backend
Add support for Holmes boxes defined in GUI, Holmes model has been added and also policy calls. Change-Id: I2bbef0030b5174075792b459b7ced74aa2e8aad2 Issue-Id: CLAMP-27 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
-rw-r--r--src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java72
-rw-r--r--src/main/java/org/onap/clamp/clds/client/HolmesPolicyDeleteDelegate.java62
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/Holmes.java71
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/ModelBpmn.java28
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/ModelElement.java28
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/ModelProperties.java50
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/Policy.java22
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/ResourceGroup.java14
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/StringMatch.java18
-rw-r--r--src/main/java/org/onap/clamp/clds/model/prop/Tca.java20
-rw-r--r--src/main/java/org/onap/clamp/clds/transform/XslTransformer.java6
-rw-r--r--src/main/resources/bpmn/clds-process-action.bpmn199
-rw-r--r--src/main/resources/xsl/clds-bpmn-transformer.xsl14
-rw-r--r--src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java34
-rw-r--r--src/test/resources/example/modelBpmn.xml110
-rw-r--r--src/test/resources/example/xsl-validation/modelBpmn.xml156
-rw-r--r--src/test/resources/example/xsl-validation/modelBpmnForVerif.json38
17 files changed, 639 insertions, 303 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
new file mode 100644
index 000000000..db7b5241b
--- /dev/null
+++ b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.clamp.clds.client;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.onap.clamp.clds.model.prop.Holmes;
+import org.onap.clamp.clds.model.prop.ModelProperties;
+import org.onap.clamp.clds.model.refprop.RefProp;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * Send Holmes info to policy api.
+ */
+public class HolmesPolicyDelegate implements JavaDelegate {
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(HolmesPolicyDelegate.class);
+ protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+
+ @Autowired
+ private PolicyClient policyClient;
+
+ @Autowired
+ private RefProp refProp;
+
+ /**
+ * Perform activity. Send Holmes info to policy api.
+ *
+ * @param execution
+ */
+ @Override
+ public void execute(DelegateExecution execution) throws Exception {
+ String holmesPolicyRequestUuid = UUID.randomUUID().toString();
+ execution.setVariable("holmesPolicyRequestUuid", holmesPolicyRequestUuid);
+
+ ModelProperties prop = ModelProperties.create(execution);
+ Holmes holmes = prop.getType(Holmes.class);
+ if (holmes.isFound()) {
+ String responseMessage = policyClient.sendMicroServiceInJson(holmes.getCorrelationLogic(), prop,
+ holmesPolicyRequestUuid);
+ if (responseMessage != null) {
+ execution.setVariable("holmesPolicyResponseMessage", responseMessage.getBytes());
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDeleteDelegate.java b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDeleteDelegate.java
new file mode 100644
index 000000000..46b33ffea
--- /dev/null
+++ b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDeleteDelegate.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.clamp.clds.client;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.onap.clamp.clds.model.prop.Holmes;
+import org.onap.clamp.clds.model.prop.ModelProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * Delete Holmes Policy via policy api.
+ */
+public class HolmesPolicyDeleteDelegate implements JavaDelegate {
+ protected static final EELFLogger logger = EELFManager.getInstance()
+ .getLogger(HolmesPolicyDeleteDelegate.class);
+ protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+
+ @Autowired
+ private PolicyClient policyClient;
+
+ /**
+ * Perform activity. Delete Holmes Policy via policy api.
+ *
+ * @param execution
+ */
+ @Override
+ public void execute(DelegateExecution execution) throws Exception {
+ ModelProperties prop = ModelProperties.create(execution);
+ Holmes holmes = prop.getType(Holmes.class);
+ if (holmes.isFound()) {
+ prop.setCurrentModelElementId(holmes.getId());
+
+ policyClient.deleteMicrosService(prop);
+ }
+ }
+
+}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/Holmes.java b/src/main/java/org/onap/clamp/clds/model/prop/Holmes.java
new file mode 100644
index 000000000..233f656e1
--- /dev/null
+++ b/src/main/java/org/onap/clamp/clds/model/prop/Holmes.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.clamp.clds.model.prop;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * Parse Holmes bpmn parameters json properties.
+ * <p>
+ * Example json:
+ * [{"name":"correlationalLogic","value":"vcwx"},{"name":"operationalPolicy","value":"cccc"}]
+ *
+ */
+public class Holmes extends ModelElement {
+
+ private static final String TYPE_HOLMES = "holmes";
+
+ private String correlationLogic;
+
+ private String operationalPolicy;
+
+ /**
+ * Default constructor for Holmes Element
+ *
+ * @param modelProp
+ * The ModelProperties containing the all the info, like bpmn,
+ * bpmn params, etc ...
+ * @param modelBpmn
+ * @param modelJson
+ */
+ public Holmes(ModelProperties modelProp, ModelBpmn modelBpmn, JsonNode modelJson) {
+ super(TYPE_HOLMES, modelProp, modelBpmn, modelJson);
+
+ correlationLogic = this.getValueByName("correlationalLogic");
+ operationalPolicy = this.getValueByName("operationalPolicy");
+ }
+
+ public static final String getType() {
+ return TYPE_HOLMES;
+ }
+
+ public String getCorrelationLogic() {
+ return correlationLogic;
+ }
+
+ public String getOperationalPolicy() {
+ return operationalPolicy;
+ }
+
+}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/ModelBpmn.java b/src/main/java/org/onap/clamp/clds/model/prop/ModelBpmn.java
index 63a03058d..ae7028dcd 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/ModelBpmn.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/ModelBpmn.java
@@ -23,6 +23,15 @@
package org.onap.clamp.clds.model.prop;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -33,15 +42,6 @@ import java.util.Map.Entry;
import org.onap.clamp.clds.service.CldsService;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
/**
* Parse Model BPMN properties.
* <p>
@@ -50,9 +50,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
* :[{"id":"Policy_0oxeocn", "from":"StringMatch_0h6cbdv"}]}
*/
public class ModelBpmn {
- protected static final EELFLogger logger = EELFManager.getInstance()
+ protected static final EELFLogger logger = EELFManager.getInstance()
.getLogger(CldsService.class);
- protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+ protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
// for each type, an array of entries
private final Map<String, List<ModelBpmnEntry>> entriesByType = new HashMap<>();
@@ -123,12 +123,14 @@ public class ModelBpmn {
}
/**
- *
+ * This method verifies if the ModelElement Type (collector, holmes, tca,
+ * ...) is in the list.
*
* @param type
+ * A model Element type (tca, collector, ...)
* @return true if the element is found or false otherwise
*/
- public boolean getModelElementFound(String type) {
+ public boolean isModelElementTypeInList(String type) {
return entriesByType.get(type) != null;
}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/ModelElement.java b/src/main/java/org/onap/clamp/clds/model/prop/ModelElement.java
index 42d11f4b5..edf114261 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/ModelElement.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/ModelElement.java
@@ -32,20 +32,19 @@ import java.util.Iterator;
import java.util.List;
/**
- * Provide base ModelElement functionality.
+ * Provide base ModelElement functionality. Perform base parsing of properties
+ * for a ModelElement (such as, Collector, StringMatch, Policy, Tca, Holmes,
+ * ...)
*/
public abstract class ModelElement {
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(ModelElement.class);
protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
- public static final String TYPE_POLICY = "policy";
- public static final String TYPE_TCA = "tca";
-
private final String type;
private final ModelBpmn modelBpmn;
private final String id;
protected String topicPublishes;
- protected final JsonNode meNode;
+ protected final JsonNode modelElementJsonNode;
private boolean isFound;
private final ModelProperties modelProp;
@@ -64,12 +63,13 @@ public abstract class ModelElement {
this.modelProp = modelProp;
this.modelBpmn = modelBpmn;
this.id = modelBpmn.getId(type);
- this.meNode = modelJson.get(id);
- this.isFound = modelBpmn.getModelElementFound(type);
+ this.modelElementJsonNode = modelJson.get(id);
+ this.isFound = modelBpmn.isModelElementTypeInList(type);
}
/**
- * topicSubscribes is the topicPublishes of the from Model Element
+ * topicSubscribes is the topicPublishes of the from Model Element (the
+ * previous one in the chain).
*
* @return the topicSubscribes
*/
@@ -159,16 +159,14 @@ public abstract class ModelElement {
while (i.hasNext()) {
JsonNode node = i.next();
if (node.path("name").asText().equals(name)) {
- String value;
JsonNode vnode = node.path("value");
if (vnode.isArray()) {
// if array, assume value is in first element
- value = vnode.path(0).asText();
+ values.add(vnode.path(0).asText());
} else {
// otherwise, just return text
- value = vnode.asText();
+ values.add(vnode.asText());
}
- values.add(value);
}
}
}
@@ -241,7 +239,7 @@ public abstract class ModelElement {
* @return
*/
public String getValueByName(String name) {
- return getValueByName(meNode, name);
+ return getValueByName(modelElementJsonNode, name);
}
/**
@@ -252,7 +250,7 @@ public abstract class ModelElement {
* @return
*/
public Integer getIntValueByName(String name) {
- return getIntValueByName(meNode, name);
+ return getIntValueByName(modelElementJsonNode, name);
}
/**
@@ -263,7 +261,7 @@ public abstract class ModelElement {
* @return
*/
public List<String> getValuesByName(String name) {
- return getValuesByName(meNode, name);
+ return getValuesByName(modelElementJsonNode, name);
}
/**
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/ModelProperties.java b/src/main/java/org/onap/clamp/clds/model/prop/ModelProperties.java
index 1cfd46165..9684eea86 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/ModelProperties.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/ModelProperties.java
@@ -23,6 +23,12 @@
package org.onap.clamp.clds.model.prop;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
@@ -36,19 +42,13 @@ import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsModel;
import org.onap.clamp.clds.service.CldsService;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
/**
* Parse model properties.
*/
public class ModelProperties {
- protected static final EELFLogger logger = EELFManager.getInstance()
+ protected static final EELFLogger logger = EELFManager.getInstance()
.getLogger(CldsService.class);
- protected static final EELFLogger auditLogger = EELFManager.getInstance()
+ protected static final EELFLogger auditLogger = EELFManager.getInstance()
.getAuditLogger();
private ModelBpmn modelBpmn;
@@ -58,10 +58,9 @@ public class ModelProperties {
private final String controlName;
private final String actionCd;
// Flag indicate whether it is triggered by Validation Test button from UI
- private final boolean isTest;
+ private final boolean isTest;
private Global global;
- private Tca tca;
private final Map<String, ModelElement> modelElements = new ConcurrentHashMap<>();
@@ -93,8 +92,8 @@ public class ModelProperties {
* @throws JsonProcessingException
* @throws IOException
*/
- public ModelProperties(String modelName, String controlName, String actionCd, boolean isTest, String modelBpmnPropText,
- String modelPropText) throws IOException {
+ public ModelProperties(String modelName, String controlName, String actionCd, boolean isTest,
+ String modelBpmnPropText, String modelPropText) throws IOException {
this.modelName = modelName;
this.controlName = controlName;
this.actionCd = actionCd;
@@ -150,7 +149,7 @@ public class ModelProperties {
Global global = new Global(modelJson);
vfs = global.getResourceVf();
} catch (IOException e) {
- // VF is null
+ logger.warn("no VF found", e);
}
String vf = null;
if (vfs != null && !vfs.isEmpty()) {
@@ -168,13 +167,12 @@ public class ModelProperties {
* @throws IOException
*/
public static ModelProperties create(DelegateExecution execution) throws IOException {
- // String modelProp = (String) execution.getVariable("modelProp");
String modelProp = new String((byte[]) execution.getVariable("modelProp"));
String modelBpmnProp = (String) execution.getVariable("modelBpmnProp");
String modelName = (String) execution.getVariable("modelName");
String controlName = (String) execution.getVariable("controlName");
String actionCd = (String) execution.getVariable("actionCd");
- boolean isTest = (boolean)execution.getVariable("isTest");
+ boolean isTest = (boolean) execution.getVariable("isTest");
return new ModelProperties(modelName, controlName, actionCd, isTest, modelBpmnProp, modelProp);
}
@@ -303,12 +301,12 @@ public class ModelProperties {
return actionCd;
}
- /**
- * @return the isTest
- */
- public boolean isTest() {
- return isTest;
- }
+ /**
+ * @return the isTest
+ */
+ public boolean isTest() {
+ return isTest;
+ }
/**
* @return the isCreateRequest
@@ -352,14 +350,4 @@ public class ModelProperties {
String type = modelElementClasses.get(clazz);
return (type != null ? (T) modelElements.get(type) : null);
}
-
- /**
- * @return the tca
- */
- public Tca getTca() {
- if (tca == null) {
- tca = new Tca(this, modelBpmn, modelJson);
- }
- return tca;
- }
}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/Policy.java b/src/main/java/org/onap/clamp/clds/model/prop/Policy.java
index 6673af213..452af20cd 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/Policy.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/Policy.java
@@ -23,14 +23,14 @@
package org.onap.clamp.clds.model.prop;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.databind.JsonNode;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
/**
* Parse Policy json properties.
* <p>
@@ -49,12 +49,12 @@ import com.fasterxml.jackson.databind.JsonNode;
* "vf3RtPi"]}]]}]
*/
public class Policy extends ModelElement {
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Policy.class);
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Policy.class);
protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
- private List<PolicyChain> policyChains;
+ private List<PolicyChain> policyChains;
- private static final String TYPE_POLICY = "policy";
+ private static final String TYPE_POLICY = "policy";
/**
* Parse Policy given json node.
@@ -64,12 +64,12 @@ public class Policy extends ModelElement {
* @param modelJson
*/
public Policy(ModelProperties modelProp, ModelBpmn modelBpmn, JsonNode modelJson) {
- super(ModelElement.TYPE_POLICY, modelProp, modelBpmn, modelJson);
+ super(TYPE_POLICY, modelProp, modelBpmn, modelJson);
// process policies
- if (meNode != null) {
- Iterator<JsonNode> itr = meNode.elements();
- policyChains = new ArrayList<PolicyChain>();
+ if (modelElementJsonNode != null) {
+ Iterator<JsonNode> itr = modelElementJsonNode.elements();
+ policyChains = new ArrayList<>();
while (itr.hasNext()) {
policyChains.add(new PolicyChain(itr.next()));
}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/ResourceGroup.java b/src/main/java/org/onap/clamp/clds/model/prop/ResourceGroup.java
index de98333a1..6e986bb0e 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/ResourceGroup.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/ResourceGroup.java
@@ -23,14 +23,14 @@
package org.onap.clamp.clds.model.prop;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.databind.JsonNode;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
/**
* Parse Resource Group json properties.
*
@@ -63,8 +63,8 @@ import com.fasterxml.jackson.databind.JsonNode;
*/
public class ResourceGroup {
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(ResourceGroup.class);
- protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(ResourceGroup.class);
+ protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
private String groupNumber;
private String policyId;
@@ -84,7 +84,7 @@ public class ResourceGroup {
// process Server_Configurations
JsonNode serviceConfigurationsNode = node.get(node.size() - 1).get("serviceConfigurations");
Iterator<JsonNode> itr = serviceConfigurationsNode.elements();
- serviceConfigurations = new ArrayList<ServiceConfiguration>();
+ serviceConfigurations = new ArrayList<>();
while (itr.hasNext()) {
serviceConfigurations.add(new ServiceConfiguration(itr.next()));
}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/StringMatch.java b/src/main/java/org/onap/clamp/clds/model/prop/StringMatch.java
index b20db0aff..7fcc1b1b9 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/StringMatch.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/StringMatch.java
@@ -23,14 +23,12 @@
package org.onap.clamp.clds.model.prop;
+import com.fasterxml.jackson.databind.JsonNode;
+
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.databind.JsonNode;
-
/**
* Parse StringMatch json properties.
* <p>
@@ -62,12 +60,10 @@ import com.fasterxml.jackson.databind.JsonNode;
*
*/
public class StringMatch extends ModelElement {
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(StringMatch.class);
- protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
- private List<ResourceGroup> resourceGroups;
+ private List<ResourceGroup> resourceGroups;
- private static final String TYPE_STRING_MATCH = "stringMatch";
+ private static final String TYPE_STRING_MATCH = "stringMatch";
/**
* Parse StringMatch given json node.
@@ -79,9 +75,9 @@ public class StringMatch extends ModelElement {
super(TYPE_STRING_MATCH, modelProp, modelBpmn, modelJson);
// process Server_Configurations
- if (meNode != null) {
- Iterator<JsonNode> itr = meNode.elements();
- resourceGroups = new ArrayList<ResourceGroup>();
+ if (modelElementJsonNode != null) {
+ Iterator<JsonNode> itr = modelElementJsonNode.elements();
+ resourceGroups = new ArrayList<>();
while (itr.hasNext()) {
resourceGroups.add(new ResourceGroup(itr.next()));
}
diff --git a/src/main/java/org/onap/clamp/clds/model/prop/Tca.java b/src/main/java/org/onap/clamp/clds/model/prop/Tca.java
index b94f52304..6bc68e23d 100644
--- a/src/main/java/org/onap/clamp/clds/model/prop/Tca.java
+++ b/src/main/java/org/onap/clamp/clds/model/prop/Tca.java
@@ -23,14 +23,14 @@
package org.onap.clamp.clds.model.prop;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.databind.JsonNode;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
/**
* Parse Tca json properties.
*
@@ -50,12 +50,12 @@ import com.fasterxml.jackson.databind.JsonNode;
*/
public class Tca extends ModelElement {
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Tca.class);
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Tca.class);
protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
- private List<TcaItem> tcaItems;
+ private List<TcaItem> tcaItems;
- private static final String TYPE_TCA = "tca";
+ private static final String TYPE_TCA = "tca";
/**
* Parse Tca given json node
@@ -68,9 +68,9 @@ public class Tca extends ModelElement {
super(TYPE_TCA, modelProp, modelBpmn, modelJson);
// process Server_Configurations
- if (meNode != null) {
- Iterator<JsonNode> itr = meNode.elements();
- tcaItems = new ArrayList<TcaItem>();
+ if (modelElementJsonNode != null) {
+ Iterator<JsonNode> itr = modelElementJsonNode.elements();
+ tcaItems = new ArrayList<>();
while (itr.hasNext()) {
tcaItems.add(new TcaItem(itr.next()));
}
diff --git a/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java b/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
index d15f67c77..684bae3f6 100644
--- a/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
+++ b/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
@@ -34,6 +34,8 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+
/**
* XSL Transformer.
*/
@@ -43,7 +45,7 @@ public class XslTransformer {
public void setXslResourceName(String xslResourceName) throws TransformerConfigurationException {
TransformerFactory tfactory = TransformerFactory.newInstance();
- templates = tfactory.newTemplates(new StreamSource(TransformUtil.getResourceAsStream(xslResourceName)));
+ templates = tfactory.newTemplates(new StreamSource(ResourceFileUtil.getResourceAsStream(xslResourceName)));
}
/**
@@ -53,7 +55,7 @@ public class XslTransformer {
* @throws TransformerException
*/
public String doXslTransformToString(String xml) throws TransformerException {
- StringWriter output = new StringWriter(4000);
+ StringWriter output = new StringWriter(4096);
Transformer transformer = templates.newTransformer();
transformer.transform(new StreamSource(new StringReader(xml)), new StreamResult(output));
diff --git a/src/main/resources/bpmn/clds-process-action.bpmn b/src/main/resources/bpmn/clds-process-action.bpmn
index d9f8619cc..780162403 100644
--- a/src/main/resources/bpmn/clds-process-action.bpmn
+++ b/src/main/resources/bpmn/clds-process-action.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_-A31MBMpEea185sFktMJ7Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_-A31MBMpEea185sFktMJ7Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:collaboration id="_Collaboration_2">
<bpmn2:participant id="_Participant_2" name="Process Action" processRef="clds-process-action-wf" />
</bpmn2:collaboration>
@@ -13,26 +13,27 @@
<bpmn2:flowNodeRef>sendOpPolicyReqDistribute</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>StartEvent_1</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>ServiceTask_0x8ypxf</bpmn2:flowNodeRef>
- <bpmn2:flowNodeRef>sendStringMatchingReqDistribute</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sendTcaReqDistribute</bpmn2:flowNodeRef>
+ <bpmn2:flowNodeRef>sendStringMatchingReqDistribute</bpmn2:flowNodeRef>
+ <bpmn2:flowNodeRef>sendHolmesReqDistribute</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="Lane_5" name="Delete">
<bpmn2:flowNodeRef>sendStringMatchingReqDelete</bpmn2:flowNodeRef>
- <bpmn2:flowNodeRef>sendOpPolicyReqDelete</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sendTcaReqDelete</bpmn2:flowNodeRef>
+ <bpmn2:flowNodeRef>sendOpPolicyReqDelete</bpmn2:flowNodeRef>
+ <bpmn2:flowNodeRef>sendHolmesReqDelete</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="Lane_4" name="Update">
<bpmn2:flowNodeRef>sendOpPolicyReqUpdate</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sendStringMatchingReqUpdate</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sendTcaReqUpdate</bpmn2:flowNodeRef>
+ <bpmn2:flowNodeRef>sendHolmesReqUpdate</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="Lane_6" name="Stop">
<bpmn2:flowNodeRef>sendOpPolicyReqStop</bpmn2:flowNodeRef>
- <bpmn2:flowNodeRef>ServiceTask_0d5zgbw</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="Lane_7" name="Restart">
<bpmn2:flowNodeRef>sendOpPolicyReqRestart</bpmn2:flowNodeRef>
- <bpmn2:flowNodeRef>ServiceTask_04d5jlr</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:exclusiveGateway id="ExclusiveGateway_2">
@@ -69,34 +70,32 @@
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_3" targetRef="insEvent" />
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="sendStringMatchingReqDistribute" targetRef="sendTcaReqDistribute" />
<bpmn2:serviceTask id="sendOpPolicyReqDistribute" name="Send Operation Policy Request [Submit]" camunda:delegateExpression="${operationalPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_1rga27p</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1tu9g11</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="sendOpPolicyReqDistribute" targetRef="ExclusiveGateway_3" />
<bpmn2:serviceTask id="sendOpPolicyReqUpdate" name="Send Operation Policy Request [Update]" camunda:delegateExpression="${operationalPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_1kegg6u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ejpmee</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="sendStringMatchingReqUpdate" targetRef="sendTcaReqUpdate" />
<bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ExclusiveGateway_2" targetRef="sendStringMatchingReqUpdate">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${ actionCd == 'UPDATE' }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendOpPolicyReqUpdate" targetRef="ExclusiveGateway_3" />
<bpmn2:serviceTask id="sendOpPolicyReqStop" name="Send Operation Policy Request [Stop]" camunda:delegateExpression="${operationalPolicyDeleteDelegate}">
- <bpmn2:incoming>SequenceFlow_17snsdc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ExclusiveGateway_2" targetRef="ServiceTask_0d5zgbw">
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ExclusiveGateway_2" targetRef="sendOpPolicyReqStop">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${ actionCd == 'STOP' }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="sendOpPolicyReqStop" targetRef="ExclusiveGateway_3" />
<bpmn2:serviceTask id="sendOpPolicyReqRestart" name="Send Operation Policy Request [Restart]" camunda:delegateExpression="${operationalPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_188n2z7</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_2" targetRef="ServiceTask_04d5jlr">
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_2" targetRef="sendOpPolicyReqRestart">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${ actionCd == 'RESTART' }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="sendOpPolicyReqRestart" targetRef="ExclusiveGateway_3" />
@@ -122,43 +121,50 @@
<bpmn2:incoming>SequenceFlow_1xlfq66</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0w39hon</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_188n2z7" sourceRef="ServiceTask_04d5jlr" targetRef="sendOpPolicyReqRestart" />
- <bpmn2:serviceTask id="ServiceTask_04d5jlr" name="Send HighlandPark Service request to Policy[Restart]" camunda:delegateExpression="${highlandParkPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_188n2z7</bpmn2:outgoing>
+ <bpmn2:sequenceFlow id="SequenceFlow_1rga27p" sourceRef="sendTcaReqDistribute" targetRef="sendHolmesReqDistribute" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0tpegxf" sourceRef="sendTcaReqDelete" targetRef="sendHolmesReqDelete" />
+ <bpmn2:serviceTask id="sendTcaReqDelete" name="Send Tca Micro Service request to Policy [Delete]" camunda:delegateExpression="${tcaPolicyDeleteDelegate}">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0tpegxf</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_17snsdc" sourceRef="ServiceTask_0d5zgbw" targetRef="sendOpPolicyReqStop" />
- <bpmn2:serviceTask id="ServiceTask_0d5zgbw" name="Send HighlandPark Service request to Policy[Stop]" camunda:delegateExpression="${highlandParkPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17snsdc</bpmn2:outgoing>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kegg6u" sourceRef="sendTcaReqUpdate" targetRef="sendHolmesReqUpdate" />
+ <bpmn2:serviceTask id="sendTcaReqDistribute" name="Send Tca Micro Service request to Policy [Submit]" camunda:delegateExpression="${tcaPolicyDelegate}">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rga27p</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:serviceTask id="sendStringMatchingReqDistribute" name="Send String Match Micro Service request to Policy [Submit]" camunda:delegateExpression="${stringMatchPolicyDelegate}">
<bpmn2:incoming>SequenceFlow_0w39hon</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1rga27p" sourceRef="sendTcaReqDistribute" targetRef="sendOpPolicyReqDistribute" />
- <bpmn2:serviceTask id="sendTcaReqDistribute" name="Send Tca Micro Service request to Policy [Submit]" camunda:delegateExpression="${tcaPolicyDelegate}">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1rga27p</bpmn2:outgoing>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="sendStringMatchingReqDistribute" targetRef="sendTcaReqDistribute" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1tu9g11" sourceRef="sendHolmesReqDistribute" targetRef="sendOpPolicyReqDistribute" />
+ <bpmn2:serviceTask id="sendHolmesReqDistribute" name="Send Holmes Micro Service request to Policy [Submit]" camunda:delegateExpression="${holmesPolicyDelegate}">
+ <bpmn2:incoming>SequenceFlow_1rga27p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1tu9g11</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:serviceTask id="sendOpPolicyReqDelete" name="Send Operation Policy Request [Delete]" camunda:delegateExpression="${operationalPolicyDeleteDelegate}">
- <bpmn2:incoming>SequenceFlow_0tpegxf</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mtizad</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_0tpegxf" sourceRef="sendTcaReqDelete" targetRef="sendOpPolicyReqDelete" />
- <bpmn2:serviceTask id="sendTcaReqDelete" name="Send Tca Micro Service request to Policy [Delete]" camunda:delegateExpression="${tcaPolicyDeleteDelegate}">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0tpegxf</bpmn2:outgoing>
+ <bpmn2:serviceTask id="sendHolmesReqDelete" name="Send Holmes Micro Service request to Policy [Delete]" camunda:delegateExpression="${holmesPolicyDeleteDelegate}">
+ <bpmn2:incoming>SequenceFlow_0tpegxf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mtizad</bpmn2:outgoing>
</bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mtizad" sourceRef="sendHolmesReqDelete" targetRef="sendOpPolicyReqDelete" />
<bpmn2:serviceTask id="sendStringMatchingReqUpdate" name="Send String Match Micro Service request to Policy [Update]" camunda:delegateExpression="${stringMatchPolicyDelegate}">
<bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1kegg6u" sourceRef="sendTcaReqUpdate" targetRef="sendOpPolicyReqUpdate" />
<bpmn2:serviceTask id="sendTcaReqUpdate" name="Send Tca Micro Service request to Policy [Update]" camunda:delegateExpression="${tcaPolicyDelegate}">
<bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1kegg6u</bpmn2:outgoing>
</bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="sendStringMatchingReqUpdate" targetRef="sendTcaReqUpdate" />
+ <bpmn2:serviceTask id="sendHolmesReqUpdate" name="Send Holmes Micro Service request to Policy [Update]" camunda:delegateExpression="${holmesPolicyDelegate}">
+ <bpmn2:incoming>SequenceFlow_1kegg6u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ejpmee</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ejpmee" sourceRef="sendHolmesReqUpdate" targetRef="sendOpPolicyReqUpdate" />
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="_Collaboration_2">
@@ -175,16 +181,16 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_8" bpmnElement="sendStringMatchingReqDistribute">
- <dc:Bounds x="615" y="89" width="100" height="80" />
+ <dc:Bounds x="400" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_6" bpmnElement="sendOpPolicyReqDistribute">
<dc:Bounds x="912" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_8" targetElement="_BPMNShape_ServiceTask_6">
- <di:waypoint xsi:type="dc:Point" x="715" y="129" />
- <di:waypoint xsi:type="dc:Point" x="761" y="129" />
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_8" targetElement="ServiceTask_1r1brt6_di">
+ <di:waypoint xsi:type="dc:Point" x="500" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="881" y="192" width="6" height="6" />
+ <dc:Bounds x="624" y="192" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_7" bpmnElement="insEvent">
@@ -235,19 +241,19 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ServiceTask_6" targetElement="_BPMNShape_ExclusiveGateway_4">
- <di:waypoint xsi:type="dc:Point" x="1012" y="127" />
- <di:waypoint xsi:type="dc:Point" x="1052" y="125" />
- <di:waypoint xsi:type="dc:Point" x="1052" y="229" />
- <di:waypoint xsi:type="dc:Point" x="1104" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="1012" y="130" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="130" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="1104" y="233" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1049" y="192" width="6" height="6" />
+ <dc:Bounds x="1027" y="178.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_11" bpmnElement="sendStringMatchingReqDelete">
<dc:Bounds x="348" y="385" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_12" bpmnElement="sendOpPolicyReqDelete">
- <dc:Bounds x="645" y="385" width="100" height="80" />
+ <dc:Bounds x="831" y="385" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ServiceTask_11" targetElement="_BPMNShape_ServiceTask_12">
<di:waypoint xsi:type="dc:Point" x="448" y="425" />
@@ -260,22 +266,22 @@
<dc:Bounds x="30" y="484" width="1339" height="117" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_14" bpmnElement="sendStringMatchingReqUpdate">
- <dc:Bounds x="615" y="500" width="100" height="80" />
+ <dc:Bounds x="350" y="500" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_15" bpmnElement="sendOpPolicyReqUpdate">
<dc:Bounds x="912" y="500" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ServiceTask_14" targetElement="_BPMNShape_ServiceTask_15">
- <di:waypoint xsi:type="dc:Point" x="715" y="540" />
- <di:waypoint xsi:type="dc:Point" x="761" y="540" />
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ServiceTask_14" targetElement="ServiceTask_08pqhb3_di">
+ <di:waypoint xsi:type="dc:Point" x="450" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="540" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="887" y="540" width="6" height="6" />
+ <dc:Bounds x="580" y="540" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ExclusiveGateway_3" targetElement="_BPMNShape_ServiceTask_14">
<di:waypoint xsi:type="dc:Point" x="169" y="262" />
<di:waypoint xsi:type="dc:Point" x="169" y="540" />
- <di:waypoint xsi:type="dc:Point" x="615" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="350" y="540" />
<bpmndi:BPMNLabel>
<dc:Bounds x="139" y="398" width="90" height="6" />
</bpmndi:BPMNLabel>
@@ -283,10 +289,10 @@
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ServiceTask_15" targetElement="_BPMNShape_ExclusiveGateway_4">
<di:waypoint xsi:type="dc:Point" x="1012" y="539" />
<di:waypoint xsi:type="dc:Point" x="1058" y="538" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="230" />
- <di:waypoint xsi:type="dc:Point" x="1104" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="1104" y="233" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1055" y="381" width="6" height="6" />
+ <dc:Bounds x="1028" y="382.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_Lane_10" bpmnElement="Lane_6" isHorizontal="true">
@@ -297,11 +303,10 @@
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_3" targetElement="_BPMNShape_ServiceTask_16">
<di:waypoint xsi:type="dc:Point" x="169" y="262" />
- <di:waypoint xsi:type="dc:Point" x="169" y="658" />
- <di:waypoint xsi:type="dc:Point" x="553" y="659" />
- <di:waypoint xsi:type="dc:Point" x="615" y="659" />
+ <di:waypoint xsi:type="dc:Point" x="169" y="659" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="659" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="344" y="658" width="6" height="6" />
+ <dc:Bounds x="139" y="457.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ServiceTask_16" targetElement="_BPMNShape_ExclusiveGateway_4">
@@ -310,7 +315,7 @@
<di:waypoint xsi:type="dc:Point" x="1058" y="233" />
<di:waypoint xsi:type="dc:Point" x="1104" y="233" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1055" y="441" width="6" height="6" />
+ <dc:Bounds x="1028" y="442.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_Lane_11" bpmnElement="Lane_7" isHorizontal="true">
@@ -322,18 +327,18 @@
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_3" targetElement="_BPMNShape_ServiceTask_17">
<di:waypoint xsi:type="dc:Point" x="169" y="262" />
<di:waypoint xsi:type="dc:Point" x="169" y="775" />
- <di:waypoint xsi:type="dc:Point" x="615" y="775" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="775" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="285" y="775" width="6" height="6" />
+ <dc:Bounds x="139" y="515.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ServiceTask_17" targetElement="_BPMNShape_ExclusiveGateway_4">
<di:waypoint xsi:type="dc:Point" x="1012" y="775" />
<di:waypoint xsi:type="dc:Point" x="1058" y="775" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="232" />
- <di:waypoint xsi:type="dc:Point" x="1104" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="234" />
+ <di:waypoint xsi:type="dc:Point" x="1105" y="234" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1055" y="500" width="6" height="6" />
+ <dc:Bounds x="1028" y="501.5" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_3" targetElement="_BPMNShape_ServiceTask_11">
@@ -349,9 +354,9 @@
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0w39hon_di" bpmnElement="SequenceFlow_0w39hon">
<di:waypoint xsi:type="dc:Point" x="304" y="129" />
- <di:waypoint xsi:type="dc:Point" x="615" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="414.5" y="114" width="90" height="0" />
+ <dc:Bounds x="307" y="114" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1xlfq66_di" bpmnElement="SequenceFlow_1xlfq66">
@@ -362,56 +367,66 @@
<dc:Bounds x="184" y="170.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_188n2z7_di" bpmnElement="SequenceFlow_188n2z7">
- <di:waypoint xsi:type="dc:Point" x="715" y="775" />
- <di:waypoint xsi:type="dc:Point" x="912" y="775" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1rga27p_di" bpmnElement="SequenceFlow_1rga27p">
+ <di:waypoint xsi:type="dc:Point" x="646" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="729" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="768" y="750" width="90" height="20" />
+ <dc:Bounds x="642.5" y="104" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_04d5jlr_di" bpmnElement="ServiceTask_04d5jlr">
- <dc:Bounds x="615" y="735" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_1r1brt6_di" bpmnElement="sendTcaReqDistribute">
+ <dc:Bounds x="546" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17snsdc_di" bpmnElement="SequenceFlow_17snsdc">
- <di:waypoint xsi:type="dc:Point" x="715" y="659" />
- <di:waypoint xsi:type="dc:Point" x="912" y="659" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0tpegxf_di" bpmnElement="SequenceFlow_0tpegxf">
+ <di:waypoint xsi:type="dc:Point" x="596" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="425" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="768.5" y="634" width="90" height="20" />
+ <dc:Bounds x="585.5" y="400" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0d5zgbw_di" bpmnElement="ServiceTask_0d5zgbw">
- <dc:Bounds x="615" y="619" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_0y2gwy4_di" bpmnElement="sendTcaReqDelete">
+ <dc:Bounds x="495.71500000000003" y="385" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1rga27p_di" bpmnElement="SequenceFlow_1rga27p">
- <di:waypoint xsi:type="dc:Point" x="861" y="129" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1kegg6u_di" bpmnElement="SequenceFlow_1kegg6u">
+ <di:waypoint xsi:type="dc:Point" x="596" y="540" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="540" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="597" y="515" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_08pqhb3_di" bpmnElement="sendTcaReqUpdate">
+ <dc:Bounds x="496" y="500" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1a6a3ro_di" bpmnElement="sendHolmesReqDistribute">
+ <dc:Bounds x="729" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tu9g11_di" bpmnElement="SequenceFlow_1tu9g11">
+ <di:waypoint xsi:type="dc:Point" x="829" y="129" />
<di:waypoint xsi:type="dc:Point" x="912" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="841.5" y="119" width="90" height="20" />
+ <dc:Bounds x="870.5" y="108" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_1r1brt6_di" bpmnElement="sendTcaReqDistribute">
- <dc:Bounds x="760.715" y="89" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_1234ame_di" bpmnElement="sendHolmesReqDelete">
+ <dc:Bounds x="665" y="385" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0tpegxf_di" bpmnElement="SequenceFlow_0tpegxf">
- <di:waypoint xsi:type="dc:Point" x="596" y="425" />
- <di:waypoint xsi:type="dc:Point" x="645" y="425" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1mtizad_di" bpmnElement="SequenceFlow_1mtizad">
+ <di:waypoint xsi:type="dc:Point" x="765" y="425" />
+ <di:waypoint xsi:type="dc:Point" x="831" y="425" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="575.5" y="415" width="90" height="20" />
+ <dc:Bounds x="798" y="404" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0y2gwy4_di" bpmnElement="sendTcaReqDelete">
- <dc:Bounds x="495.71500000000003" y="385" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_17vvyrl_di" bpmnElement="sendHolmesReqUpdate">
+ <dc:Bounds x="688" y="500" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1kegg6u_di" bpmnElement="SequenceFlow_1kegg6u">
- <di:waypoint xsi:type="dc:Point" x="861" y="540" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0ejpmee_di" bpmnElement="SequenceFlow_0ejpmee">
+ <di:waypoint xsi:type="dc:Point" x="788" y="540" />
<di:waypoint xsi:type="dc:Point" x="912" y="540" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="841.5" y="530" width="90" height="20" />
+ <dc:Bounds x="850" y="519" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_08pqhb3_di" bpmnElement="sendTcaReqUpdate">
- <dc:Bounds x="761" y="500" width="100" height="80" />
- </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/src/main/resources/xsl/clds-bpmn-transformer.xsl b/src/main/resources/xsl/clds-bpmn-transformer.xsl
index 94af952fc..8a39be55a 100644
--- a/src/main/resources/xsl/clds-bpmn-transformer.xsl
+++ b/src/main/resources/xsl/clds-bpmn-transformer.xsl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
ONAP CLAMP
@@ -56,6 +56,18 @@
<xsl:for-each select="bpmn2:tCA" >
<xsl:call-template name="network-element" />
</xsl:for-each>
+ <xsl:text>],</xsl:text>
+
+ <xsl:text>"holmes":[</xsl:text>
+ <xsl:for-each select="bpmn2:holmes" >
+ <xsl:call-template name="network-element" />
+ </xsl:for-each>
+ <xsl:text>],</xsl:text>
+
+ <xsl:text>"vesCollector":[</xsl:text>
+ <xsl:for-each select="bpmn2:vesCollector" >
+ <xsl:call-template name="network-element" />
+ </xsl:for-each>
<xsl:text>]</xsl:text>
<xsl:text>}</xsl:text>
diff --git a/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java
new file mode 100644
index 000000000..8ee60e745
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java
@@ -0,0 +1,34 @@
+package org.onap.clamp.clds.transform;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import javax.xml.transform.TransformerException;
+
+import org.junit.Test;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.skyscreamer.jsonassert.JSONAssert;
+
+public class XslTransformerTest {
+
+ /**
+ * This test validates the XSLT to convert BPMN xml to BPMN JSON.
+ *
+ * @throws TransformerException
+ * In case of issues
+ * @throws IOException
+ * In case of issues
+ */
+ @Test
+ public void xslTransformTest() throws TransformerException, IOException {
+ XslTransformer xslTransformer = new XslTransformer();
+ xslTransformer.setXslResourceName("xsl/clds-bpmn-transformer.xsl");
+
+ String bpmnJson = xslTransformer
+ .doXslTransformToString(ResourceFileUtil.getResourceAsString("example/xsl-validation/modelBpmn.xml"));
+ assertNotNull(bpmnJson);
+ JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("example/xsl-validation/modelBpmnForVerif.json"),
+ bpmnJson, true);
+ }
+}
diff --git a/src/test/resources/example/modelBpmn.xml b/src/test/resources/example/modelBpmn.xml
deleted file mode 100644
index d84f79041..000000000
--- a/src/test/resources/example/modelBpmn.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- ONAP CLAMP
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. 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.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END============================================
- ===================================================================
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
- -->
-
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
- <bpmn:process id="Process_1" isExecutable="false">
- <bpmn:startEvent id="StartEvent_1">
- <bpmn:outgoing>SequenceFlow_0ex3w2w</bpmn:outgoing>
- </bpmn:startEvent>
- <bpmn:collector id="Collector_">
- <bpmn:incoming>SequenceFlow_0ex3w2w</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_185iyma</bpmn:outgoing>
- </bpmn:collector>
- <bpmn:stringMatch id="StringMatch_">
- <bpmn:incoming>SequenceFlow_185iyma</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_092429t</bpmn:outgoing>
- </bpmn:stringMatch>
- <bpmn:policy id="Policy_">
- <bpmn:incoming>SequenceFlow_092429t</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0hghw7g</bpmn:outgoing>
- </bpmn:policy>
- <bpmn:tCA id="TCA_">
- <bpmn:incoming>SequenceFlow_08j3fsl</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0hghw7g</bpmn:outgoing>
- </bpmn:tCA>
- <bpmn:endEvent id="EndEvent_0lg612k">
- <bpmn:incoming>SequenceFlow_0hghw7g</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0ex3w2w" sourceRef="StartEvent_1" targetRef="Collector_" />
- <bpmn:sequenceFlow id="SequenceFlow_185iyma" sourceRef="Collector_" targetRef="StringMatch_" />
- <bpmn:sequenceFlow id="SequenceFlow_092429t" sourceRef="StringMatch_" targetRef="Policy_" />
- <bpmn:sequenceFlow id="SequenceFlow_0hghw7g" sourceRef="Policy_" targetRef="EndEvent_0lg612k" />
- </bpmn:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
- <dc:Bounds x="60" y="25" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="33" y="61" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="Collector__di" bpmnElement="Collector_">
- <dc:Bounds x="169" y="140" width="120" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StringMatch__di" bpmnElement="StringMatch_">
- <dc:Bounds x="578" y="140" width="120" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="Policy__di" bpmnElement="Policy_">
- <dc:Bounds x="768" y="140" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0lg612k_di" bpmnElement="EndEvent_0lg612k">
- <dc:Bounds x="949" y="162" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="922" y="198" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ex3w2w_di" bpmnElement="SequenceFlow_0ex3w2w">
- <di:waypoint xsi:type="dc:Point" x="96" y="43" />
- <di:waypoint xsi:type="dc:Point" x="128" y="43" />
- <di:waypoint xsi:type="dc:Point" x="128" y="180" />
- <di:waypoint xsi:type="dc:Point" x="169" y="180" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="83" y="101.5" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_185iyma_di" bpmnElement="SequenceFlow_185iyma">
- <di:waypoint xsi:type="dc:Point" x="500" y="180" />
- <di:waypoint xsi:type="dc:Point" x="578" y="180" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="494" y="170" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_092429t_di" bpmnElement="SequenceFlow_092429t">
- <di:waypoint xsi:type="dc:Point" x="698" y="180" />
- <di:waypoint xsi:type="dc:Point" x="768" y="180" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="688" y="170" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0hghw7g_di" bpmnElement="SequenceFlow_0hghw7g">
- <di:waypoint xsi:type="dc:Point" x="868" y="180" />
- <di:waypoint xsi:type="dc:Point" x="907" y="180" />
- <di:waypoint xsi:type="dc:Point" x="907" y="180" />
- <di:waypoint xsi:type="dc:Point" x="949" y="180" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="862" y="170" width="90" height="20" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn:definitions>
diff --git a/src/test/resources/example/xsl-validation/modelBpmn.xml b/src/test/resources/example/xsl-validation/modelBpmn.xml
new file mode 100644
index 000000000..3021902c7
--- /dev/null
+++ b/src/test/resources/example/xsl-validation/modelBpmn.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
+ <bpmn:process id="Process_1" isExecutable="false">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1nvvr00</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:stringMatch id="StringMatch_0tw2y4f">
+ <bpmn:incoming>SequenceFlow_0qf2552</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1a2oxpd</bpmn:outgoing>
+ </bpmn:stringMatch>
+ <bpmn:vesCollector id="VesCollector_1kxjxy6" name="AAAAA">
+ <bpmn:incoming>SequenceFlow_0jeu0gv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15gkgs5</bpmn:outgoing>
+ </bpmn:vesCollector>
+ <bpmn:collector id="Collector_">
+ <bpmn:incoming>SequenceFlow_1nvvr00</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0qf2552</bpmn:outgoing>
+ </bpmn:collector>
+ <bpmn:tCA id="TCA_09hcdsx">
+ <bpmn:incoming>SequenceFlow_15gkgs5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ev75ss</bpmn:outgoing>
+ </bpmn:tCA>
+ <bpmn:policy id="Policy_">
+ <bpmn:incoming>SequenceFlow_0ev75ss</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_103hvmr</bpmn:outgoing>
+ </bpmn:policy>
+ <bpmn:endEvent id="EndEvent_0zjiuu5">
+ <bpmn:incoming>SequenceFlow_103hvmr</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:holmes id="Holmes_1fzdqp9">
+ <bpmn:incoming>SequenceFlow_1a2oxpd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0jeu0gv</bpmn:outgoing>
+ </bpmn:holmes>
+ <bpmn:sequenceFlow id="SequenceFlow_1nvvr00"
+ sourceRef="StartEvent_1" targetRef="Collector_" />
+ <bpmn:sequenceFlow id="SequenceFlow_0qf2552"
+ sourceRef="Collector_" targetRef="StringMatch_0tw2y4f" />
+ <bpmn:sequenceFlow id="SequenceFlow_1a2oxpd"
+ sourceRef="StringMatch_0tw2y4f" targetRef="Holmes_1fzdqp9" />
+ <bpmn:sequenceFlow id="SequenceFlow_0jeu0gv"
+ sourceRef="Holmes_1fzdqp9" targetRef="VesCollector_1kxjxy6" />
+ <bpmn:sequenceFlow id="SequenceFlow_15gkgs5"
+ sourceRef="VesCollector_1kxjxy6" targetRef="TCA_09hcdsx" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ev75ss"
+ sourceRef="TCA_09hcdsx" targetRef="Policy_" />
+ <bpmn:sequenceFlow id="SequenceFlow_103hvmr"
+ sourceRef="Policy_" targetRef="EndEvent_0zjiuu5" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2"
+ bpmnElement="StartEvent_1">
+ <dc:Bounds x="50" y="162" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StringMatch_0tw2y4f_di"
+ bpmnElement="StringMatch_0tw2y4f">
+ <dc:Bounds x="324" y="192" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="VesCollector_1kxjxy6_di"
+ bpmnElement="VesCollector_1kxjxy6">
+ <dc:Bounds x="492" y="192" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Collector__di" bpmnElement="Collector_">
+ <dc:Bounds x="159" y="206" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="TCA_09hcdsx_di" bpmnElement="TCA_09hcdsx">
+ <dc:Bounds x="651" y="192" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Policy__di" bpmnElement="Policy_">
+ <dc:Bounds x="844" y="206" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0zjiuu5_di"
+ bpmnElement="EndEvent_0zjiuu5">
+ <dc:Bounds x="703" y="396" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="676" y="432" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="Holmes_1fzdqp9_di"
+ bpmnElement="Holmes_1fzdqp9">
+ <dc:Bounds x="358" y="74" width="120" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1nvvr00_di"
+ bpmnElement="SequenceFlow_1nvvr00">
+ <di:waypoint xsi:type="dc:Point" x="86" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="123" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="123" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="78" y="203" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qf2552_di"
+ bpmnElement="SequenceFlow_0qf2552">
+ <di:waypoint xsi:type="dc:Point" x="279" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="324" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="257" y="229" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a2oxpd_di"
+ bpmnElement="SequenceFlow_1a2oxpd">
+ <di:waypoint xsi:type="dc:Point" x="384" y="192" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="154" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="356" y="163" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jeu0gv_di"
+ bpmnElement="SequenceFlow_0jeu0gv">
+ <di:waypoint xsi:type="dc:Point" x="418" y="154" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="173" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="192" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="163" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15gkgs5_di"
+ bpmnElement="SequenceFlow_15gkgs5">
+ <di:waypoint xsi:type="dc:Point" x="612" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="232" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="586.5" y="222" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ev75ss_di"
+ bpmnElement="SequenceFlow_0ev75ss">
+ <di:waypoint xsi:type="dc:Point" x="771" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="808" y="232" />
+ <di:waypoint xsi:type="dc:Point" x="808" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="844" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="229" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_103hvmr_di"
+ bpmnElement="SequenceFlow_103hvmr">
+ <di:waypoint xsi:type="dc:Point" x="844" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="792" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="792" y="414" />
+ <di:waypoint xsi:type="dc:Point" x="739" y="414" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="320" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/src/test/resources/example/xsl-validation/modelBpmnForVerif.json b/src/test/resources/example/xsl-validation/modelBpmnForVerif.json
new file mode 100644
index 000000000..1bef49a1a
--- /dev/null
+++ b/src/test/resources/example/xsl-validation/modelBpmnForVerif.json
@@ -0,0 +1,38 @@
+{
+ "collector": [
+ {
+ "id": "Collector_",
+ "from": "StartEvent_1"
+ }
+ ],
+ "stringMatch": [
+ {
+ "id": "StringMatch_0tw2y4f",
+ "from": "Collector_"
+ }
+ ],
+ "policy": [
+ {
+ "id": "Policy_",
+ "from": "TCA_09hcdsx"
+ }
+ ],
+ "tca": [
+ {
+ "id": "TCA_09hcdsx",
+ "from": "VesCollector_1kxjxy6"
+ }
+ ],
+ "vesCollector": [
+ {
+ "id": "VesCollector_1kxjxy6",
+ "from": "Holmes_1fzdqp9"
+ }
+ ],
+ "holmes": [
+ {
+ "id": "Holmes_1fzdqp9",
+ "from": "StringMatch_0tw2y4f"
+ }
+ ]
+} \ No newline at end of file