What is the difference between when and fork in flow and when we use them in an application?
@Satya K
Fork is a type in decision shape in a flow. From a fork decision, the process can goto any of the two or more connectors its attched with. To decide which fork connector to select, when rules are used in the connectors. If the when of a connector returns true then the process follows that connector.
Eg: On a screen the user selects a radio button with options Yes/No. After the assignment is completed there will be a decision shape of type fork with two output connectors. On any one of them, a when rule is defined which checks the value of the radio button property as ‘Yes’. If the user selects ‘Yes’, then the when returns true and the process follows this connector, else it follows the other connector.
Hi @Satya K,
When Rule
A When Rule is used to evaluate a condition that returns either true or false. It allows you to conditionally execute parts of the flow, steps in a process, or even UI elements based on specific conditions.
Use a When Rule:
- When you need to conditionally evaluate something that might be used in multiple flows, UI elements, or actions.
- When you want to keep the conditional logic separate and reusable in different parts of the application.
- For visibility conditions, decision-making, or evaluating a single condition in a flow
Fork Shape
The Fork Shape is a specific flow element in Pega that enables the flow to branch based on multiple conditions, which are often evaluated using When Rules or expressions.
Use a Fork Shape:
- When you need to evaluate multiple conditions and route to different flow steps based on those conditions.
- When the decision logic is specific to the flow and does not need to be reused elsewhere.
- For more complex branching scenarios with multiple outcomes in a single flow.
Thanks
Regards
Raja