Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
duoertai committed Jun 30, 2023
1 parent 5f010bd commit 20e2fbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/iworkflow/core/UnregisteredClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public <T> T getSimpleWorkflowResultWithWait(
return null;
}

String checkErrorMessage = "this workflow should have one or zero state output for using this API";
final List<StateCompletionOutput> filteredResults = workflowGetResponse.getResults().stream().filter((res) -> res.getCompletedStateOutput() != null).collect(Collectors.toList());

Preconditions.checkArgument(workflowGetResponse.getResults().size() == 1 || filteredResults.size() == 1, checkErrorMessage + ", found " + workflowGetResponse.getResults().size() + ", after filtered NULL: " + filteredResults.size());
Expand Down

0 comments on commit 20e2fbd

Please sign in to comment.