What is flow action in pega?
A flow action is a rule, which controls the user interaction with a work object to complete an assignment. It is an instance of the Rule-Obj-FlowAction rule type.
Types of Flow actions in pega
- Local Flow action
- Connector Flow action
Local flow action:
Local flow actions are optional and can not advance the work object to the next shape. We can have one or more local flow actions and can perform one or more flow action. For example: attach a note, attach a screenshot.
Connector flow action:
Connector flow action advances the work object after finishing the assignment. The user will be presented with one connector flow action based on the likelihood when a user opens an assignment.
What is a likelihood in pega?
The likelihood is a value between 1-100 which we need to give for each flow action to determine pega to display the flow action when we open an assignment. If we have multiple flow actions that are coming from an assignment shape, pega will display the flow action which is having the highest likelihood value.
Pre and post-processing in flow actions
If we want to initiate some values or set some properties or copy data from one property to another, we can add pre and post-processing actions to a flow action in the Actions tab.
When a flow action is configured with a data transform or an activity in the pre-processing section, Pega performs the action whenever a user selects the flow action as well as each time the user is presented with the assignment.
Post-processing:
When a flow action is configured with a data transform or an activity in the post-processing section, Pega performs the action each time you perform the action, which means each time when you click on submit (or perform any action buttons).
Pre- and post-processing side by side
| Pre-processing | Post-processing | |
|---|---|---|
| Runs | Before the form is shown, every time the flow action is presented | After the user submits and validation passes, before the case moves on |
| Typical job | Set defaults, load data, prepare values for display | Save the result, copy values, update status, call a service |
| Can be | A data transform or an activity | A data transform or an activity |
A worked example
A bank's Approve Loan flow action shows the manager a form.
- Pre-processing data transform: set
.ReviewDateto today and copy the customer's risk band from a data page, so the form opens already filled. - Post-processing data transform: after the manager submits, set
.ApprovedByto the current operator and.Statusto Approved, and call an activity that queues the approval letter.
Because the pre-processing runs each time the form is shown, avoid setting a value the user may already have typed, or you will overwrite their work when they come back to the form.
Tips
- Use a data transform for simple property setting, and an activity only when you need a method that a data transform does not offer.
- Keep pre-processing light, since it runs on every display of the form.
- Do not put validation in post-processing. Validation belongs in the validate rule, which runs before it.
Interview tip
Say what a flow action is, explain local versus connector flow actions and likelihood, then contrast pre- and post-processing with the loan example. Related: client and server side validation.


No comments:
Post a Comment