aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-05-23 13:41:14 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-23 13:41:14 +0000
commit338c7e73b789c0a6d95081ab1a13ae7baf00f950 (patch)
tree024bffe33e4d30079e0b190bba729204fc6177c7 /bpmn
parentb533bd8b7626e28ee708734065b4462ae368f121 (diff)
parentda706c74e561962a73b8c79dae133c3f59e1cffd (diff)
Merge "Send syncAck on first Activity" into dublin
Diffstat (limited to 'bpmn')
-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);