Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang committed Dec 12, 2023
1 parent a1d75f7 commit 54ff09e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener<Work
ActionListener.wrap(stateResponse -> {
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);
Expand All @@ -147,8 +148,9 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener<Work
}
logger.error("Failed to send back provision workflow exception", exception);
}));
} else {
listener.onResponse(new WorkflowResponse(globalContextResponse.getId()));
}
listener.onResponse(new WorkflowResponse(globalContextResponse.getId()));
}, exception -> {
logger.error("Failed to save workflow state : {}", exception.getMessage());
if (exception instanceof FlowFrameworkException) {
Expand Down

0 comments on commit 54ff09e

Please sign in to comment.