-
Notifications
You must be signed in to change notification settings - Fork 65
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
Is it possible to delay a Workflow? #21
Comments
Hey, MCKLtech yes I would go with a custom trigger for this. I have this feature on the plate but need more time to implement it. If you have a good idea feel free to make a Pull Request. You can contact me anytime about this. |
Thank you for the reply, Max, I appreciate it. I have a few follow up questions:
Trigger -> Task -> Task -> Delay -> Task -> Delay -> Task It seems that ProcessWorkflow will go through the entire workflow so although we can delay the start, we can't delay during the execution. The only way I can think of doing this would be to have multiple workflows, so if we took the example above, it would become three separate workflows: A) Trigger -> Task -> Task B) Trigger (Delay) -> Task c) Trigger (Delay) -> Task Where the last task calls the trigger of the next workflow e.g. The last task in A, triggers workflow B, which in turn triggers workflow C Therefore, is it possible to write a task that calls the trigger of a particular workflow? And if we did, can we pass data between them? Or is there an easier way to do this? |
I think the best way would be to put a delay function to the Tasks (and Triggers). This saves a serialized version from the DataBus to a new table. The DataBus serialization should not store the complete models but just a reference to it. The other data should get saved. It also needs to know from which task the execution should continue. And now comes the nice part you could write a new trigger that checks this table regularly for a timestamp and a task that continues the given workflow. |
I quite like that idea. Do you have any work on it? I'd be happy to help if there was an existing PR or branch. |
unfortunately, I have not started and don't know when I will have enough time. |
This project is amazing! |
+1. I looked at this last year but could never get it working to my satisfaction. I'd be happy to help if @Max-Hutschenreiter had any suggestions |
I just forked repo.. and I must fix composer.json (added laravel/pint and laravel/slack-notification-channel) and create a ConditionFailedError class that was missing. Do you have a branch on which we can collaborate? |
Hey, it's still alive :) Feel free to make a pull request for your changes. Unfortunately, I am a little short on time, but the Workflow will also get some improvements soon. |
I am looping back on this as I've had another project this would be well suited for. However, we need to be able to delay the workflow and know the position as per #23 |
I'm wondering about the feasibility of delaying a workflow? For example, wait one hour, then send an email, wait two days, send another email.
Would a custom trigger that calls itself at a later point in time be a potential solution?
The text was updated successfully, but these errors were encountered: