aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-05-21 02:49:48 -0400
committerElena Kuleshov <evn@att.com>2019-05-21 02:51:28 -0400
commitda706c74e561962a73b8c79dae133c3f59e1cffd (patch)
tree88fec4d59bc64a7ea1363dac48e97599e9c2f0e2
parente91f705e913d875426aeadde5a78cbca3d9a9504 (diff)
Send syncAck on first Activity
Send syncAck on first Activity Issue-ID: SO-1905 Signed-off-by: Kuleshov, Elena <evn@att.com> Change-Id: I0965b8247aa88a19be4417e2b5d58bce2d5dab27
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index 05d4f56fdc..426ef931b6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -31,6 +31,7 @@ import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.runtime.ProcessInstanceWithVariables;
import org.camunda.bpm.engine.variable.VariableMap;
import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionBBTasks;
import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
@@ -55,6 +56,7 @@ public class ExecuteActivity implements JavaDelegate {
private static final String G_REQUEST_ID = "mso-request-id";
private static final String VNF_ID = "vnfId";
private static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
+ private static final String WORKFLOW_SYNC_ACK_SENT = "workflowSyncAckSent";
private static final String SERVICE_TASK_IMPLEMENTATION_ATTRIBUTE = "implementation";
private static final String ACTIVITY_PREFIX = "activity:";
@@ -65,12 +67,19 @@ public class ExecuteActivity implements JavaDelegate {
private RuntimeService runtimeService;
@Autowired
private ExceptionBuilder exceptionBuilder;
+ @Autowired
+ private WorkflowActionBBTasks workflowActionBBTasks;
@Override
public void execute(DelegateExecution execution) throws Exception {
final String requestId = (String) execution.getVariable(G_REQUEST_ID);
try {
+ Boolean workflowSyncAckSent = (Boolean) execution.getVariable(WORKFLOW_SYNC_ACK_SENT);
+ if (workflowSyncAckSent == null || workflowSyncAckSent == false) {
+ workflowActionBBTasks.sendSyncAck(execution);
+ execution.setVariable(WORKFLOW_SYNC_ACK_SENT, Boolean.TRUE);
+ }
final String implementationString =
execution.getBpmnModelElementInstance().getAttributeValue(SERVICE_TASK_IMPLEMENTATION_ATTRIBUTE);
logger.debug("activity implementation String: {}", implementationString);