Business Processes and Rules: Siebel eBusiness Application Integration Volume IV > Data Mapping Using Scripts > EAI Value Maps >

EAIGetValueMap unmappedKeyHandler Argument


The unmappedKeyHandler provides a flexible mechanism for handling cases where keys are not found in the EAI Value Map. In most situations, you can use literal values for defaults or you can use one of several predefined handler functions. However, you can also provide your own handler function.

The technique you use for handling unmapped values depends on the data being mapped.

Typical strategies include:

You can also write a custom handler function. You need to write a function taking three arguments: key, type, and direction. The value your function returns is used as the translation. For example:

function MyUnmappedLangHandler (key, type, direction)
{
return ("Unknown Language: " + key);
}

var langMap = EAIGetValueMap ("SAP Language", "Siebel Inbound", MyUnmappedLangHandler);

// Lookup a nonexistent language code.

var translatedValue = langMap.Translate ("ABC"); // returns "Unknown Language: ABC"


 Business Processes and Rules: Siebel eBusiness Application Integration Volume IV 
 Published: 18 April 2003