conductor-oss / conductor-oss/ruby-sdk

dynamic_fork sets deprecated dynamicForkJoinTasksParam — should use dynamicForkTasksParam

Open Beginner friendly
#23 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary

`TaskRef#apply_dynamic_fork_fields` assigns the DSL's `dynamic_fork_tasks_param` option to the **deprecated** `dynamicForkJoinTasksParam` JSON field instead of the current `dynamicForkTasksParam` field. The server still accepts the deprecated field via a fallback path, so it currently works — but the fallback may be removed in a future server version.

Tested against: **Conductor OSS 3.32.0-rc.9**

## Root Cause

```ruby
# lib/conductor/workflow/dsl/task_ref.rb:171-174
def apply_dynamic_fork_fields(wf_task)
wf_task.dynamic_fork_join_tasks_param = @options[:dynamic_fork_tasks_param] # ← deprecated field
wf_task.dynamic_fork_tasks_input_param_name = @options[:dynamic_fork_tasks_input_param]
end
```

The `WorkflowTask` model has two distinct fields:
- `dynamic_fork_join_tasks_param` → JSON `"dynamicForkJoinTasksParam"` (deprecated)
- `dynamic_fork_tasks_param` → JSON `"dynamicForkTasksParam"` (current)

The option key `:dynamic_fork_tasks_param` correctly names the current field, but the assignment goes to the deprecated attribute.

## Server Behavior

`ForkJoinDynamicTaskMapper.java:156` reads `getDynamicForkTasksParam()` first; if null, falls back to `getDynamicForkJoinTasksParam()`. The deprecated fallback currently works, but is subject to removal.

## Fix

```ruby
def apply_dynamic_fork_fields(wf_task)
wf_task.dynamic_fork_tasks_param = @options[:dynamic_fork_tasks_param] # non-deprecated
wf_task.dynamic_fork_tasks_input_param_name = @options[:dynamic_fork_tasks_input_param]
end
```

Related: C# SDK [#159](https://github.com/conductor-oss/csharp-sdk/issues/159) — same pattern.

Contributor guide

Open the contributing guide

Research direction

Start in lib/conductor/workflow/dsl/task_ref.rb at TaskRef#apply_dynamic_fork_fields and inspect the WorkflowTask attributes named in the issue. Compare the generated field with ForkJoinDynamicTaskMapper.java:156, then run the repository’s existing tests and verify the current dynamicForkTasksParam JSON field is populated without relying on the deprecated field.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, ruby
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.