NullPointerException after adapter callback 17/19617/1
authorRob Daugherty <rd472p@att.com>
Wed, 18 Oct 2017 21:33:49 +0000 (17:33 -0400)
committerRob Daugherty <rd472p@att.com>
Wed, 18 Oct 2017 21:33:49 +0000 (17:33 -0400)
The exception occurs because the default process engine is
being used to handle the callback.  Until we come up with a
better design, we will use the "infrastructure" process
engine.

Issue: SO-76
Change-Id: Ibe8a40ac28b2ae855f85094f57d878ee622349a0
Signed-off-by: Rob Daugherty <rd472p@att.com>
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java

index b1d1085..c0be899 100644 (file)
@@ -25,9 +25,9 @@ import java.util.HashMap;
 import java.util.List;\r
 import java.util.Map;\r
 \r
-import org.camunda.bpm.BpmPlatform;\r
 import org.camunda.bpm.engine.MismatchingMessageCorrelationException;\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.Execution;\r
 import org.camunda.bpm.engine.runtime.MessageCorrelationResult;\r
@@ -371,7 +371,7 @@ public abstract class AbstractCallbackService {
        \r
        protected ProcessEngineServices getProcessEngineServices() {\r
                if (pes4junit == null) {\r
-                       return BpmPlatform.getDefaultProcessEngine();\r
+                       return ProcessEngines.getProcessEngine("infrastructure");\r
                } else {\r
                        return pes4junit;\r
                }\r
@@ -380,4 +380,4 @@ public abstract class AbstractCallbackService {
        public void setProcessEngineServices4junit(ProcessEngineServices pes) {\r
                pes4junit = pes;\r
        }\r
-}
\ No newline at end of file
+}
index 2492839..4534b56 100644 (file)
@@ -27,6 +27,6 @@ import org.camunda.bpm.engine.ProcessEngines;
 public class WorkflowAsyncCommonResource extends WorkflowAsyncResource {\r
 \r
     protected ProcessEngineServices getProcessEngineServices() {\r
-        return pes4junit.orElse(ProcessEngines.getProcessEngine("common"));\r
+        return pes4junit.orElse(ProcessEngines.getProcessEngine("infrastructure"));\r
     }\r
 }\r
index 7a53721..0521fb4 100644 (file)
@@ -618,7 +618,7 @@ public class WorkflowResource {
 \r
        private ProcessEngineServices getProcessEngineServices() {\r
                if (pes4junit == null) {\r
-                       return ProcessEngines.getDefaultProcessEngine();\r
+                       return ProcessEngines.getProcessEngine("infrastructure");\r
                } else {\r
                        return pes4junit;\r
                }\r