Description
When using Workflow Core with YAML workflow definitions, if a custom step inherits from a built-in step (such as Foreach), the YAML deserializer fails to bind to public properties declared in the base class.
Example: RunParallel is a public property on Foreach, but if we create a custom step inheriting from Foreach and specify RunParallel in YAML, the engine throws:
System.ArgumentException: Unknown type for input RunParallel on IterateList
This happens even though:
RunParallel is public in the base Foreach class.
- The YAML syntax works if the step type is
IterateListStep without RunParallel argument.
- The property name
RunParallel is correct and case matches exactly.
Steps to Reproduce
1. Create a custom step inheriting from Foreach:
public class IterateListStep : Foreach
{
// No additional properties for reproduction
}
2. Define YAML workflow using the custom step:
- Id: IterateList
StepType: MyNamespace.IterateListStep, MyAssembly
Inputs:
Collection: "data.DataList"
RunParallel: false
3. Load workflow using:
app.UseWorkflowConfiguration(DeserializerType.YAML);
4. Run the workflow.
Expected Behavior
RunParallel should be recognized and correctly bound from YAML, even when the step is a subclass of Foreach.
Actual Behavior
An exception is thrown:
System.ArgumentException: Unknown type for input RunParallel on IterateList
Environment
Workflow Core version: 3.13.0
.NET version: 8
Deserializer: YAML
Description
When using Workflow Core with YAML workflow definitions, if a custom step inherits from a built-in step (such as
Foreach), the YAML deserializer fails to bind to public properties declared in the base class.Example:
RunParallelis a public property onForeach, but if we create a custom step inheriting fromForeachand specifyRunParallelin YAML, the engine throws:This happens even though:
RunParallelispublicin the baseForeachclass.IterateListStepwithoutRunParallelargument.RunParallelis correct and case matches exactly.Steps to Reproduce
1. Create a custom step inheriting from
Foreach:2. Define YAML workflow using the custom step:
3. Load workflow using:
4. Run the workflow.
Expected Behavior
RunParallelshould be recognized and correctly bound from YAML, even when the step is a subclass ofForeach.Actual Behavior
An exception is thrown:
Environment
Workflow Core version: 3.13.0
.NET version: 8
Deserializer: YAML