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

Depend on user input #5

Closed
benoist opened this issue Dec 1, 2014 · 7 comments
Closed

Depend on user input #5

benoist opened this issue Dec 1, 2014 · 7 comments

Comments

@benoist
Copy link

benoist commented Dec 1, 2014

Hi,

I've had a look at your workflow gem. It looks really clean and neat.
I do have a question about depending on user input. I've got some workflows that require user input in the middle of the flow. Is there any way to specify in the workflow, that an external update is required?
I understand that this requires me to explicitly push the object in de workflow to the next state after the user input is received.

Cheers,
Benoist

@pokonski
Copy link
Contributor

pokonski commented Dec 4, 2014

Hi Benoist, this isn't quite possible as Gush uses sidekiq for job processing and that is executed in background.

If input is expected through a web-app for example, you could make a job which waits as long as it needs to until the input appears (in the database for example). Doing it through CLI is not possible with sidekiq.

@benoist
Copy link
Author

benoist commented Dec 4, 2014

I was thinking more in the line of processing the job until user input is required. The worker updates a state to mark a request for user input either through a web app or some other input. When the input is received the job is rescheduled and continues the flow. Essentially is creating 2+ workflow objects and combining them into 1 main flow.

@pokonski
Copy link
Contributor

Well, that would be a good way and can be done already in the current state of Gush.

@stevenharman
Copy link

What about user input to even start the job? e.g., say I wanted to start a whole workflow to publish a book... I'd need to know what book to even publish. How would I pass that into the workflow?

@pokonski
Copy link
Contributor

@stevenharman good point. That's what I'm working on now. Passing arguments to workflow, from which you can customize dependencies and pass more arguments down the line.

Will ping you once I push those changes :)

@pokonski
Copy link
Contributor

pokonski commented Jun 4, 2015

@stevenharman took a bit, but the workflows with arguments are now on master :)

Check it out and I'd love to hear some feedback 👉 https://github.com/pokonski/gush#passing-arguments-to-workflows

@pokonski pokonski reopened this Jun 4, 2015
@stevenharman
Copy link

@pokonski Looking good! Thanks!

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

No branches or pull requests

3 participants