Skip to content

YAML Deserializer Does Not Bind Inherited Property RunParallel for Custom Step Types for Foreach Step #1375

@Ayush-dh-dev

Description

@Ayush-dh-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions