-
Notifications
You must be signed in to change notification settings - Fork 0
Add ForkJoin task support for simplified parallel execution #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Roruchi <[email protected]>
Co-authored-by: Roruchi <[email protected]>
|
Can you make sure it does not use objects for the fork tasks, but instead i can add it through builder style. Like in the do-while task builder i.e. this is some code on how we can potentially use it: |
…ty mapping Co-authored-by: Roruchi <[email protected]>
Roruchi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make sure it does not use objects for the fork tasks, but instead i can add it through builder style. Like in the do-while task builder i.e. this is some code on how we can potentially use it:
builder.Fork(
wf => wf.ForkReference
forkBuilder =>
{
forkBuilder.AddFork(taskBuilder => {
taskBuilder.AddTask(
wf => wf.Task1,
wf => new Task!Input
{
Name = wf.Task0.Ouput
}
);
taskBuilder.AddTask(
wf => wf.Task2,
wf => new Task2Input
{
Name = wf.Task1.Ouput
}
);
}
}
);
Co-authored-by: Roruchi <[email protected]>
Co-authored-by: Roruchi <[email protected]>
Co-authored-by: Roruchi <[email protected]>
…1-343b0f7eaf1d Add builder-style API for ForkJoin tasks with fluent subtask configuration
This PR adds support for the ForkJoin operator in conductor-sharp, providing a simpler alternative to the existing DynamicForkJoin for cases where you just want to run tasks in parallel for performance reasons.
What's Added
ForkJoin Task Implementation
ForkJoinTaskModelandForkJoinInputmodels for type-safe workflow definitionForkJoinTaskBuilderthat generates proper FORK_JOIN and JOIN tasksAddTask()for fluent workflow buildingKey Features
forkTasksandjoinOnpropertiesUsage Example
Generated Workflow Structure
The ForkJoin implementation generates two tasks:
forkTaskspropertyjoinOnpropertyThis follows the standard Conductor ForkJoin pattern as documented at https://docs.conductor-oss.org/documentation/configuration/workflowdef/operators/fork-task.html
Testing
This implementation provides a much simpler API compared to DynamicForkJoin when you have a known set of tasks to run in parallel, addressing the performance use case mentioned in the issue.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.