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 input method

This method resolves the type of the metadata if it is a JavaBeans or SDO type and initializes the metadata interfaces appropriately. public void initializeInput(DataExchangeFactory dataBinding, Object metadata) throws DESPIException .


Purpose of the initialize input method

Implement the initializeInput method only if the metadata contains information to be used to initialize the back-end connection for processing the request.

For example, if an application requires you to instantiate a corresponding component on the back-end application to process the request.

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


Sample code

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

Structured record implementation