summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2020-01-30 14:12:13 +0000
committerGerrit Code Review <gerrit@onap.org>2020-01-30 14:12:13 +0000
commitf39f99626d9eae25d13b313cdcf908f91c042496 (patch)
tree3fa1368eb0d9b84c931287c6fb99847da2741cfd /bpmn
parent79853158b8429307a97722bde2771dd4d7426385 (diff)
parentb0d61b98928c9382795ca5ad95f44e03bee51e93 (diff)
Merge "WaitForPnfReadyBB message fix"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEvent.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEventTest.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEvent.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEvent.java
index f0eadbbf78..9e1b5d5a0b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEvent.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEvent.java
@@ -70,7 +70,7 @@ public class RegisterForPnfReadyEvent implements JavaDelegate {
fillExecution(execution, pnfName);
RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
dmaapClient.registerForUpdate(pnfName, () -> runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult());
+ .processInstanceId(execution.getProcessInstanceId()).correlateWithResult());
} catch (BBObjectNotFoundException e) {
LOGGER.error(ERROR_MESSAGE_PNF_NOT_FOUND);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, ERROR_MESSAGE_PNF_NOT_FOUND);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEventTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEventTest.java
index a82fb5d823..7ec05fda04 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEventTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/RegisterForPnfReadyEventTest.java
@@ -24,6 +24,8 @@ import org.onap.so.client.exception.ExceptionBuilder;
public class RegisterForPnfReadyEventTest {
private static final String PNF_NAME = "pnfNameTest";
+ private static final String PNF_ENTRY_NOTIFICATION_TIMEOUT = "P14D";
+ private static final String PROCESS_INSTANCE_ID = "testInstanceId";
private DelegateExecution delegateExecution;
private ExtractPojosForBB extractPojosForBBMock;
@@ -31,7 +33,6 @@ public class RegisterForPnfReadyEventTest {
private MessageCorrelationBuilder messageCorrelationBuilder;
private ExceptionBuilder exceptionBuilderMock;
private BuildingBlockExecution buildingBlockExecution;
- private static final String PNF_ENTRY_NOTIFICATION_TIMEOUT = "P14D";
private RegisterForPnfReadyEvent testedObject;
@@ -103,13 +104,13 @@ public class RegisterForPnfReadyEventTest {
private void checkIfInformConsumerThreadIsRunProperly(DmaapClientTestImpl dmaapClientTest) {
dmaapClientTest.getInformConsumer().run();
InOrder inOrder = inOrder(messageCorrelationBuilder);
- inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey");
+ inOrder.verify(messageCorrelationBuilder).processInstanceId(PROCESS_INSTANCE_ID);
inOrder.verify(messageCorrelationBuilder).correlateWithResult();
}
private DelegateExecution prepareExecution() {
DelegateExecution delegateExecution = mock(DelegateExecution.class);
- when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
+ when(delegateExecution.getProcessInstanceId()).thenReturn(PROCESS_INSTANCE_ID);
ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class);
when(delegateExecution.getProcessEngineServices()).thenReturn(processEngineServices);
RuntimeService runtimeService = mock(RuntimeService.class);
@@ -117,7 +118,7 @@ public class RegisterForPnfReadyEventTest {
messageCorrelationBuilder = mock(MessageCorrelationBuilder.class);
when(runtimeService.createMessageCorrelation(any())).thenReturn(messageCorrelationBuilder);
- when(messageCorrelationBuilder.processInstanceBusinessKey(any())).thenReturn(messageCorrelationBuilder);
+ when(messageCorrelationBuilder.processInstanceId(any())).thenReturn(messageCorrelationBuilder);
return delegateExecution;
}