From e6551c73888022b5855b8809697de15006518bd4 Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Wed, 18 Oct 2017 17:33:49 -0400 Subject: NullPointerException after adapter callback 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 --- .../mso/bpmn/common/workflow/service/AbstractCallbackService.java | 6 +++--- .../bpmn/common/workflow/service/WorkflowAsyncCommonResource.java | 2 +- .../mso/bpmn/common/workflow/service/WorkflowResource.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/openecomp') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java index b1d1085b43..c0be8992ef 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java @@ -25,9 +25,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.camunda.bpm.BpmPlatform; import org.camunda.bpm.engine.MismatchingMessageCorrelationException; import org.camunda.bpm.engine.ProcessEngineServices; +import org.camunda.bpm.engine.ProcessEngines; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.runtime.Execution; import org.camunda.bpm.engine.runtime.MessageCorrelationResult; @@ -371,7 +371,7 @@ public abstract class AbstractCallbackService { protected ProcessEngineServices getProcessEngineServices() { if (pes4junit == null) { - return BpmPlatform.getDefaultProcessEngine(); + return ProcessEngines.getProcessEngine("infrastructure"); } else { return pes4junit; } @@ -380,4 +380,4 @@ public abstract class AbstractCallbackService { public void setProcessEngineServices4junit(ProcessEngineServices pes) { pes4junit = pes; } -} \ No newline at end of file +} 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 index 249283923a..4534b56efc 100644 --- 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 @@ -27,6 +27,6 @@ import org.camunda.bpm.engine.ProcessEngines; public class WorkflowAsyncCommonResource extends WorkflowAsyncResource { protected ProcessEngineServices getProcessEngineServices() { - return pes4junit.orElse(ProcessEngines.getProcessEngine("common")); + return pes4junit.orElse(ProcessEngines.getProcessEngine("infrastructure")); } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java index 7a537218b3..0521fb4df3 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java @@ -618,7 +618,7 @@ public class WorkflowResource { private ProcessEngineServices getProcessEngineServices() { if (pes4junit == null) { - return ProcessEngines.getDefaultProcessEngine(); + return ProcessEngines.getProcessEngine("infrastructure"); } else { return pes4junit; } -- cgit 1.2.3-korg