Connectors

Custom Connectors

Perhaps you want to implement a workflow where pre- and post-process methods aren’t enough, or you have a highly customized connector. In this case you may want to use a custom connector.

You configure a custom connector by specifying the customConnectorClass connector parameter and setting the connector type to CUSTOM. The method parameter indicates the java class you’ve written to run as a connector. This class must implement the ICustomConnector<ResultType> java interface which has three methods:

Method Description

init

This is for initializing the connector based on the connector configuration. A simple implementation might ignore the configuration or assign it to a class variable for use in the execute method.

It is recommended to perform as much work as you can in this method without actually processing data to be transferred, and to make it so this method can reset the state of the custom connector.

execute

This is the method called when the connector is run. It provides a map of values and returns a result of ResultType which will be added to the map when the connector completes under the key returned from getName.

If there is a pre-process step, the map initially contains the key "Pre-process Method" with the value returned from the pre-process method.

getName

This method returns a String, which is generally the connector ID. This value may show up in logs and will be used to store the connector’s result for further processing in post-process.

Parameter

Description

Example

customConnectorClass

Refers to a class that implements ICustomConnector<ResultType>.

{customConnectorClass:'com.archibus.app.solution.serraview.story1.Story1Controller'}