Add synchronous join support to FORK_JOIN (#619) #680
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #619 - adds property-based control for synchronous vs asynchronous join behavior in FORK_JOIN tasks.
Implementation
Property-Based Control
joinModeproperty toWorkflowTask(values:"SYNC"or"ASYNC")"ASYNC"for backward compatibilityJoinTaskMapperto join task input dataSynchronous Behavior via Evaluation Offset
Rather than overriding
isAsync()(which doesn't support per-task control), synchronous behavior is achieved through the evaluation offset mechanism:This approach works within the existing framework constraints while providing responsive synchronous-like behavior.
Usage Example
{ "name": "join_task", "taskReferenceName": "join_ref", "type": "JOIN", "joinOn": ["task1", "task2"], "joinMode": "SYNC" }Backward Compatibility
joinModecontinue using async behaviorTests
Convergence Notes: OSS vs Orkes Implementation
Current Orkes Implementation (OrkesJoin)
Orkes Conductor replaces the OSS
Joincomponent entirely withOrkesJoin:isAsync() = false- no property-based controlexpressionandevaluatorType(GraalJS)Convergence Path Options
Option 1: Orkes adopts OSS property-based approach
OrkesJoinwith enhanced OSSJoin+ property controljoinMode: "SYNC"by default in Orkes for backward compatibilityOption 2: Keep separate implementations
Implementation Compatibility
This PR's approach is convergence-friendly:
The property-based approach could serve as foundation for future convergence if Orkes wants to support both sync and async modes with user control.