You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At about line 429 of com.uber.cadence.internal.sync.WorkflowStubImpl.java, the building of the QueryWorkflowParameters object doesn't set the run id if present:
QueryWorkflowParameters p = new QueryWorkflowParameters();
p.setInput(dataConverter.toData(args));
p.setQueryType(queryType);
p.setWorkflowId(execution.get().getWorkflowId());
p.setQueryRejectCondition(queryRejectCondition);
Adding something like the following fixed the problem for me:
if (execution.get().getRunId() != null) {
p.setRunId(execution.get().getRunId());
}
Without this, the following sample code will always pull the latest run and ignore the the run id:
To see the problem, you would need to kick off multiple runs of a workflow that have the same workflow id. If the first run fails for some reason and the second one is successful, the sample code above will always only pull the successful run. If I add the suggested code above, I am able to successfully retrieve the failed run.
The only way then to retrieve the failed run is to use the WorkflowExecutionUtils class.
The text was updated successfully, but these errors were encountered:
At about line 429 of com.uber.cadence.internal.sync.WorkflowStubImpl.java, the building of the QueryWorkflowParameters object doesn't set the run id if present:
Adding something like the following fixed the problem for me:
Without this, the following sample code will always pull the latest run and ignore the the run id:
To see the problem, you would need to kick off multiple runs of a workflow that have the same workflow id. If the first run fails for some reason and the second one is successful, the sample code above will always only pull the successful run. If I add the suggested code above, I am able to successfully retrieve the failed run.
The only way then to retrieve the failed run is to use the WorkflowExecutionUtils class.
The text was updated successfully, but these errors were encountered: