Ariba Supplier OnRamp 7.1 | webMethods Ariba Supplier OnRamp Documentation | webMethods Ariba Supplier OnRamp Installation and User’s Documentation | Development Utilities | Using the Persistence Utility | Storing Data in External Data Stores
 
Storing Data in External Data Stores
To store the buyer session metadata persistently in an external data store, you must implement services to create, read, and delete the buyer session metadata into the external persistent store. These services should implement the service specifications of saveBuyerSessionDataSpec, getBuyerSessionDataSpec, and removeBuyerSessionDataSpec described in wm.b2b.cxml.utils.persistence.spec.
Note:
The services in wm.b2b.cxml.utils.persistence.memory folder implement a memory-based store for buyer session data. These services usable since Ariba Supplier OnRamp 1.0 are now deprecated and may be removed. They should not be used because they will not scale to a clustered server environment. The services are provided in this release to preserve backward compatibility; use of these services is not recommended for new implementations.
*To store metadata in the Integration Server session object
1. Map the relevant buyer session metadata fields to the record object wm.b2b.cxml.utils.persistence:BuyerSession.
2. Invoke the service wm.b2b.cxml.utils.persistence.session:saveBuyerSessionData with the following input arguments:
Field Name
Value
buyerSessionID
Leave this field blank if you are storing the buyer data for the first time. If buyerSessionID is blank, this service will store the buyer data in the session object and return to you the session object's ID in the buyerSessionID output field.
If you have already stored the buyer data in a session object using this service, you may update the buyer data in that session object by calling this service with buyerSessionID set to the ID of that session object.
Typically, you would embed the buyerSessionID returned by this service in the catalogURL or as a hidden field in web page forms. When the buyer is finished shopping, the shopping cart system retrieves the buyer data by calling the retrieveBuyerSessionData service with this ID.
BuyerSession
A record of the form wm.b2b.cxml.utils.persistence:BuyerSession. Contains the punchout buyer session data.
This service stores the BuyerSession record in a session object in a record called sessionData. (The BuyerSession record exists in the session object as sessionData/BuyerSession.)
newSessionTimeoutMS
Optional. If you are storing the buyer data for the first time, you can specify how long (in milliseconds) the session object should be maintained before it is de-allocated.
3. To retrieve the buyer session metadata, invoke the service wm.b2b.cxml.utils.persistence.memory:getBuyerSessionData. Set the buyerSessionID input parameter to the ID of the session object you want to retrieve.
4. To remove the buyer metadata from the session object, invoke the service wm.b2b.cxml.utils.persistence.memory:removeBuyerSessionData. This service will remove the BuyerSession record from the session object.
Note:
Make sure you remove buyer session metadata when the session is no longer used (that is, after the session expires or the order request has be fulfilled).