IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Enterprise Service Bus programming > Imports and exports
Function selector
The function selector determines which operation defined on the associated interface is invoked.
Interfaces exposed using an export may contain more than one operation. When an inbound request is received, a function selector is used by the export to determine which operation to invoke. The message at the export includes raw transport header information and encoded data for the body of the message. The function selector can use header data, body data, or both, to determine which of the operations on the associated interface can be invoked. As this mechanism is likely to be dependent on the protocol headers, the implementation of the function selector will be protocol specific.
For example, a JMS message header can specify the function name and a function selector can retrieve this value. This function name is then bound to an operation on the export binding. WebSphere ESB provides the following function selectors:
- One Operation Function Selector, returns the operation defined on the interface.
- TargetFunctionName header, returns the value of the TargetFunctionName property stored in the message header. This is used for module to module communication.
- Message Type Selector, uses the JMS or MQ message type property in the inbound message to determine the function name.
- MQ message body format, uses the MQ message body format as the function name.
- URL and HTTP method, uses the URL context path and HTTP method to determine the function name.
- Web Service service gateway function selector, uses the web service message to determine the operation name.
An API is provided for custom function selectors to be created. These are implemented with a Java class that implements the commonj.connector.runtime.FunctionSelector interface.