Configuring RI_AuditInsertABStagingManager to Pass Audit Information

The RI_AddressBookStagingManager reference implementation is an example of a published business service that adds an address book record directly to the interoperability table.

This section describes how to configure the RI_AuditInsertABStagingManager class to extend RI_AddressBookStagingManager, so that audit information is passed with the address book record that is added to the interoperability table.

For more information about the AddressBookStagingManager reference implementation, see the JD Edwards EnterpriseOne Tools Interoperability Reference Implementations Guide.

Oracle provides the JPR95002 – RI_AuditInsertABStagingManager reference implementation, which you can use to extend the RI_AddressBoookStagingManager published business service to pass audit information.

This table describes the components of JPR95002 –RI_AuditInsertABStagingManager and the location of these components in the JD Edwards EnterpriseOne installation directory:

Reference Implementation

Description

Location

RI_AuditInsertABStagingManager

A published business service class that extends the AddressBookStagingManager reference implementation so that it inserts a record with audit information into the interoperability table.

B9\STAGINGA\java\source\oracle\e1\bssv\JPR95002

auditInsertAddressBookStaging

A method in the RI_AuditInsertABStagingManager that is used to insert an address book record with audit information into the interoperability table. This method uses the insertAddressBookStaging method of the RI_AddressBookStagingManager class to insert the address book record.

Same as previous.

RI_AuditInsertAddressBookStaging

The value object class that contains get and set methods for the GUID, application ID, workstation name, and IP address.

B9\STAGINGA\java\source\oracle\e1\bssv\JPR95002\valueobject

To configure RI_AuditInsertABStagingManager to pass audit information:

  1. Create a new value object that extends the value object of the existing published business service, which in this case is RI_AddressBookStagingManager.

    For example:

    public class RI_AuditInsertAddressBookStaging extends 
    RI_InsertAddressBookStaging implements Serializable
    

    RI_AuditInsertAddressBookStaging is the new value object.

    RI_InsertAddressBookStaging is the value object of the RI_AddressBookStagingManager published business service.

  2. In the RI_AuditInsertAddressBookStaging value object, add fields for the GUID, application ID, workstation name, and IP address.

    Generate accessors (get and set methods) for these fields.

  3. Create a new published business service that extends the existing published business service.

    For example:

    public class RI_AuditInsertABStagingManager extends 
    RI_AddressBookStagingManager {
    }
    

    RI_AddressBookStagingManager is the existing published business service that inserts an address book record into the interoperability table.

    RI_AuditInsertABStagingManager is the new published business service that uses the RI_AddressBookStagingManager class to insert an address book record with audit information into the interoperability table.

  4. Add a new published method that inserts an address book record with audit information into the interoperability table.

    This method uses the published method of the parent published business service to insert the address book record. Make the newly created value object a parameter of this method.

    For example:

    public RI_ ConfirmInsertAddressBookStaging 
         auditInsertAddressBookStaging(RI_AuditInsertAddressBookStaging vo) throws 
         BusinessServiceException
    

    In this example, auditInsertAddressBookStaging is the method that is used to insert an address book record with audit information into the interoperability table. This method uses the insertAddressBookStaging method in the RI_AddressBookStagingManager to insert the address book record.

    The new value object, RI_AuditInsertAddressBookStaging, is passed as a parameter. The return value of the auditInsertAddressBookStaging method is RI_ ConfirmInsertAddressBookStaging – which indicates whether the address book record was successfully inserted into the interoperability table or errors occurred.

  5. In the new published business service, RI_AuditInsertABStagingManager, create the context.

    This is where you set the audit information.

    For example:

    context = startPublishedMethod(context, "auditInsertAddressBookStaging", 
                vo);
    
  6. Add code that checks whether a GUID is provided in the request, and if not, generates a GUID in the class.

    For example:

      if(vo.getGuid()== null || vo.getGuid().equals("")) {
                    guid = UniqueKeyGenerator.getNextGuid();;
                }
                else {
                    guid = vo.getGuid(); 
                }
    
  7. Set the audit fields in the context object.

    For example:

    context.setGUID(guid);
      context.setApplicationID(vo.getApplicationID());
          context.setWorkstationName(vo.getWorkstationName());
          context.setIPAddress(vo.getIpaddress());
    
  8. Call the method of the existing business service class and return the response.

    For example:

            RI_ConfirmInsertAddressBookStaging confirmVO = 
            this.insertAddressBookStaging(context, connection, vo);
           finishPublishedMethod(context, "auditInsertAddressBookStaging");         
           return confirm;