Skip to content

Child workflow is not dispatched #6608

@kfrajtak

Description

@kfrajtak

Description

The child workflow is not dispatched using DispatchWorkflow is used.

Steps to Reproduce

  1. Detailed Steps: Just run the attached project.

  2. Code Snippets:
    This is the parent workflow

public class DispatchAndWaitWorkflow : WorkflowBase
{
    protected override void Build(IWorkflowBuilder builder)
    {
        builder.WithDefinitionId(nameof(DispatchAndWaitWorkflow));
        builder.Root = new Sequence
        {
            Activities =
            [
                new WriteLine("*** >>> Hello from Parent!"),
                new DispatchWorkflow
                {
                    WorkflowDefinitionId = new(nameof(ChildWorkflow)),
                    WaitForCompletion = new (true)
                },
                new WriteLine("*** <<< Bye from Parent!")
            ]
        };
    }
}

and the child workflow

public class ChildWorkflow : WorkflowBase
{
    protected override void Build(IWorkflowBuilder builder)
    {
        builder.WithDefinitionId(nameof(ChildWorkflow));
        builder.Root = new Sequence
        {
            Activities =
            [
                new WriteLine(ctx => "*** >> Hello from Child!"), /* set breakpoint here, it is never hit */
                new Delay(TimeSpan.FromMilliseconds(250)),
                new WriteLine("*** >> Bye from Child!"),
            ]
        };
    }
}
  1. Attachments: The minimal project is attached - workflows.zip

  2. Reproduction Rate: Every time

Expected Behavior

I expect the child workflow to be dispatched and executed.

Actual Behavior

Child workflow is not dispatched and executed.

Environment

  • Elsa Package Version: 3.3.5
  • Operating System: Windows 10

Log Output

Log does not show anything, since the child workflow is not executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions