IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Structured record implementation

Get next method

The client application invokes this method to retrieve data through the adapter. For outbound processing, this method is used to get the response data back from the adapter. For inbound processing, this method is called to get the inbound data from the adapter. public boolean getNext(boolean copyValues) throws DESPIException


Purpose of the getNext method

Use the argument copyValues to fill in values as part of getNext.

When the value for copyValues is set to True, the getNext() method should fill in data in output cursors as part of the call.

When the value for copyValues is set to False, the getNext() method should just keep the instance of cursors ready, but not fill in the data. The data would be filled in using the pushValue() call, which passes an Xpath expression.

This method can be called multiple times by the client application if the operation can return multiple records from the backend application.

For example, if the retriveAll operation could return "N" records from the backend application, for each call to the getNext() method the implementation should fill in data of one record from the backend application into OutputCursors/Accessors. It should keep track of which record it needs to do next so in subsequent call to getNext() it can fill in next record.

This method would be using the eisRepresentation being held on to the Record instance, this is the backend representation of data which is used in this method to read fields and set those in Output Cursors and Accessors.


Sample code

For a sample of how to implement the getNext() method, refer to the EIS Simulator Adapter code sample.

Structured record implementation