Reusing Audit Data for Multiple Business Functions

When a third party application runs multiple business functions within one transaction, you can reuse the same audit data that was passed in the first business function call for all subsequent business function calls within the same transaction.

The sample code in this section shows how the salesorder business function is programmed to use the same GUID as the purchaseorder business function. In this example, if you do not configure the salesorder business function to use the same audit values, the API generates default audit information, which includes a new GUID, the word "INTEROP" for the application ID, the local workstation name, and the IP address of the local workstation.

In this example, to configure the other audit parameters, replace GUID with the application ID, workstation name, or IP address.

Step 1: 

ExecutableMethod purchaseorder = bsfnMethod.createExecutable();
... .

ExecutableMethod saleseorder = bsfnMethod.createExecutable();

... 

BSFNExecutionWarning warning=purchaseorder.execute(sessionID);

Step 2:

String firstguid = purchaseorder.getGUID();

Step 3:
 
salesorder.setGUID(firstguid);

BSFNExecutionWarning warning=purchaseorder.execute(sessionID);