The Synchronize Workflow

Learn about the CRM web interface synchronization steps.

As stated above, CRM.interface currently ships with one out-of-the-box workflow.

Activities

This workflow is called "synchronize" and can -

  • create and execute XML queries against Aurea CRM
  • transform the XML query response to 3rd party system format
  • exchange data with 3rd party system, either via Web Requests or SOAP messages
  • transform the response from the 3rd party system into CRM.interface XML messages
  • create and modify data in Aurea CRM

The workflow is composed of the following activities:

  • WorkflowSettings: This activity parses the incoming request for the settings parameters and constructs a list of parameters, which are then used while executing the workflow. See Workflow settings and parameters for further details on how this parameter list is constructed.
  • ReadFile: This activity loads a file specified by its parameter FileName and returns the content of this file. The “synchronize” workflow uses this activity to read query template and transformation schema files.
  • XslTransformer: This activity transforms XML using transformation schemata. The “synchronize” workflow uses this activity for transforming CRM.interface XML messages into 3rd party messages and vice versa.
  • RestAPI: This activity sends data to an URL specified in the URL parameter. The “synchronize” workflow uses this activity for communication with the particular 3rd party system.
  • ProcessXml: This activity accesses Aurea CRM via CRM.interface. Basically this activity is used for both retrieving data form Aurea CRM based on the provided parameters in the invocation message as well as importing/updating data in Aurea CRM based on the responses from the 3rd party system.

Workflow Execution steps

  1. An invocation message with the name of the workflow and a list of parameters is sent to CRM.interface.
  2. The integration hub checks if the referenced workflow exists and after successful compilation an HttpRequest object is passed to the workflow.
  3. At this point the workflow starts its sequence of activities:
    1. If the invocation message contains the settings parameter the workflow opens the referenced XML file and construct the list of specified parameters.
    2. The workflow loads the query template file from the path specified in the query parameter.
    3. Placeholders in query template which are marked with {parameter name} (e.g. {company_No}) are replaced by values provided in the URL (e.g. company_No=15)
    4. The XML query is executed against Aurea CRM (data is read).
    5. If outTransformation is provided the workflow transforms the response from CRM.interface using the transformation schema specified via the value of this parameter. Otherwise the execution is continued with step 3.k.
    6. If the useSoap parameter is set to true then the workflow continues with the step 7 otherwise it jumps to step 8.
    7. If useSoapTransformation is set to true then the workflow constructs the SOAP message by applying the XSLT transformation defined in soapOutTranformation. Otherwise it uses the XML template provided in the parameter soapTemplate to generate the SOAP message.
    8. The output of above transformation(s) is sent to the endpoint either defined by the value of targetUrl or soapUrl. If useSoap is false or no soapAction is provided then the endpoint is the URL provided in targetUrl.
    9. If the inTransformation parameter is provided, the workflow performs step 10, otherwise the execution jumps to step 3.k.
    10. The workflow transforms the response from the 3rd party system using the transformation schema specified via the parameter inTransformation and sends the output of the transformation to Aurea CRM
    11. The workflow returns an execution output xml and ends its sequence.

Workflow settings and parameters

Parameters can either be provided directly in the URL or as an XML file (in this case the URL has to contain the parameter settings with the name and path of that file).

Note: You can have multiple settings XML files for a single workflow.
Note: For example, you can have one settings XML file for exchanging Opportunities (e.g. y1_settings.xml) with the 3rd party system and another for exchanging contact persons (e.g. kp_settings.xml).

If a parameter both is specified in the URL string and in the settings XML file, the value defined in the URL string replaces the particular value of the settings file. If a parameter is provided in the URL and is not found in the settings XML file, then its value is added to the list of parameters. If a parameter is solely defined in the settings XML file, its value is added to the list of parameters.

Note: If you want to omit a parameter, which is defined in the settings XML file, you have to omit the parameter settings in the URL and provide all required parameters directly in the URL.

The following parameters are understood by the "synchronize" workflow

"synchronize" workflow parameters

Parameter

Meaning

loggingEnabled

Boolean indicator if the logging is on or off. This parameter is optional.

query

Path to the query template XML file

outTransformation

Path to the XSLT file for transforming CRM.interface XML into 3rd party system XML format.

Note: if this parameter is not provided no message is sent at all.

inTransformation

Path to the XSLT file for transforming 3rd party system XML into CRM.interface format

useSoap

if true SOAP messaging is used. Otherwise a (normal) Web Request is sent to the 3rd party system.

targetUrl

URL of 3rd party system.

A "normal" Web Request is sent to this URL if useSoap set to false.

soapUrl

URL of the 3rd party web service.

A SOAP message is sent to this URL if useSoap set to true.

soapAction

method of the 3rd party web service, which should be executed.

If useSoap set to true, but no soapAction is provided then a regular Web Request is sent to targetUrl as a fallback solution.

useSoapTransformation

if true the SOAP message is created by applying the XSLT stylesheet as defined in the parameter soapOutTranformation.

Otherwise the SOAP message is generated based on the XML template as defined in the parameter soapTemplate.

soapTemplate

Path to XML template file used to create the SOAP message.

If useSoapTransformation set to true this parameter is ignored.

soapOutTranformation

Path to XSLT used to create the SOAP message.

Only used if useSoapTransformation is set to true.

Note: Support for SOAP messaging is available of version 8.1.7.433 and higher.
Note: If relative file paths are used these paths have to be relative to the root directory of the CRM.interface web application (and not relative to the location of the workflow XAML file).

The settings file of the "synchronize" workflow has the following structure.

Settings file of workflow

<?xml version="1.0"?>
<settings> 
    <loggingEnabled></loggingEnabled> <!--  indicator if the logging is on or off--> 
    <query></ query> <!--  path to the query template xml file  --> 
    <outTransformation></ outTransformation> <!--  path to XSLT file responsible for transformation from Aurea CRM format into 3rd party system format        --> 
    <inTransformation></ inTransformation> <!--  path to XSLT file responsible for transformation from 3rd party system into format Aurea CRM format --> 
    <targetUrl></ targetUrl> <!--  URL of 3rd party system--> 
    <useSoap></ useSoap> <!--  indicator if SOAP messaging will be used   --> 
    <soapAction></ soapAction> <!--  method of the 3rd party web service to invoke --> 
    <soapTemplate></ soapTemplate> <!--  XML template file used to create SOAP message--> 
    <soapUrl></ soapUrl> <!--  URL of web service endpoint --> 
    <useSoapTransformation></ useSoapTransformation> <!-- indicator, if XSLT file (soapOutTranformation) or XML template (soapTemplate) should be used --> 
    <soapOutTranformation></ soapOutTranformation> <!--  path to the XSLT file for transforming from Aurea CRM format into SOAP message -->
</settings>