BPMN applications not deployed properly 13/13613/2
authorRob Daugherty <rd472p@att.com>
Tue, 19 Sep 2017 22:08:26 +0000 (18:08 -0400)
committerRob Daugherty <rd472p@att.com>
Tue, 19 Sep 2017 22:15:31 +0000 (18:15 -0400)
Since the 1710 MSO merge the following problems exist:

The workflow applications are not deployed properly.

I've also fixed a few small issues with the CreateCustomE2EServiceInstance
flows that prevented them from being deployed.

Change-Id: Ia4f7a6de87abbc99e80c0e9083e2175cdf9b4fe5
Issue-id: SO-148
Signed-off-by: Rob Daugherty <rd472p@att.com>
13 files changed:
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java [new file with mode: 0644]
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml

diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
new file mode 100644 (file)
index 0000000..2492839
--- /dev/null
@@ -0,0 +1,32 @@
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP - SO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package org.openecomp.mso.bpmn.common.workflow.service;\r
+\r
+import org.camunda.bpm.engine.ProcessEngineServices;\r
+import org.camunda.bpm.engine.ProcessEngines;\r
+\r
+\r
+public class WorkflowAsyncCommonResource extends WorkflowAsyncResource {\r
+\r
+    protected ProcessEngineServices getProcessEngineServices() {\r
+        return pes4junit.orElse(ProcessEngines.getProcessEngine("common"));\r
+    }\r
+}\r
index 9787ec0..4f62112 100644 (file)
@@ -21,6 +21,8 @@ package org.openecomp.mso.bpmn.common.workflow.service;
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
+import java.util.Objects;\r
+import java.util.Optional;\r
 import java.util.UUID;\r
 \r
 import javax.ws.rs.Consumes;\r
@@ -31,7 +33,6 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;\r
 \r
 import org.camunda.bpm.engine.ProcessEngineServices;\r
-import org.camunda.bpm.engine.ProcessEngines;\r
 import org.camunda.bpm.engine.RuntimeService;\r
 import org.camunda.bpm.engine.runtime.ProcessInstance;\r
 import org.camunda.bpm.engine.variable.impl.VariableMapImpl;\r
@@ -52,15 +53,15 @@ import org.slf4j.MDC;
  * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process\r
  */\r
 @Path("/async")\r
-public class WorkflowAsyncResource {\r
+public abstract class WorkflowAsyncResource {
 \r
-       private WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();\r
-       protected ProcessEngineServices pes4junit = null;\r
+       private static final WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();\r
+       protected Optional<ProcessEngineServices> pes4junit = Optional.empty();\r
 \r
-       private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
+       private final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
 \r
        private static final String logMarker = "[WRKFLOW-RESOURCE]";\r
-       private static final int DEFAULT_WAIT_TIME = 30000;     //default wait time\r
+       private static final long DEFAULT_WAIT_TIME = 30000;    //default wait time\r
        \r
        /**\r
         * Asynchronous JAX-RS method that starts a process instance.\r
@@ -75,7 +76,6 @@ public class WorkflowAsyncResource {
        public void startProcessInstanceByKey(final @Suspend(180000) AsynchronousResponse asyncResponse,\r
                        @PathParam("processKey") String processKey, VariableMapImpl variableMap) {\r
        \r
-               WorkflowResponse response = new WorkflowResponse();\r
                long startTime = System.currentTimeMillis();\r
                Map<String, Object> inputVariables = null;\r
                WorkflowContext workflowContext = null;\r
@@ -107,6 +107,7 @@ public class WorkflowAsyncResource {
                        }\r
 \r
                        msoLogger.debug(logMarker + "Exception in startProcessInstance by key");\r
+               WorkflowResponse response = new WorkflowResponse();\r
                        response.setMessage("Fail" );\r
                        response.setResponse("Error occurred while executing the process: " + e);\r
                        response.setMessageCode(500);\r
@@ -205,29 +206,28 @@ public class WorkflowAsyncResource {
                return contextHolder.processCallback(processKey, processInstanceId, requestId, callbackResponse);\r
        }\r
        \r
+    private static String getOrCreate(Map<String, Object> inputVariables, String key) {\r
+        String value = Objects.toString(inputVariables.get(key), null);\r
+        if (value == null) {\r
+            value = UUID.randomUUID().toString();\r
+            inputVariables.put(key, value);\r
+        }\r
+        return value;\r
+    }\r
+       \r
        // Note: the business key is used to identify the process in unit tests\r
-       private String getBusinessKey(Map<String, Object> inputVariables) {\r
-               Object businessKey = inputVariables.get("mso-business-key");\r
-               if (businessKey == null ) {\r
-                       businessKey = UUID.randomUUID().toString();\r
-                       inputVariables.put("mso-business-key",  businessKey);\r
-               }\r
-               return businessKey.toString();\r
+       private static String getBusinessKey(Map<String, Object> inputVariables) {\r
+        return getOrCreate(inputVariables, "mso-business-key");\r
        }\r
 \r
-       private String getRequestId(Map<String, Object> inputVariables) {\r
-               Object requestId = inputVariables.get("mso-request-id");\r
-               if (requestId == null ) {\r
-                       requestId = UUID.randomUUID().toString();\r
-                       inputVariables.put("mso-request-id",  requestId);\r
-               } \r
-               return requestId.toString();\r
+       private static String getRequestId(Map<String, Object> inputVariables) {\r
+        return getOrCreate(inputVariables, "mso-request-id");\r
        }\r
 \r
        private long getWaitTime(Map<String, Object> inputVariables)\r
        {\r
-               String timeout = inputVariables.get("mso-service-request-timeout") == null\r
-                               ? null : inputVariables.get("mso-service-request-timeout").toString();          \r
+           \r
+               String timeout = Objects.toString(inputVariables.get("mso-service-request-timeout"), null);\r
 \r
                if (timeout != null) {\r
                        try {\r
@@ -252,7 +252,7 @@ public class WorkflowAsyncResource {
                \r
        }\r
 \r
-       private void setLogContext(String processKey,\r
+       private static void setLogContext(String processKey,\r
                        Map<String, Object> inputVariables) {\r
                MsoLogger.setServiceName("MSO." + processKey);\r
                if (inputVariables != null) {\r
@@ -260,32 +260,24 @@ public class WorkflowAsyncResource {
                }\r
        }\r
 \r
-       private String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {\r
+       private static String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {\r
                if (inputVariables == null) return "";\r
-               Object requestId = inputVariables.get(key);\r
-               if (requestId != null) return requestId.toString();\r
-               return "N/A";\r
+               return Objects.toString(inputVariables.get(key), "N/A");\r
        }\r
 \r
        private boolean isProcessEnded(String processInstanceId) {\r
                ProcessEngineServices pes = getProcessEngineServices();\r
-               return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;                \r
+               return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null;\r
        }\r
        \r
        \r
-       protected ProcessEngineServices getProcessEngineServices() {\r
-               if (pes4junit == null) {\r
-                       return ProcessEngines.getDefaultProcessEngine();\r
-               } else {\r
-                       return pes4junit;\r
-               }\r
-       }\r
+       protected abstract ProcessEngineServices getProcessEngineServices();
        \r
        public void setProcessEngineServices4junit(ProcessEngineServices pes) {\r
-               pes4junit = pes;\r
+               pes4junit = Optional.ofNullable(pes);\r
        }\r
 \r
-       private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {\r
+       private static Map<String, Object> getInputVariables(VariableMapImpl variableMap) {\r
                Map<String, Object> inputVariables = new HashMap<String,Object>();\r
                @SuppressWarnings("unchecked")\r
                Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");\r
index b2b5755..4f99edd 100644 (file)
@@ -41,7 +41,7 @@ public class WorkflowResourceApplication extends Application {
 \r
     public WorkflowResourceApplication() {\r
         singletons.add(new WorkflowResource());\r
-        singletons.add(new WorkflowAsyncResource());\r
+        singletons.add(new WorkflowAsyncCommonResource());\r
         singletons.add(new WorkflowMessageResource());\r
     }\r
 \r
index c476c65..c99e6d6 100644 (file)
@@ -19,6 +19,7 @@ import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
 import org.jboss.resteasy.spi.AsynchronousResponse;\r
 import org.mockito.invocation.InvocationOnMock;\r
 import org.mockito.stubbing.Answer;\r
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;\r
@@ -166,7 +167,7 @@ public class BPMNUtil {
         * @param variables\r
         */\r
        private static void executeAsyncFlow(ProcessEngineServices processEngineServices, String processKey, AsynchronousResponse asyncResponse, Map<String,String> variables) {\r
-               WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();\r
+               WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();\r
                VariableMapImpl variableMap = new VariableMapImpl();\r
 \r
                Map<String, Object> variableValueType = new HashMap<String, Object>();\r
index 426bcee..51a1484 100644 (file)
@@ -31,7 +31,7 @@ import org.camunda.bpm.engine.test.Deployment;
 import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
 import org.jboss.resteasy.spi.AsynchronousResponse;
 import org.junit.Test;
-import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
 
 public class WorkflowAsyncResourceTest extends WorkflowTest {
@@ -53,7 +53,7 @@ public class WorkflowAsyncResourceTest extends WorkflowTest {
        }
 
        private void executeWorkflow(String request, String requestId, AsynchronousResponse asyncResponse, String processKey) {
-               WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
+               WorkflowAsyncCommonResource workflowResource = new WorkflowAsyncCommonResource();
                VariableMapImpl variableMap = new VariableMapImpl();
 
                Map<String, Object> variableValueType = new HashMap<String, Object>();
index 15dc4f4..63403f4 100644 (file)
@@ -75,6 +75,7 @@ import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification;
 import org.openecomp.mso.bpmn.common.adapter.vnf.VnfRollback;\r
 import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;\r
 import org.openecomp.mso.bpmn.common.workflow.service.VnfAdapterNotifyServiceImpl;\r
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;\r
 import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;\r
@@ -272,7 +273,7 @@ public class WorkflowTest {
                VariableMapImpl variableMapImpl = createVariableMapImpl(variables);\r
 \r
                System.out.println("Sending " + request + " to " + processKey + " process");\r
-               WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();\r
+               WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();\r
                workflowResource.setProcessEngineServices4junit(processEngineRule);\r
 \r
                TestAsyncResponse asyncResponse = new TestAsyncResponse();\r
@@ -305,7 +306,7 @@ public class WorkflowTest {
                VariableMapImpl variableMapImpl = createVariableMapImpl(variables);\r
 \r
                System.out.println("Sending " + request + " to " + processKey + " process");\r
-               WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();\r
+               WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();\r
                workflowResource.setProcessEngineServices4junit(processEngineRule);\r
 \r
                TestAsyncResponse asyncResponse = new TestAsyncResponse();\r
index a4a7ede..c7420c3 100644 (file)
@@ -35,7 +35,7 @@ import org.openecomp.mso.logger.MsoLogger;
  * @since Version 1.0\r
  *\r
  */\r
-@ProcessApplication(name="MSO Infrastructure Application", deploymentDescriptors={"../processes.xml"})\r
+@ProcessApplication("MSO Infrastructure Application")\r
 public class MSOInfrastructureApplication extends ServletProcessApplication {\r
        \r
        private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
new file mode 100644 (file)
index 0000000..33b40b7
--- /dev/null
@@ -0,0 +1,46 @@
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP - SO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;\r
+\r
+import javax.ws.rs.Path;\r
+\r
+import org.camunda.bpm.engine.ProcessEngineServices;\r
+import org.camunda.bpm.engine.ProcessEngines;\r
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;\r
+\r
+\r
+/**\r
+ * \r
+ * @version 1.0\r
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation\r
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background\r
+ * and the server thread is freed up, server scales better to process more incoming requests\r
+ * \r
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response\r
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process\r
+ */\r
+@Path("/async")\r
+public class WorkflowAsyncInfrastructureResource extends WorkflowAsyncResource {\r
+       \r
+    protected ProcessEngineServices getProcessEngineServices() {\r
+        return pes4junit.orElse(ProcessEngines.getProcessEngine("infrastructure"));\r
+    }\r
+}\r
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
new file mode 100644 (file)
index 0000000..1681197
--- /dev/null
@@ -0,0 +1,57 @@
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP - SO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;\r
+\r
+import java.util.HashSet;\r
+import java.util.Set;\r
+\r
+import javax.ws.rs.ApplicationPath;\r
+import javax.ws.rs.core.Application;\r
+\r
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;\r
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;\r
+\r
+/**\r
+ * @version 1.0\r
+ * RESTeasy workflow application which wires synchronous and asynchronous response\r
+ *\r
+ */\r
+@ApplicationPath("/")\r
+public class WorkflowResourceApplication extends Application {\r
+    private Set<Object> singletons = new HashSet<Object>();\r
+    private Set<Class<?>> classes = new HashSet<Class<?>>();\r
+\r
+    public WorkflowResourceApplication() {\r
+        singletons.add(new WorkflowResource());\r
+        singletons.add(new WorkflowAsyncInfrastructureResource());\r
+        singletons.add(new WorkflowMessageResource());\r
+    }\r
+\r
+    @Override\r
+    public Set<Class<?>> getClasses() {\r
+        return classes;\r
+    }\r
+\r
+    @Override\r
+    public Set<Object> getSingletons() {\r
+        return singletons;\r
+    }\r
+}\r
index 63eec4b..f7ffc36 100644 (file)
@@ -1,6 +1,6 @@
 <?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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
-  <bpmn:process id="Process_1" isExecutable="true">
+<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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0">
+  <bpmn:process id="Process_1" name="CreateCustomE2EServiceInstance" isExecutable="true">
     <bpmn:startEvent id="StartEvent_00qj6ro" name="Create SI Start Flow">
       <bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
     </bpmn:startEvent>
@@ -126,7 +126,7 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
     </bpmn:exclusiveGateway>
     <bpmn:endEvent id="EndEvent_07uk5iy">
       <bpmn:incoming>SequenceFlow_1fueo69</bpmn:incoming>
-      <bpmn:errorEventDefinition />
+      <bpmn:errorEventDefinition errorRef="Error_0nbdy47" />
     </bpmn:endEvent>
     <bpmn:sequenceFlow id="SequenceFlow_0s2spoq" sourceRef="StartEvent_00qj6ro" targetRef="ScriptTask_1s09c7d" />
     <bpmn:sequenceFlow id="SequenceFlow_19eilro" sourceRef="ScriptTask_0xupxj9" targetRef="CallActivity_0rhljy8" />
@@ -141,6 +141,7 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
   </bpmn:process>
+  <bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
       <bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties
new file mode 100644 (file)
index 0000000..d071fda
--- /dev/null
@@ -0,0 +1,20 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP MSO
+# ================================================================================
+# 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=========================================================
+###
+processEngineName=infrastructure
index a4532ba..287e1ac 100644 (file)
@@ -1,6 +1,6 @@
 <?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="_MagIIMOUEeW8asg-vCEgWQ" 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:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
+<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="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+  <bpmn2:process id="DoCreateE2EServiceInstance" name="DoCreateE2EServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
     </bpmn2:startEvent>
@@ -187,7 +187,7 @@ dcsi.postProcessAAIGET2(execution)]]></bpmn2:script>
   <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
   <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
-    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstance">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstance">
       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
         <dc:Bounds x="152" y="79" width="36" height="36" />
         <bpmndi:BPMNLabel>
index cd114a8..907f511 100644 (file)
     <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>\r
     <init-param>\r
       <param-name>javax.ws.rs.Application</param-name>\r
-      <param-value>org.openecomp.mso.bpmn.common.workflow.service.WorkflowResourceApplication</param-value>\r
+      <param-value>org.openecomp.mso.bpmn.infrastructure.workflow.service.WorkflowResourceApplication</param-value>\r
     </init-param>\r
   </servlet>\r
   <servlet-mapping>\r
     <servlet-name>resteasy-servlet</servlet-name>\r
     <url-pattern>/*</url-pattern>\r
   </servlet-mapping>\r
-  <context-param>\r
-    <param-name>contextConfigLocation</param-name>\r
-    <param-value>/WEB-INF/applicationContext.xml</param-value>\r
-  </context-param>\r
   <context-param>\r
     <param-name>mso.configuration</param-name>\r
     <param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>\r
@@ -48,9 +44,6 @@
     <param-name>resteasy.resources</param-name>\r
     <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>\r
   </context-param>\r
-  <listener>\r
-    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>\r
-  </listener>\r
   <filter>\r
     <filter-name>LogFilter</filter-name>\r
     <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>\r
@@ -78,4 +71,4 @@
   <security-role>\r
     <role-name>BPMN-Client</role-name>\r
   </security-role>\r
-</web-app>
\ No newline at end of file
+</web-app>\r