You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current process framework API for defining step transitions requires developers to manually handle edges between steps using methods like OnEvent, OnFunctionResult, and SendEventTo. While powerful, this approach introduces verbosity and cognitive overhead when defining sequential processes.
The proposed changes add the following fluent methods:
StartWith:
Specifies the starting step, bound to an input event.
AndThen:
Chains subsequent steps using either:
Default function result events (OnFunctionResult).
Explicit input events (OnEvent).
AndFinally:
Marks the final step and automatically stops the process after execution.
The new methods automatically connect steps and ensure transitions are defined cleanly, without requiring developers to manually link steps using SendEventTo.
Comparison: Old vs New Syntax
Old Syntax (Verbose and Manual):
github-actionsbot
changed the title
.NET: Simplify the Fluent Syntax for the process framework to improve usability and Reduce Cognitive Overload
.Net: Simplify the Fluent Syntax for the process framework to improve usability and Reduce Cognitive Overload
Dec 17, 2024
Proposal
The current process framework API for defining step transitions requires developers to manually handle edges between steps using methods like OnEvent, OnFunctionResult, and SendEventTo. While powerful, this approach introduces verbosity and cognitive overhead when defining sequential processes.
The proposed changes add the following fluent methods:
StartWith:
Specifies the starting step, bound to an input event.
AndThen:
Chains subsequent steps using either:
Default function result events (OnFunctionResult).
Explicit input events (OnEvent).
AndFinally:
Marks the final step and automatically stops the process after execution.
The new methods automatically connect steps and ensure transitions are defined cleanly, without requiring developers to manually link steps using SendEventTo.
Comparison: Old vs New Syntax
Old Syntax (Verbose and Manual):
New Syntax (Simplified and Fluent):
Benefits
Simplified Syntax:
Transitions between steps are intuitive and fluent, eliminating the need for manual edge linking.
Reduced Cognitive Overload:
Developers no longer need to handle OnEvent and SendEventTo explicitly for each step.
Improved Readability:
The process flow is clean, readable, and aligns with natural language patterns.
The text was updated successfully, but these errors were encountered: