-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Return to previous step. #373
Comments
|
Hi, thanks but my case is more complex than that, let me explain more precisely. Assign --> Accept/Decline --> Move/Abandon --> Clean/Abandon --> Finish Is it possible to achieve this with workflow-core? Thanks. |
Hi.
|
try this(after commited, the indents disappeared, i don't konw why ):
|
Is it possible to get back to previous step?
For example, I have a cleaning process with 3 steps:
-step1 (assignment) for assigning someone to cleaning based on business rules (availibility, proximity, etc).
-step2 (accept or decline) for accepting/rejecting the task (gateway, user task)
if user accept, go to step3 (cleaning), else go back to step1 for assigning task to someone else (then step2 again and so on).
To simulate it, I used a variable in my data named Counter.
I tried this without success:
builder .StartWith<Step1>() .Then<Step2>() .If(data => data.Counter <= 3).Do(then => then .StartWith<Step1>() ) .If(data => data.Counter > 3).Do(then => then .StartWith<Step3>() );
When Counter is set to 5, I get output from Step1, 2 and 3
When Counter is set to 2, I get output from Step1, 2, 1 only (never reach step2 again).
Thanks for project and help.
The text was updated successfully, but these errors were encountered: