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

Supports WaitForSignal action #28

Closed
gurmitteotia opened this issue Oct 30, 2018 · 2 comments
Closed

Supports WaitForSignal action #28

gurmitteotia opened this issue Oct 30, 2018 · 2 comments
Assignees
Projects

Comments

@gurmitteotia
Copy link
Owner

gurmitteotia commented Oct 30, 2018

It will be quite useful for some workflows to pause the execution of workflow until some signal arrives. Possibly something like below:

[WorkflowDescription("1.0")]
public class UserRegisterWorkflow : Workflow
{
  public UserRegisterWorkflow()
  {
     ...
    ScheduleLambda("SendEmailToUser").OnCompletion(_=>WaitForSignal("RegistrationVerified");
    ScheduleLambda("ActivateAccount").AfterLambda("SendEmailToUser");
  }
}

In above case workflow will resume by scheduling the ActivateAccount lambda function on receiving the RegistrationVerified signal.

  • Currently by default signals are ignored. After the implementation of this idea the default behaviour of signal would be to resume any waiting execution
  • WaitForSignal can only be called in response to event of a workflow item- lambda function, activity....
  • Expose another workflow action - ResumeOnSignal("signalName"), This workflow action will be called on receiving the signal.
  • User can override signal handling and provide her own logic.
  • Workflow can wait multiple times for same signal
  • Multiple workflow items, in parallel branches, can wait for same signal.

In the absence of this feature you can still pause and wait for signals. Please browse through examples to get the idea about signal handling.

@gurmitteotia gurmitteotia added this to To Do in Guflow via automation Oct 30, 2018
@gurmitteotia
Copy link
Owner Author

I will avoid it at this stage because current solution is also decent.

Guflow automation moved this from To Do to Done Oct 30, 2018
@gurmitteotia
Copy link
Owner Author

Reopening it. I think will be quite useful. Currently solution become bit involved in complex scenario.

@gurmitteotia gurmitteotia reopened this Nov 5, 2018
Guflow automation moved this from Done to To Do Nov 5, 2018
@gurmitteotia gurmitteotia moved this from To Do to In Progress in Guflow Nov 30, 2018
@gurmitteotia gurmitteotia self-assigned this Dec 10, 2018
@gurmitteotia gurmitteotia moved this from In Progress to Done in Guflow Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Guflow
  
Done
Development

No branches or pull requests

1 participant