Case 1: A Nonrowset-Based Message Does Not Exist for the Service Operation in PeopleSoft Interaction Hub

This topic provides sample PeopleCode for business attributes service operations. This sample PeopleCode calls functions from the PeopleSoft-delivered subscription library which processes rowset-based transactions. The sample code can be copied into an application class for Business Data Attributes handlers.

Examples are provided for full synchronization and incremental synchronization.

Full Synchronization

Use this example for full synchronization:

/* Start of sample code */
import PS_PT:Integration:INotificationHandler;

class BusUnitTblHRFullSync implements PS_PT:Integration:INotificationHandler
   method BusUnitTblHRFullSync();
   method OnNotify(&_MSG As Message);
end-class;

Declare Function Subscribe_FullReplication PeopleCode FUNCLIB_EOEIP.SUBSCRIBE_MSG_PC FieldFormula;
Declare Function Delete_Existing_Data PeopleCode FUNCLIB_EOEIP.SUBSCRIBE_MSG_PC FieldFormula;

/* constructor */
method BusUnitTblHRFullSync
end-method;

method OnNotify
   /+ &_MSG as Message +/
   /+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/
   /* Variable Declaration */
   
   Local Message &msg;
   Local Rowset &msgRowset;
   
   &msg = &_MSG;
   &msgRowset = &msg.GetRowset();
   
   Evaluate &msgRowset(1).PSCAMA.MSG_SEQ_FLG.Value
   When "H"
      Delete_Existing_Data(&msg);
      Break;
   When "T"
      rem ********** put code for cleanup here *******************;
      Break;
   When-Other
      Subscribe_FullReplication(&msg);
      Break;
   End-Evaluate;
   
end-method;
/* End of sample code */

Incremental Synchronization

Use this example for full synchronization:

/* Start of sample code */
import PS_PT:Integration:INotificationHandler;
class BusUnitTblHRSync implements PS_PT:Integration:INotificationHandler
   method BusUnitTblHRSync();
   method OnNotify(&_MSG As Message);
end-class;
Declare Function Subscribe_IncrReplication PeopleCode FUNCLIB_EOEIP.SUBSCRIBE_MSG_PC FieldFormula;
/* constructor */
method BusUnitTblHRSync
end-method;
method OnNotify
   /+ &_MSG as Message +/
   /+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/
   /* Variable Declaration */

   Local Message &msg; 
   &msg = &_MSG;   
   Subscribe_IncrReplication(&msg);
   end-method;
/* End  of sample code */