Use the Call instruction with the Data-Decision-DDF-RunOptions.pyPreActivity and Call Data-Decision-DDF-RunOptions.pyPostActivity activities to define which activities should be executed before and after batch or real-time data flow runs that are not single case runs. Use the activities 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.
Create an instance of the Activity rule by selecting Activity from the Technical category.
In the activity steps, use one of the following methods:
Call Data-Decision-DDF-RunOptions.pyPreActivity - It executes an activity before the data flow run. The activity must be defined in the applies to class of the data flow, and it can use other methods to manipulate the run, for example, retrieve progress information, stop the data flow run, etc.
Call Data-Decision-DDF-RunOptions.pyPostActivity - It executes an activity after the data flow run. The activity must be defined in the applies to class of the data flow.
Click the arrow to the left of the Method field to expand the method and specify its parameters.
Click Save.
The Data-Decision-DDF-RunOptions.pyPreActivity activity can also set Param.SkipRun="true", allowing you to instruct the data flow engine to ignore the rest of the run. Note that you can also use Call Data-Decision-DDF-RunOptions.pxStopRunById to achieve the same result. The data flow engine passes the RunOptions page parameter to the activity containing the current run configuration page. The activity can change this configuration. If the activity fails, the data flow engine does not execute the data flow and this run is marked as failed.
The status of the data flow run does not constraint the execution of the Data-Decision-DDF-RunOptions.pyPostActivity activity; the activity is executed even if the data flow run failed or stopped. The data flow engine passes the RunOptions page parameter to the activity containing the current run configuration page. The activity cannot change this configuration.