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

Add a Diagram to explain IWorkflowDispatcher event #84

Open
jdevillard opened this issue Aug 7, 2024 · 0 comments
Open

Add a Diagram to explain IWorkflowDispatcher event #84

jdevillard opened this issue Aug 7, 2024 · 0 comments

Comments

@jdevillard
Copy link

The idea is to add a diagram to explain how event are fired in an implementation of the IWorkflowDispatcher :

Event can be fired when :

  • starting
  • resuming existing
  • resuming on a bookmark
  • ...

For example, in an custom implementation that dispatch execution in specific process (in a multi-process execution), we must know what is the order of event to ensure getting the right execution context of the workflow and not missing something.

public interface IWorkflowDispatcher
{
    /// <summary>
    /// Dispatches a request to execute the specified workflow definition.
    /// </summary>
    Task<DispatchWorkflowResponse> DispatchAsync(DispatchWorkflowDefinitionRequest request, DispatchWorkflowOptions options, CancellationToken cancellationToken = default);
    
    /// <summary>
    /// Dispatches a request to execute the specified workflow instance.
    /// </summary>
    Task<DispatchWorkflowResponse> DispatchAsync(DispatchWorkflowInstanceRequest request, DispatchWorkflowOptions options, CancellationToken cancellationToken = default);
    
    /// <summary>
    /// Starts all workflows and resumes existing workflow instances based on the specified activity type and bookmark payload.
    /// </summary>
    Task<DispatchWorkflowResponse> DispatchAsync(DispatchTriggerWorkflowsRequest request, DispatchWorkflowOptions options, CancellationToken cancellationToken = default);
    
    /// <summary>
    /// Resumes the workflow waiting for the specified bookmark.
    /// </summary>
    Task<DispatchWorkflowResponse> DispatchAsync(DispatchResumeWorkflowsRequest request, DispatchWorkflowOptions options, CancellationToken cancellationToken = default);
}
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

1 participant