Performing Pre-Processing and Post-Processing Tasks

This section discusses how to:

  • Set general pre-processing and post-processing options.

  • Code pre-processing and post-processing tasks.

To perform pre-processing and post-processing tasks, you must select the appropriate Message Header or Message Trailer option on the Full Table Publish Rules page or on the Batch Publish Rules page.

To set general pre-processing and post-processing options:

  1. Access the Full Table Publish Rules page or the Batch Publish Rules page.

    • To access the Full Table Publish Rules pages, select Enterprise Components > Integration Definitions > Full Table Publish Rules.

    • To access the Batch Publish Rules pages, select Enterprise Components > Integration Definitions > Batch Publish Rules.

  2. In the Message Options section, select the appropriate options:

    Field or Control

    Description

    Message Header

    Select this option to perform pre-processing tasks on a service operation message.

    Message Trailer

    Select this option to perform post-processing tasks on a service operation message.

  3. Click the Save button.

The type of processing that you are performing determines the location in the message where you insert the pre-processing and post-processing logic.

Using PeopleSoft-Delivered Functions for Pre-Processing and Post-Processing

Consider using the following PeopleSoft-delivered functions in pre-processing logic:

Field or Control

Description

Delete_Existing_Data Function

The Delete_Existing_Data function loops through the default message definition records and deletes all the rows from each record. It also deletes all the rows from the related language record.

Subscribe_FullReplication Function

The Subscribe_FullReplication function is called from subscription processes that do full replication. This function checks the first instance of PSCAMA.BATREPFIRSTMSG and if this flag is set to yes, it invokes delete processing that deletes all the data from every record in the message as well as related language records. It then invokes the same Proc_Sub_Rowset processing that incremental replication processing uses. It loops through the message hierarchy and inserts the data into the appropriate tables based on PSCAMA.AUDIT_ACTION and the message definition records.

Coding Pre-Processing and Post-Processing Tasks

The type of processing that you are performing, sequential or parallel, determines the location in the message where you insert pre-processing and post-processing logic.

The following code example shows sample pre-processing and post-processing code. Section numbers have been entered as remarks to show the location to insert code based on the processing that you are performing.

Processing

Task

Section

Parallel

Pre-processing

Section 1

Sequential

Pre-processing

Section 2

Sequential

Post-processing

Section 3

Parallel

Post-processing

Section 4

Important! If you change processing modes from sequential processing to parallel processing or vice versa, you must move any pre-processing and post-processing code to the appropriate section in the message, as described in the table.

If &ParallelFS Then
   ...
      If &Pre_Process_Flg = "Y" Then

         rem ****** Begin Pre-Processing Logic for parallel-enabled FullSync *****;
         Delete_Existing_Data(&MSG);


         /************************************************************************/
         /*                                                                      */
         /*                            Section 1                                 */
         /*                                                                      */
         /************************************************************************/

         rem ****** End Pre-Processing Logic for parallel-enabled FullSync ******;

      End-If;


End-If;

&MSG_ROWSET = &MSG.GetRowset();
&MSG_LANG_CD = &MSG_ROWSET(1).PSCAMA.LANGUAGE_CD.Value;
&MSG_BASE_LANG_CD = &MSG_ROWSET(1).PSCAMA.BASE_LANGUAGE_CD.Value;
&FULL_INCR = "FULL";

Evaluate &MSG_ROWSET(1).PSCAMA.MSG_SEQ_FLG.Value
When "H"
   If Not &ParallelFS Then

   rem ****** Begin Pre-Processing Logic for nonparallel-enabled FullSync ******;
   Delete_Existing_Data(&MSG);


    /*************************************************************************/
    /*                                                                       */
    /*                                Section 2                              */
    /*                                                                       */
    /*************************************************************************/

   rem ****** End Pre-Processing Logic for nonparallel-enabled FullSync ******;

   End-If;
   Break;
When "T"
   If Not &ParallelFS Then 


    /*************************************************************************/
    /*                                                                       */
    /*                                Section 3                              */
    /*                                                                       */
    /*************************************************************************/


   rem ** Insert Post-Processing Logic Here for nonparallel-enabled FullSync **;

   End-If;
   Break;
When-Other
   Proc_Sub_Rowset(&MSG_ROWSET);
   rem ****** put additional process like editing here ********;

If &ParallelFS Then
    ...

   If &Post_Process_Flg = "Y" Then


    /*************************************************************************/
    /*                                                                       */
    /*                                Section 4                              */
    /*                                                                       */
    /*************************************************************************/


   rem *** Insert Post-Processing Logic Here for parallel-enabled FullSync ***;

   End-If;
   ...
   Break;

End-Evaluate;