danielgerlag / danielgerlag/workflow-core

Workflow steps not running after specifying input/output

Open
#1,222 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.9k
Forks
1.3k
Avg merge
1d 1h
Merged PRs (30d)
5

Description

**Describe the bug**
I can define a workflow like so:

```csharp
public void Build(IWorkflowBuilder builder)
{
builder
.StartWith()
.Output(data => data.Payload, step => step.PayloadOutput)
.Then()
.Input(step => step.PayloadInput, data => data.Payload);
}
```

where Step1 and Step2 both inherit from StepBody and Step1 has property PayloadOutput, Step2 has property PauloadInput, and DataClass has property Payload. However, Step2, never gets executed - the workflow just stalls out and occasionally tries to rerun step 1.

In this instance, I registered Step1/Step2 via AddTransient and have Registered the workflow with the DataClass class.

Note that if I do not have the Output/Input pieces in the workflow definition, then Step2 _does_ run

**To Reproduce**
Create a workflow as shown above inside an Azure function using .NET 8

**Expected behavior**
I would expect, my Step2.Run() to be executed and its PayloadInput string to be populated with the result of PayloadOutput from step 1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Build workflow shown in an Azure Function on .NET 8, focusing on the StartWith/Output/Then/Input entry points and Step1.Run()/Step2.Run(). Trace why execution stalls or retries Step1 when data mapping is configured. Done means Step2.Run() executes and its PayloadInput contains Step1's PayloadOutput.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.