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

Initialize output method

public void initializeOutput(DataExchangeFactory dataBinding,Object metadata) throws DESPIException.


Purpose of the initialize output method

Implement this method if there is some initialization needed to support record retrieval from getNext().

This method should first invoke super.initializeInput() to initialize the cursors, accessor, and metadata.


Sample code

Here is a coding sample on how to implement the intitializeOutput method:
public void initializeOutput(DataExchangeFactory factory, Object[] metadata)
throws DESPIException {
super.initializeOutput(factory, metadata);
objectNaming = new ObjectNaming();
objectSerializer = new ObjectSerializer(objectNaming);
try{
objectAnnotations = super.getMetadata().getAnnotations
(FooConstants.METADATA_NAMESPACE);}catch(Exception e){
throw new DESPIException(e);} }

Structured record implementation