runMap()

Runs the map you specify.

Syntax

BusObj[] runMap(String mapName, String mapType,
                BusObj[] srcBOs, cwExecCtx)
 

Parameters

mapName
The name of the map to run.
mapType
The type of the map to run. Use the following constant only, which is defined in the DtpMapService class: CWMAPTYPE - an IBM WebSphere InterChange Server Express map
srcBOs
An array of business objects that are the source business objects for mapName.
cwExecCtx
A variable that contains the execution context for the current map. This variable is defined in the code thatMap Designer Express generates for every map.

Return values

Returns an array of business objects that are the destination business objects of mapName.

Exceptions

MapFailureException - If an error occurs while attempting to run mapName.

MapNotFoundException - If mapName is not found in the repository.

CxMissingIDException - See maintainSimpleIdentityRelationship().

Notes

Use the runMap() method to call a submap from within another map. For more information on calling submaps, see "Transforming with a submap".

Examples

The following code calls a submap to map an application-specific Address business object to the generic Address business object:

// Create the BusObj Array
 BusObj[] rSrcBOs = new BusObj[1];
 rSrcBOs[0] = MyCustomerObj.MyAddressObj[0];
  
 // Make the call to the map service
 OutObjName = DtpMapService.runMap(MyAppAddressToGenAddress,
    DtpMapService.CWMAPTYPE,rSrcBOs,cwExecCtx);
 

See also

"Transforming with a submap"

Copyright IBM Corp. 2003