Pre- and post-processing of data flows
You can specify the activities that are executed before and after a data flow run. Use them to prepare your data flow run and perform certain actions when the run ends. Pre-activities run before assignments are created. Post-activities start at the end of the data flow regardless of whether the run finishes, fails, or stops. Both pre- and post-activities run only once and are associated with the data flow run.
To create pre- and post-activities do the following steps:
- Create an instance of the Activity rule.
-
On the
Pages & Classes
tab, specify the following details:
- Page name : For example, RunOptions
- Class : For example, Data-Decision-DDF-RunOptions
-
Click the
Steps
tab and define a sequential set of instructions (steps) for the activity to execute.
-
In the first step, specify the following details:
- Method : Page-new
- Step page : RunOptions
-
Click
Add a step
and specify the following details:
- Method : Property-set
- Step page : RunOptions
-
Click the arrow to the left of the
Property-set
method to expand the method and specify its parameters.
-
Specify a property in the
PropertiesName
column.
- For a pre-activity, specify RunOptions.pyPreActivity.pyActivityName
- For a post-activity, specify RunOptions.pyPostActivity.pyActivityName
- Specify a property value in the PropertiesValue column.
-
Optional:
Run an activity on all
Pega Platform
nodes that are configured as part of the Data Flow service:
- For a pre-activity, set the .pyPreActiviy.pyRunOnAllNodes as True.
- For a post-activity, set the .pyPostActivity.pyRunOnAllNodes as True.
-
Specify a property in the
PropertiesName
column.
-
Click
Add a step
and specify the following details:
- Method : DataFlow-Execute
- Step page : RunOptions
-
Click the arrow next to the
DataFlow-Execute
method to expand the method and specify details of a data flow that you want to run.
- Specify a name of the data flow.
- Select an operation that you want to use.
- Specify a Run ID of the data flow or Run Options page ( RunOptions ).
-
In the first step, specify the following details:
- Click Save .
- On the Data Flows landing page, view the available data flows.