Contact Us 1-800-596-4880

Using Perceptive Flow Design

Building upon the certainty that connection testing establishes, Mule takes one more step to make designing your application easier with Perceptive Flow Design. If you model a flow to include an Anypoint Connector, preceded or followed by a Anypoint DataMapper Transformer, Mule uses the working connection to the resource to retrieve metadata about message payload and properties. Capturing the data type and structure that a resource employs, Mule feeds that data into the DataMapper Transformer, thereby informing the DataMapper of the expected input or output. This functionality facilitates mapping of data from one data format and structure to another.

Desigining with Metadata

It is very common to use Mule to connect with a SaaS provider in an application. However, because each SaaS provider supports different data types and structures, it is challenging to map data to or from them. Connecting with Salesforce, for example, involves more than just a simple plug and play connection– you must examine the data structure of Salesforce to determine the expected data input or output. If Salesforce employed the same data structure as the raw messages in your application, you could simply map "username" to "username", but there are likely complexities that make direct mapping impossible. For example, you may need to disassemble the "username" input to map it to "company_name" output.

In order to make mapping data easier, Mule DataSense’s perceptive functionality performs the following activities:

  • tests connections to the SaaS providers to which you wish to connect

  • retrieves metadata from the SaaS providers to acquire information about the data structure and format each employs

  • supplies the sObject type for the data input or output for use by DataMapper

In other words, Mule intelligently examines the structure of the input or output data you intend to map, then feeds the correct input or output values into your DataMapper. Using Perceptive Flow Design, you don’t need to figure out the data structures manually. Mule’s automated connection testing and metadata retrieval gives you a higher level of certainty that your flow will run without errors.

Limitations

  • Perceptive Flow Design is only available in Studio’s Visual Editor.

  • To use Perceptive Flow Design, you must configure at least one Anypoint connector, test its connections, then insert a DataMapper into your flow before or after the connector.

  • Perceptive Flow Design only functions with Anypoint connectors which support connection testing (see table below).

    Connector

    Bundled with Studio

    Facebook

    (tick)

    Google Calendars

    (tick)

    Google Spreadsheets

    (tick)

    Google Tasks

    (tick)

    Marketo

    Netsuite

    Salesforce

    (tick)

    Twitter

    (tick)

    Zuora

Building a Perceptive Flow

  1. Begin by building a flow which contains at least one connector which supports connection testing. For example, create a flow with a Salesforce Connector.

    basic_flow
  2. Configure the Salesforce connector, and its corresponding global connector, then test the connection to confirm communication. Refer to Testing Connections for details.

  3. Once you have confirmed successful connection to Salesforce, insert a DataMapper before the connector on your canvas.

    basic_flow2
  4. Double-click the DataMapper building block to open the New DataMapper flow wizard. Enter the descriptive details on the first page, then click Next.

  5. Having already retrieved details about data structure and format from Salesforce (because you have successfully connected via your global connector), Mule automatically prescribes the Output (see image below).

    defined_output
  6. Manually define the input values for DataMapper, then click Finish.

  7. Studio opens the DataMapper console and displays the input fields you manually defined at left, and the output fields that DataSense retrieved from Salesforce at right.

  8. Drag and drop input fields across to output fields to map and transform data format to Salesforce-friendly values. See example below.

    dataMapping_example
  9. Save, then continue to build your Mule application.