Close popover

Table of Contents

Adding pre- and post- activities to data flows

Version:

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.

  1. Create an instance of the Activity rule.

  2. On the Pages & Classes tab, specify the following details:

    • Page name: For example, RunOptions
    • Class: For example, Data-Decision-DDF-RunOptions
  3. Click the Steps tab and define a sequential set of instructions (steps) for the activity to execute.

    1. In the first step, specify the following details:

      • Method: Page-new
      • Step page: RunOptions
    2. Click Add a step and specify the following details:

      • Method: Property-set
      • Step page: RunOptions
    3. Click the arrow to the left of the Property-set method to expand the method and specify its parameters.

      1. Specify a property in the PropertiesName column.
        • For a pre-activity, specify RunOptions.pyPreActivity.pyActivityName
        • For a post-activity, specify RunOptions.pyPostActivity.pyActivityName
      2. Specify a property value in the PropertiesValue column.
      3. 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.
    4. Click Add a step and specify the following details:

      • Method: DataFlow-Execute
      • Step page: RunOptions
    5. 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.

      1. Specify a name of the data flow.
      2. Select an operation that you want to use.
      3. Specify a Run ID of the data flow or Run Options page (RunOptions).
  4. Click Save.

  5. Optional:

    On the Data Flows landing page, view the available data flows.

  • Data Flows landing page

    This landing page provides facilities for managing data flows in your application. Data flows allow you to sequence and combine data based on various sources, and write the results to a destination. Data flow runs that are initiated through this landing page run in the access group context. They always use the checked-in instance of the Data Flow rule and the referenced rules.

  • Creating a batch run for data flows

    Create batch runs for your data flows to make simultaneous decisions for large groups of customers. You can also create a batch run for data flows with a non-streamable primary input, for example, a Facebook data set.

  • Creating a real-time run for data flows

    Provide your decision strategies with the latest data by creating real-time runs for data flows with a streamable data set source, for example, a Kafka data set.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.