SMIS SPI

SMIS provides the following SPI components.

Manager SPI

The following table describes the functions used to develop a manager.

Manager SPI

Function

Parameter

Return

Description

appendTasks

 

 

Directs the source adapter to retrieve records, converts these records into tasks, and calls the task manager to push these tasks into the task queue.

preProcess

task

Boolean

Prepares the destObj and actions. If it returns false, the task will be ignored and removed.

process

task

Boolean

Returns true or false when the task is or is not processed successfully.

postProcess

task

 

Performs postprocessing after the task is processed.

getDestObj

 

Object

SCFile or Object.

getAction

 

String

Returns a customized action defined by the manager. Can be any value (for example: Insert/Update/Delete).

isScheduleBased

 

Boolean

Indicates whether the integration is schedule-based or not.

finalize

 

 

Performs finalization actions.

initParams

 

 

Initializes parameters when the instance is first added. Use this.configItem.setConfigParameterValue (<parameter_name>, <value>) to set parameter values.

Adapter SPI

The following table describes the functions used to develop source and destination adapters.

Adapter SPI

Function Parameter Return Description

getRecords

 

Array

Retrieves records from external sources, and returns them to the manager.

sendRecord

 

 

Sends out the record according to the action. For example, sendRecord (data, “delete”).

Record

Object

JavaScript object that contains the result data to send.

Action

String

Customized action. For example, “insert”, “update”, or “delete”.

getFields

 

Array

Returns an array of field names, types, and descriptions. The field information will be used for mapping.

Mapping SPI

The following table describes the functions provided by the mapping function in SMIS.

Mapping SPI
Function Parameter Return Description

validate

 

boolean

Validates the input values.

inRecord

Object

Input field values.

direction

String

Mapping direction.

getOutRecord

 

Object

Gets outRecord by inRecord according to field mapping and value mapping (not including callback).

inRecord

Object

Input field values.

direction

String

Mapping direction.

setFieldValues

 

 

The final processing step of mapping, which sets the mapped value to destObject.

inRecord

Object

Input field values.

outRecord

Object

The object of getOutRecord.

destObject

Object

The final object of the mapping result.

smisContext

Object

The container that contains context values.

direction

String

Mapping direction.

TaskManager SPI

The following table describes the functions provided by the task manager in SMIS.

TaskManager SPI
Function Parameter Return description

readTasks

 

Array

Reads tasks by instance ID.

intId

String

Instance ID.

removeTask+

 

Object

Removes the task if it is processed successfully.

task

Object

Task object.

setFieldValues

 

 

The final processing step of mapping, which sets the mapped value to destObject.

updateTask

 

Object

Updates the task if it is processed unsuccessfully.

task

Object

Task object.