In Pega Platform™, activities automate processing. You create activities in Dev Studio with steps that run in the order you specify. Activity rules automate the system to support complex processes, elaborate calculations, or when a rule requires an activity in order to run. As a best practice, check to see if an Out-of-the-Box (OOTB) process exists as custom activities can make it more difficult to maintain your application.
Activities might be appropriate for the following processes:
- Background processing
- Complex loops
- Declare OnChange
- Parallel processing
- Recurring scheduled events
For instance, a Declare OnChange requires using an activity to run a process or suspend work when the value of a specified property changes. After the activity finishes, control returns to the rule that called the activity.
In another example, an insurance company needs to upload submitted insurance claims to the Division of Motor Vehicles. Automated uploads occur at off-peak hours to minimize the impact on users. In Pega Platform, you can configure an activity to automate claim uploads without user intervention.
Activities versus Data transforms
Pega Platform provides standard activities to provide more granular types of processing, such as calling an integration or calling a data source based on a report. For example, a business might have a requirement to save and commit shipments, which have complex data, to a legacy inventory application. If so, you may need to use an activity with an Obj-method to write to the external inventory database.
Data transforms convert source data from one format and class into target data in another format and class. Data transforms can accomplish many common tasks, further eliminating the need for activities, such as:
- Normalizing data for use with a data page.
- Copying a clipboard page to make a new page.
- Mapping properties and their values from an existing page to a new page.
- Defining one or more initial properties on a clipboard page and set their values. A data transform can set many property values on a page in one processing step.
- Appending pages from one Page List property to another.
Automations and Activities
Automations are OOTB rules that you can configure as steps in the Case Designer and as utilities in flows to perform specific tasks, such as moving a case to the next stage or saving case attachments to a document repository. Automations can include standard activities. You can open an automation rule to view its inputs and outputs. You can also use automations in an activity, using the Call-Automation method.