Creating WorkFlow Connector Plugins
XMConnect uses an interface or plugin Framework to provide a standard way to connect XMPro to third part systems for example CRM, Database and Microsoft Word, etc.
Each connector has the following:
Connector Settings
The settings that can be configured before using the actual connector.
Initializing Parameters
The arguments defined for the connector retrieved from the Connector Settings.
Conditional Properties
You can define the value for one or more properties as a conditional expression that is evaluated according to the argument passed from the connector instance.
Input Properties
It’s the initial values required for the specified operation to be performed.
Output Properties
It’s the returned result set of the specified connector.
Operations
Is the specific action that is chosen to be performed for that Connector? (For example, Insert, update, Reassign Activity, Import or Export operations, etc.).
<image - basic architecture diagram for XMConnect>
Creating an XMConnect Plugin
The XMConnect interface is found by referencing the DLL XMPro.XMConnect.dll
contained with the bin folder of the particular WorkFlow.
The XMConnect plugin requires the implementation of the following interface:
<image - XMConnect interface provided>
Constructor
A default constructor with no parameters must always exist in order to allow XMConnect to interact with the plugin.
Method Invocation Sequence
void
SetHiddenParams(
Dictionary
<
string
,
string
> contructorParams)
Design time: 1
Run time: 1
Method Explanation:
This is the first method to be invoked by XMConnect after instantiating. XMConnect passes in a list of <Name, Value> pairs containing Plugin Settings defined in the XMConnector Management.
List
<
InitializingParameter
> GetInitializingArgumentList()
Design time: 2
Run time: n/a
Method Explanation:
Implement this function to provide a list of Parameters required to initiate the Plugin. Possible values along with the Type of Parameter can also be specified.
void
SetInitializingArguments(
List
<
initializingParameters
> initializingParameters)
Design time: 3
Run time: 2
Method Explanation:
Implement this function to get the values for the initializing parameters.
List
<
SourceObject
> GetSourceObjectList()
Design time: 4
Run time: n/a
Method Explanation:
Implement this function to list the Objects on which Integration is to be performed. Type of object can also be specified which includes list of allowed operations.
bool
isPreviewAvailable()
Design time: 5
Run time: n/a
Method Explanation:
This function specifies if preview of Source Objects is available. If yes then DataTable ObjectPreview(SourceObject sourceObject)
must return a valid DataTable
.
DataTable
ObjectPreview(
SourceObject
sourceObject)
Design time: after 5
Run time: n/a
Method Explanation:
DataSet
GetSourceObjectInputProperties (
SourceObject
sourceObject,
Operation
operation)
Design time: 6
Run time: n/a
Method Explanation:
Implement this function to return the properties required as Input for the selected operation. The return type is DataSet
, the columns of tables constitute object properties. The user will be able to map the properties to XMPro controls.
DataSet
GetSourceObjectOutputProperties(
SourceObject
sourceObject,
Operation
operation)
Design time: 7
Run time: n/a
Method Explanation:
If the operation is DataReturning
, implement this function to return the output properties of the selected operation. The user will be able to map the properties to XMPro controls.
DataSet
GetSourceObjectConditionProperties(
SourceObject
sourceObject,
Operation
operation)
Design time: 8
Run time: n/a
Method Explanation:
int
PerformNonReturningOperation(
String
sourceObject,
String
operation,
DataSet
dsIn, DataSet dsCon)
Design time: n/a
Run time: 3
Method Explanation:
This function will be called from Managed code if the operation is NonDataReturning
. In arguments: the object, to perform operation, will be specified along with the operation itself. DataSet provided by GetSourceObjectInputProperties(SourceObject sourceObject, Operation operation)
with DataTables
containing mapped data. Finally if the operation is conditional then a DataSet
containing DataTables
coresponding to dsIn Tables, each table contains data for Controls used in the Conditional Clause. Conditional Clause can be accessed by retrieving Extended Property "filter" of every Table in DataSet
.
DataSet
PerformReturningOperation(
String
sourceObject,
String
operation,
DataSet
dsIn,
DataSet
dsOut,
DataSet
dsCon)
Design time: n/a
Run time: 3
Method Explanation:
This function works exactly as PerformNonReturningOperation
except that it returns dsOut
filled with Data, every table contains control mappings and mapped values must be filled. If a DataColumn
has an Extended Property named "mapping" OR "browsemapping" then it is mapped and must be filled.
Add, Update or Delete a Connector
To add, update or delete a connector, follow the steps listed below:
In the Ribbon tab select Design, click Connectors Administration to open Connectors Manager Window
In the Connector Management window, click the row with asterisk (*) icon to add a new connector.
To Update a connector, select the connector to update. To edit a connector name, place the cursor on the selected connector.
Click Save button.
Any number of connectors can be registered as long as they have a unique name. Assembly-qualified name should be used.
Connector Security
Each connector registered can be access controlled and users of the WorkFlow Designer given specific access. This is done using the Options Administration Editor and using the Connectors tab to set specific access.
Last updated
Was this helpful?