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

workflow step decorator to handle asynchronous communication with subsystem #297

Closed
hanstrompert opened this issue Jul 4, 2023 · 1 comment · Fixed by #354
Closed

workflow step decorator to handle asynchronous communication with subsystem #297

hanstrompert opened this issue Jul 4, 2023 · 1 comment · Fixed by #354
Assignees
Labels
feature Request for new feature SURF

Comments

@hanstrompert
Copy link
Member

hanstrompert commented Jul 4, 2023

Problem

A common way to implement asynchronous communication with a substem in a workflow today uses two workflow steps, one step to prepare and submit the payload to the subsystem, and a following step with an input form that will wait for the subsystem to post back the results of the submitted job. This works just fine when the submitted job succeeded and the workflow can continue to execute the next steps in the workflow. In case the submitted job fails you are stuck, after the problem in the subsystem is fixed it should be possible to resubmit the job, but that is not possible because you are already in a step after the succeeded job submit step. And continuing the workflow is also not an option because the job in the subsystem has failed. This violates the WFO philosophy that states that it should be possible to retry every step until it succeeds and can continue with the next step until the workflow finishes.

Solution

Design a workflow step decorator that:

  • combines the job submit, wait for the result, and validation of the result into one step
  • allows the registration of a callback URL to be used by the subsystem to post the result back
  • add a new process state to indicate that the process is waiting on a callback
@hanstrompert hanstrompert added feature Request for new feature SURF labels Jul 4, 2023
@pboers1988
Copy link
Member

pboers1988 commented Jul 12, 2023

Must Haves:

  • Use the inputform generator to define the callback protocol
  • Implement a configurable timer on the callback step
  • This timer will only be used in the UI to enable or disable the retry button
  • When retry has been triggered the old callback url must be disabled.
  • Make it usable in the form of a @callback_step decorator

@Mark90 Mark90 added bug Something isn't working and removed bug Something isn't working labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for new feature SURF
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants