gurmitteotia / gurmitteotia/guflow

Support WaitForSignal(s) APIs on WorkflowStartedEvent

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This feature will allow the workflow to pause even before scheduling any workflow item. e.g.

```cs
public class OrderWorkflow : Workflow
{
public OrderWorkflow()
{
ScheduleLambda("ReserveItem")
.WithInput(_=>new{Id});//Send workflow id to lambda functions to send signals to this workflow.
ScheduleLambda("ChargeCustomer").AfterLambda("ReserveItem");
ScheduleLambda("ShipItem").AfterLambda("ChargeCustomer");
}
[WorkflowEvent(EventName.Started)]
public WorkflowAction OnStarted(WorkflowStartedEvent @event)
{
return @event.WaitForSignal("SomethingToStart");
}
}
```

User should be able to call all of wait APIs - WaitForSignal, WaitForAnySignal and WaitForAllSiganls on WorkflowStartedEvent.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate WorkflowStartedEvent and the existing WaitForSignal, WaitForAnySignal, and WaitForAllSiganls APIs, then inspect how workflow-start handling is dispatched. Done means all three wait APIs can be called on WorkflowStartedEvent and the workflow pauses before any workflow item is scheduled, as shown in the issue example.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
cloud, distributed-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.