Skip to content

DynamicFork sets deprecated dynamicForkJoinTasksParam field — should use dynamicForkTasksParam #159

Description

@nthmost-orkes

Summary

DynamicFork.UpdateWorkflowTask() calls SetDynamicForkJoinTasksParam() which sets the deprecated dynamicForkJoinTasksParam JSON field. The current field is dynamicForkTasksParam. The deprecated field still works today (the server falls back to it), but it will be removed in a future server version.

Tested against: Conductor OSS 3.32.0-rc.9

Root Cause

// Conductor/Definition/TaskType/DynamicFork.cs:39-43
public override void UpdateWorkflowTask(WorkflowTask task)
{
    task.SetDynamicForkJoinTasksParam("forkedTasks");    // ← deprecated field
    task.SetDynamicForkTasksInputParamName("forkedTasksInputs");
}

SetDynamicForkJoinTasksParam() sets WorkflowTask.DynamicForkJoinTasksParam, which serializes as "dynamicForkJoinTasksParam" — the deprecated field name.

The current (non-deprecated) field is "dynamicForkTasksParam", backed by WorkflowTask.DynamicForkTasksParam.

Server Behavior

ForkJoinDynamicTaskMapper.java:156 reads getDynamicForkTasksParam() first, then falls back to getDynamicForkJoinTasksParam() for backward compatibility. The deprecated field currently works, but the fallback path will eventually be removed.

Fix

Add a setter for the non-deprecated field in WorkflowTask and use it in DynamicFork:

// WorkflowTask.cs — add:
public void SetDynamicForkTasksParam(string dynamicForkTasksParam)
{
    this.DynamicForkTasksParam = dynamicForkTasksParam;
}

// DynamicFork.cs — change:
public override void UpdateWorkflowTask(WorkflowTask task)
{
    task.SetDynamicForkTasksParam("forkedTasks");    // non-deprecated
    task.SetDynamicForkTasksInputParamName("forkedTasksInputs");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions