diff options
author | Rob Daugherty <rd472p@att.com> | 2017-09-19 18:08:26 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2017-09-19 18:15:31 -0400 |
commit | bb5668fdd40f923694a4aa3a3b5bf5f7009b6cd7 (patch) | |
tree | 63ea237a59cf48ceae67e9e6d9214a5df28c796b /bpmn | |
parent | 3c6e2c520783eaf4a703ff2adfd94324d2fd3fae (diff) |
BPMN applications not deployed properly
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>
Diffstat (limited to 'bpmn')
13 files changed, 203 insertions, 60 deletions
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 index 0000000000..249283923a --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java @@ -0,0 +1,32 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+
+
+public class WorkflowAsyncCommonResource extends WorkflowAsyncResource {
+
+ protected ProcessEngineServices getProcessEngineServices() {
+ return pes4junit.orElse(ProcessEngines.getProcessEngine("common"));
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java index 9787ec07b5..4f621128f2 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java @@ -21,6 +21,8 @@ package org.openecomp.mso.bpmn.common.workflow.service; import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
import java.util.UUID;
import javax.ws.rs.Consumes;
@@ -31,7 +33,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.Response;
import org.camunda.bpm.engine.ProcessEngineServices;
-import org.camunda.bpm.engine.ProcessEngines;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
@@ -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
*/
@Path("/async")
-public class WorkflowAsyncResource {
+public abstract class WorkflowAsyncResource { - private WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
- protected ProcessEngineServices pes4junit = null;
+ private static final WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+ protected Optional<ProcessEngineServices> pes4junit = Optional.empty();
- private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
private static final String logMarker = "[WRKFLOW-RESOURCE]";
- private static final int DEFAULT_WAIT_TIME = 30000; //default wait time
+ private static final long DEFAULT_WAIT_TIME = 30000; //default wait time
/**
* Asynchronous JAX-RS method that starts a process instance.
@@ -75,7 +76,6 @@ public class WorkflowAsyncResource { public void startProcessInstanceByKey(final @Suspend(180000) AsynchronousResponse asyncResponse,
@PathParam("processKey") String processKey, VariableMapImpl variableMap) {
- WorkflowResponse response = new WorkflowResponse();
long startTime = System.currentTimeMillis();
Map<String, Object> inputVariables = null;
WorkflowContext workflowContext = null;
@@ -107,6 +107,7 @@ public class WorkflowAsyncResource { }
msoLogger.debug(logMarker + "Exception in startProcessInstance by key");
+ WorkflowResponse response = new WorkflowResponse();
response.setMessage("Fail" );
response.setResponse("Error occurred while executing the process: " + e);
response.setMessageCode(500);
@@ -205,29 +206,28 @@ public class WorkflowAsyncResource { return contextHolder.processCallback(processKey, processInstanceId, requestId, callbackResponse);
}
+ private static String getOrCreate(Map<String, Object> inputVariables, String key) {
+ String value = Objects.toString(inputVariables.get(key), null);
+ if (value == null) {
+ value = UUID.randomUUID().toString();
+ inputVariables.put(key, value);
+ }
+ return value;
+ }
+
// Note: the business key is used to identify the process in unit tests
- private String getBusinessKey(Map<String, Object> inputVariables) {
- Object businessKey = inputVariables.get("mso-business-key");
- if (businessKey == null ) {
- businessKey = UUID.randomUUID().toString();
- inputVariables.put("mso-business-key", businessKey);
- }
- return businessKey.toString();
+ private static String getBusinessKey(Map<String, Object> inputVariables) {
+ return getOrCreate(inputVariables, "mso-business-key");
}
- private String getRequestId(Map<String, Object> inputVariables) {
- Object requestId = inputVariables.get("mso-request-id");
- if (requestId == null ) {
- requestId = UUID.randomUUID().toString();
- inputVariables.put("mso-request-id", requestId);
- }
- return requestId.toString();
+ private static String getRequestId(Map<String, Object> inputVariables) {
+ return getOrCreate(inputVariables, "mso-request-id");
}
private long getWaitTime(Map<String, Object> inputVariables)
{
- String timeout = inputVariables.get("mso-service-request-timeout") == null
- ? null : inputVariables.get("mso-service-request-timeout").toString();
+
+ String timeout = Objects.toString(inputVariables.get("mso-service-request-timeout"), null);
if (timeout != null) {
try {
@@ -252,7 +252,7 @@ public class WorkflowAsyncResource { }
- private void setLogContext(String processKey,
+ private static void setLogContext(String processKey,
Map<String, Object> inputVariables) {
MsoLogger.setServiceName("MSO." + processKey);
if (inputVariables != null) {
@@ -260,32 +260,24 @@ public class WorkflowAsyncResource { }
}
- private String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+ private static String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
if (inputVariables == null) return "";
- Object requestId = inputVariables.get(key);
- if (requestId != null) return requestId.toString();
- return "N/A";
+ return Objects.toString(inputVariables.get(key), "N/A");
}
private boolean isProcessEnded(String processInstanceId) {
ProcessEngineServices pes = getProcessEngineServices();
- return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
+ return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null;
}
- protected ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return ProcessEngines.getDefaultProcessEngine();
- } else {
- return pes4junit;
- }
- }
+ protected abstract ProcessEngineServices getProcessEngineServices(); public void setProcessEngineServices4junit(ProcessEngineServices pes) {
- pes4junit = pes;
+ pes4junit = Optional.ofNullable(pes);
}
- private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+ private static Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
Map<String, Object> inputVariables = new HashMap<String,Object>();
@SuppressWarnings("unchecked")
Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java index b2b5755d17..4f99edd660 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java @@ -41,7 +41,7 @@ public class WorkflowResourceApplication extends Application { public WorkflowResourceApplication() {
singletons.add(new WorkflowResource());
- singletons.add(new WorkflowAsyncResource());
+ singletons.add(new WorkflowAsyncCommonResource());
singletons.add(new WorkflowMessageResource());
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java index c476c6577f..c99e6d615b 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java @@ -19,6 +19,7 @@ import org.camunda.bpm.engine.variable.impl.VariableMapImpl; import org.jboss.resteasy.spi.AsynchronousResponse;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
@@ -166,7 +167,7 @@ public class BPMNUtil { * @param variables
*/
private static void executeAsyncFlow(ProcessEngineServices processEngineServices, String processKey, AsynchronousResponse asyncResponse, Map<String,String> variables) {
- WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
+ WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();
VariableMapImpl variableMap = new VariableMapImpl();
Map<String, Object> variableValueType = new HashMap<String, Object>();
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java index 426bceef4b..51a1484cf9 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java @@ -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>(); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java index 15dc4f4609..63403f40ce 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java @@ -75,6 +75,7 @@ import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification; import org.openecomp.mso.bpmn.common.adapter.vnf.VnfRollback;
import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
import org.openecomp.mso.bpmn.common.workflow.service.VnfAdapterNotifyServiceImpl;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
@@ -272,7 +273,7 @@ public class WorkflowTest { VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
System.out.println("Sending " + request + " to " + processKey + " process");
- WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
+ WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();
workflowResource.setProcessEngineServices4junit(processEngineRule);
TestAsyncResponse asyncResponse = new TestAsyncResponse();
@@ -305,7 +306,7 @@ public class WorkflowTest { VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
System.out.println("Sending " + request + " to " + processKey + " process");
- WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
+ WorkflowAsyncResource workflowResource = new WorkflowAsyncCommonResource();
workflowResource.setProcessEngineServices4junit(processEngineRule);
TestAsyncResponse asyncResponse = new TestAsyncResponse();
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java index a4a7edefe7..c7420c3a03 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java @@ -35,7 +35,7 @@ import org.openecomp.mso.logger.MsoLogger; * @since Version 1.0
*
*/
-@ProcessApplication(name="MSO Infrastructure Application", deploymentDescriptors={"../processes.xml"})
+@ProcessApplication("MSO Infrastructure Application")
public class MSOInfrastructureApplication extends ServletProcessApplication {
private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
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 index 0000000000..33b40b7bf0 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java @@ -0,0 +1,46 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import javax.ws.rs.Path;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
+
+
+/**
+ *
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ *
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+public class WorkflowAsyncInfrastructureResource extends WorkflowAsyncResource {
+
+ protected ProcessEngineServices getProcessEngineServices() {
+ return pes4junit.orElse(ProcessEngines.getProcessEngine("infrastructure"));
+ }
+}
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 index 0000000000..16811979c1 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java @@ -0,0 +1,57 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+
+/**
+ * @version 1.0
+ * RESTeasy workflow application which wires synchronous and asynchronous response
+ *
+ */
+@ApplicationPath("/")
+public class WorkflowResourceApplication extends Application {
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ public WorkflowResourceApplication() {
+ singletons.add(new WorkflowResource());
+ singletons.add(new WorkflowAsyncInfrastructureResource());
+ singletons.add(new WorkflowMessageResource());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn index 63eec4bb3d..f7ffc368cd 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn @@ -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 index 0000000000..d071fdabf8 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties @@ -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 diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn index a4532baf63..287e1acc66 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn @@ -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> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml index cd114a85dc..907f511551 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml +++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml @@ -25,7 +25,7 @@ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
- <param-value>org.openecomp.mso.bpmn.common.workflow.service.WorkflowResourceApplication</param-value>
+ <param-value>org.openecomp.mso.bpmn.infrastructure.workflow.service.WorkflowResourceApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -33,10 +33,6 @@ <url-pattern>/*</url-pattern>
</servlet-mapping>
<context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/applicationContext.xml</param-value>
- </context-param>
- <context-param>
<param-name>mso.configuration</param-name>
<param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>
</context-param>
@@ -48,9 +44,6 @@ <param-name>resteasy.resources</param-name>
<param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
</context-param>
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
<filter>
<filter-name>LogFilter</filter-name>
<filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
@@ -78,4 +71,4 @@ <security-role>
<role-name>BPMN-Client</role-name>
</security-role>
-</web-app>
\ No newline at end of file +</web-app>
|