Quick start: Creating an optional action or process
Each case type in a Pega 7 application contains stages that model the life cycle of the case. Within each stage, steps represent processing actions that must be taken to complete the stage and ultimately resolve the case (see Configure Stages for Your Application).
Steps are normally performed in a prescribed order, based on configuration choices. Pega 7 also allows you to add optional functionality to your case by using either:
- An optional action – performs a single action (for example, sending an email message), and can become a new option in the menu.
- An optional process – calls an entire Flow Rule (for example, starting an investigation on an insurance claim), and can be found in the option of the menu.
Requirements
To perform the example used in this article, you should first create a correspondence. To do this, follow the steps in Quick start: Creating a correspondence
Suggested approach
This article details how to add optional actions to a case. By following the example, you:
Create a process flow
Create an optional process that sends email to the creator of the work object.
- Create a process flow record by clicking .
- Give the flow record a name (for this example, use Send Status Update).
- Verify that the context matches the context of your case, and then click Create and open.
- Remove the default assignment shape.
- Add a Send Email smart shape and set properties to:
- Parties – Owner
- Subject – Request status
- Message – Correspondence
- Correspondence template – Enter the name of a correspondence template.
- If you performed the steps listed in the Requirements section, your template name is CaseStatusMessage.
- If you have not created a correspondence, click the Open icon and create the correspondence template.
- Click OK to close the Send Email properties panel and save updates to the flow.
You now have a process flow (SendStatusUpdate) that can be added to your case type.
Add a case-wide supporting process
Add the new flow action to the
menu.- Open the Case Designer for the case type.
- Click Edit to add a Case-wide supporting process.
- In the Case-wide supporting processes dialog box, select the flow that you created (SendStatusUpdate), and then click OK to close the dialog box.
- Save updates to the case type.
Create a case instance and verify that there is an
option.Add a stage-wide supporting action
You can also add an action to a stage by using the stage configuration dialog box. In this example, an action to change stage is added to a Determine Approval stage.
- Select Configure stage behaviors for the stage (for example, the Determine Approval stage).
- Click the Add a row icon in Optional Actions.
- Add the standard flow action pyChangeStage, and then click OK.
- Save updates to the case type.
Create a case instance and verify that there is a
option in the menu.