Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to wait for state execution completion with long polling API #268

Closed
longquanzheng opened this issue May 10, 2023 · 4 comments
Closed

Comments

@longquanzheng
Copy link
Contributor

longquanzheng commented May 10, 2023

Something like:

client.WaitForStateExecution(<workflowId>, <StateExecutionId>); // blocking API call until it's completed or timeout

This API will start a internal/system workflow , which waits for a signal, and let the state execution to signalWithStart it to complete. The workflowId will be __Iwf_system+<runId>+<stateExecutionId>

the StartWorkflow API will also require to tell what are the state execution will need to be waited, when starting a workflow.

@longquanzheng
Copy link
Contributor Author

longquanzheng commented Aug 1, 2023

Alternatively, wait for a state execution to complete may be even more useful / general to use . see #316

We may just implement it similar as described in #316 (comment)

state completion could start or signal a system workflow , and wait api can also start or wait for the same workflow.
only difference is that the timeout of workflow started after can be very short, and we will use “completed” status to check if the state is completed

@longquanzheng longquanzheng changed the title Ability to wait for a data attribute to be set with long polling Ability to wait for a data attribute to be set or state execution completion with long polling API Aug 1, 2023
@longquanzheng longquanzheng changed the title Ability to wait for a data attribute to be set or state execution completion with long polling API Ability to wait for state execution completion with long polling API Aug 21, 2023
@duoertai duoertai self-assigned this Aug 22, 2023
@longquanzheng
Copy link
Contributor Author

#345

@dennissetiawan
Copy link

dennissetiawan commented Jul 18, 2024

Hi @longquanzheng is this feature already available in golang sdk? Is there an example for this?

@longquanzheng
Copy link
Contributor Author

Hi @longquanzheng is this feature already available in golang sdk? Is there an example for this?

It’s only available in Java SDK atm because indeed mostly uses Java SDK. And we use it in production for a while.

Would you like to make a PR in Golang SDK by following the code in Java? I think it is pretty straightforward forward:

https://github.com/indeedeng/iwf-java-sdk/blob/56ef8d0c11b94b070ceb2bd02a53ea0d8ff0c661/src/main/java/io/iworkflow/core/Client.java#L996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants