diff --git a/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java b/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java index ff9901ad4..eef981dad 100644 --- a/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java +++ b/src/main/java/org/opensearch/flowframework/transport/CreateWorkflowTransportAction.java @@ -134,9 +134,10 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener { logger.info("create state workflow doc"); if (request.isProvision()) { + logger.info("provision parameter"); WorkflowRequest workflowRequest = new WorkflowRequest(globalContextResponse.getId(), null); client.execute(ProvisionWorkflowAction.INSTANCE, workflowRequest, ActionListener.wrap(provisionResponse -> { - listener.onResponse(new WorkflowResponse(globalContextResponse.getId())); + listener.onResponse(new WorkflowResponse(provisionResponse.getWorkflowId())); }, exception -> { if (exception instanceof FlowFrameworkException) { listener.onFailure(exception); @@ -147,8 +148,9 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener { logger.error("Failed to save workflow state : {}", exception.getMessage()); if (exception instanceof FlowFrameworkException) {