Process Flow
An extension module calls a number of service and callback functions to perform its processing. The actual functions that are called depend on the processing that the module is required to perform.
Example
The sequence diagram for a typical module execution is as shown in the following illustration.

The peer/node interaction block is shown in the following illustration.

A typical execution block is shown in the following illustration.

Notes:
- A module may be loaded into the IBM® SPSS® Modeler server process at the time the server starts, or it may be loaded later on demand when its services are first required.
- When the module has been loaded, the host invokes the service function clemext_initialise once.
- When the module is loaded and initialized, the host may query the module using the service function clemext_getModuleInformation.
- After the module is loaded, its services are invoked via peer objects that the module provides. Within the module, the peer object is created by the service function clemext_create_peer as a counterpart to the host’s node object to manage the execution of a task as directed by the host application. Multiple peer objects of the same type can exist and be executed concurrently within a process at one time.
- When a peer object has been created, it can be configured by the service function clemext_peer_configure.
- At this point, the peer may execute callback functions to obtain information from the client, such as clemext_node_getDataModel and clemext_node_getParameters.
- IBM SPSS Modeler obtains the output data model from the peer instance by means of a clemext_peer_getDataModel service function.
- Execution of the peer instance begins with the clemext_peer_beginExecution service function.
- The clemext_peer_nextRecord service function moves the focus to the next record in the peer’s result set (or to the first record if the function is called for the first time). This is followed by the clemext_peer_getRecordValue service function, which returns the value of a specified field within the current record.
- The iterator callback functions clemext_iterator_nextRecord and clemext_iterator_getRecordValue can be called by the CLEF module to sequence through the input records and return specified field values.
- Execution of the peer instance ends with a call to the clemext_peer_endExecution service function.
- The peer instance is removed by calling clemext_destroy_peer.
- Before the module is unloaded, the host invokes the service function clemext_cleanup.
- A module may be unloaded either when the server process shuts down or earlier when its services are no longer required.