org.mule.modules

mule-module-servicesource

config

Namespacehttp://www.mulesoft.org/schema/mule/servicesource
Schema Locationhttp://www.mulesoft.org/schema/mule/servicesource/current/mule-servicesource.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.4

Module Overview

ServiceSource Cloud Connector. The ServiceSource Connector will allow to use the ServiceSource REST API. Almost every operation that can be done via the API can be done through this connector.

Summary

Configuration
<servicesource:config>
Configure an instance of this module
Message Processors
<servicesource:analysis-search>
This method allows searching on the analysis API.
<servicesource:complete-data-load>
This processor must be invoked to indicatethat the data load job has completed.
<servicesource:create>
Generic method to create entities in dynamic collections
<servicesource:create-address>
Creates new address
<servicesource:create-asset>
Creates a new Asset
<servicesource:create-booking>
Creates a new Booking
<servicesource:create-contact>
Creates new contact
<servicesource:create-forecast>
Creates a new forecast
<servicesource:create-lookup>
Creates a new lookup
<servicesource:create-note>
Creates a new note
<servicesource:create-offer>
Creates new offer
<servicesource:create-opportunity>
Creates a new opportunity
<servicesource:create-product>
Creates a new Product
<servicesource:create-quote>
Creates a new Quote
<servicesource:create-task>
Creates a new Task
<servicesource:delete>
Removes the object from the collection, permitting reference checks.
<servicesource:dynamic-create>
Generic method to create entities dynamicly using DataSense.
<servicesource:dynamic-load-data>
Pushes data through the load API.
<servicesource:export>
Export a collection.
<servicesource:invoke-object-method>
Executes a method on the object of a collection.
<servicesource:invoke-static-method>
Invoke Static Method Executes a static method on the collection.
<servicesource:load-data>
Pushes data through the load API.
<servicesource:lookup-key>
Consumes the lookups config API looking for a lookup for the given connection on the given propertyPath.
<servicesource:query>
This method provides basic search capabilities through a collection by providing a mongo formatted query.
<servicesource:read>
Generic method to read entities from dynamic collections
<servicesource:read-address>
Fetches the address identified by the object id.
<servicesource:read-asset>
Fetches the Asset identified by the object id.
<servicesource:read-booking>
Fetches the Booking identified by the object id.
<servicesource:read-contact>
Fetches the contact identified by the object id.
<servicesource:read-forecast>
Fetches the forecast identified by the object id.
<servicesource:read-note>
Fetches the note identified by the object id.
<servicesource:read-offer>
Fetches the offer identified by the object id.
<servicesource:read-opportunity>
Fetches the opportunity identified by the object id.
<servicesource:read-product>
Fetches the Product identified by the object id.
<servicesource:read-quote>
Fetches the Quote identified by the object id.
<servicesource:read-task>
Fetches the Task identified by the object id.
<servicesource:search>
This method provides search capabilities by specifying filters through a map.
<servicesource:start-data-load>
Starts a Data Load by creating an entry in the data load collection.
<servicesource:update>
Generic method to update entities from dynamic collections
<servicesource:update-address>
Updates an address
<servicesource:update-asset>
Updates an Asset
<servicesource:update-booking>
Updates a Booking
<servicesource:update-contact>
Updates a given contact
<servicesource:update-forecast>
Updates a forecast
<servicesource:update-note>
Updates a given note
<servicesource:update-offer>
Updates an offer
<servicesource:update-opportunity>
Updates an opportunity
<servicesource:update-product>
Updates a Product
<servicesource:update-quote>
Updates a Quote
<servicesource:update-task>
Updates a Task

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:servicesource="http://www.mulesoft.org/schema/mule/servicesource"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/servicesource
               http://www.mulesoft.org/schema/mule/servicesource/current/mule-servicesource.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string analysisUrl /analysis/api/ Optional. The relative URL where the analysis API calls are made
xs:string apiUrl /rest/api/ Optional. The relative URL where the main API calls are made.
xs:int connectTimeout 0 Optional. The connect timeout interval, in milliseconds
xs:string loginUrl /login.json Optional. The relative url of the endpoint that handles login
xs:int readTimeout 0 Optional. The read timeout interval, in milliseconds

Connection Pool

This connector offers automatic connection management via the use of a connection pool. The pool will act a storage mechanism for all the connections that are in-use by the user of this connector.

Prior to execution of a processor, the connector will attempt to lookup an already established connection and if one doesn't exists it will create one. That lookup mechanism is done in the connection pool via the use of connection variables declared as keys.

The user of the connector can configure the pool by adding a connection-pooling-profile to the connector configuration like this:

    <servicesource:connection-pooling-profile maxActive="10" maxIdle="10"
                             exhaustedAction="WHEN_EXHAUSTED_GROW" maxWait="120" minEvictionMillis="60000" evictionCheckIntervalMillis="30000"/>

The following is a list of connection attributes, each connection attribute can be configured at the config element level or they can also be added to each processor. If they are used at the processor level they get the benefit of full expression resolution.

Connection Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
username Application username String */* UTF-8
password Application password String */* UTF-8
server URL of the SRPS server API String */* UTF-8
tenantName Name of the tenant String */* UTF-8

Reconnection Strategies

Reconnection Strategies specify how a connector behaves when its connection fails. You can control how Mule attempts to reconnect by specifying a number of criteria:

With a reconnection strategy, you can better control the behavior of a failed connection, by configuring it, for example, to re-attempt the connection only once every 15 minutes, and to give up after 30 attempts. You can also send an automatic notification to your IT administrator whenever this reconnection strategy goes into effect. You can even define a strategy that attempts to reconnect only during business hours. Such a setting can prove useful if your server is frequently shut down for nightly maintenance.

Configuration

A reconnection strategy that allows the user to configure how many times a reconnection should be attempted and how long to wait between attempts.

    <servicesource:config>
         <reconnect count="5" frequency="1000"/>
    </servicesource:config>
Reconnect Attributes
NameDefault ValueDescription
frequency 2000 Optional. How often (in ms) to reconnect
count 2 Optional. How many reconnection attempts to make

For more information about reconnection strategies in Mule, or even how to write your own custom reconnection strategy please check this section.

Message Processors

<servicesource:analysis-search>

This method allows searching on the analysis API.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The collection to query AnalysisCollection */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:filters> Optional. Map that includes filters Map<String, Object>
Returns
Return Type Description
AnalysisObject the actual type of the return value depends on the provided collection, but it will be an implementation of AnalysisObject

<servicesource:complete-data-load>

This processor must be invoked to indicatethat the data load job has completed. This call must be made after all the in-progress load calls complete. The done API can optionally contain summary statistics about the loaded data organized by input source.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
request #[payload] Optional. An instance of DataLoadCompleteRequest with the comple data load request data DataLoadCompleteRequest */*
dataLoadJobId The id of the data load job. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8

<servicesource:create>

Generic method to create entities in dynamic collections

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A member of the ServiceSourceCollection enum representing the collection that owns the entity ServiceSourceCollection */*
entity #[payload] Optional. A subclass instance of ServiceSourceEntity ServiceSourceEntity */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
ServiceSourceEntity a subclass instance of ServiceSourceEntity with the created entity

<servicesource:create-address>

Creates new address

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
address #[payload] Optional. A Address Address */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Address a Address representing the newly created address

<servicesource:create-asset>

Creates a new Asset

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
asset #[payload] Optional. A org.mule.module.servicesource.model.Asset Asset */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Asset a org.mule.module.servicesource.model.Asset representing the newly created Asset

<servicesource:create-booking>

Creates a new Booking

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
booking #[payload] Optional. A org.mule.module.servicesource.model.Booking Booking */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Booking a org.mule.module.servicesource.model.Booking representing the newly created Booking

<servicesource:create-contact>

Creates new contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
contact #[payload] Optional. A Contact Contact */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Contact a Contact representing the newly created contact

<servicesource:create-forecast>

Creates a new forecast

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
forecast #[payload] Optional. A Forecast Forecast */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Forecast a Forecast representing the newly created contact

<servicesource:create-lookup>

Creates a new lookup

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
lookup #[payload] Optional. A Lookup Lookup */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Lookup a Lookup representing the newly created lookup

<servicesource:create-note>

Creates a new note

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
note #[payload] Optional. A Note Note */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Note a Contact representing the newly created note

<servicesource:create-offer>

Creates new offer

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
offer #[payload] Optional. A Offer Offer */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Offer a Offer representing the newly created offer

<servicesource:create-opportunity>

Creates a new opportunity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
opportunity #[payload] Optional. A Opportunity Opportunity */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Opportunity a Opportunity representing the newly created opportunity

<servicesource:create-product>

Creates a new Product

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
product #[payload] Optional. A org.mule.module.servicesource.model.Product Product */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Product a org.mule.module.servicesource.model.Product representing the newly created Product

<servicesource:create-quote>

Creates a new Quote

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
quote #[payload] Optional. A org.mule.module.servicesource.model.Quote Quote */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Quote a org.mule.module.servicesource.model.Quote representing the newly created Quote

<servicesource:create-task>

Creates a new Task

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
task #[payload] Optional. A org.mule.module.servicesource.model.Task Task */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Task a org.mule.module.servicesource.model.Task representing the newly created task

<servicesource:delete>

Removes the object from the collection, permitting reference checks.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The name of the collection ServiceSourceCollection */*
objectId Id of the object to delete. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8

<servicesource:dynamic-create>

Generic method to create entities dynamicly using DataSense. This method used a Map to represent entities instead of pojos.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A String representation of a ServiceSource collection. For example: app.offers String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:entity> #[payload] Optional. A Map representing the entity Map<String, Object>
Returns
Return Type Description
Map<String, Object> a Map with a representation of the created entity

<servicesource:dynamic-load-data>

Pushes data through the load API. The ID of the data load job must be included as input. Each invocation of the load API provides data for a single collection and parallel calls can be made to push data to multiple collections. The object content can be deduced from the data dictionary, metadata API or by fetching a pre-existing object using the object fetch API. Unlike its load-data counterpart, this version of the processor takes maps instead of pojos and includes support for DataSense.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A member of the ServiceSourceCollection enum representing the collection that owns the entities String */* UTF-8
dataLoadJobId The id of the data load job. String */* UTF-8
incremental false Optional. If true performs an incremental load and the data may already exist and should be updated if it does rather than just added boolean */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:objects> #[payload] Optional. A list with instances of ServiceSourceEntity all belonging to the same collection List<Map<String, Object>>

<servicesource:export>

Export a collection. You can optionally specify the columns you want to export and whether or not to use streaming

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The collection to query ServiceSourceCollection */*
streaming false Optional. Wether or not use streaming boolean */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:columns> Optional. List of string specifying the columns to return List<String>
Returns
Return Type Description
List<ServiceSourceEntity> A List of objects that matched the criteria. The actual type of those objects depends on the provided collection but will be a subclass of ServiceSourceEntity

<servicesource:invoke-object-method>

Executes a method on the object of a collection.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The collection the object belongs to ServiceSourceCollection */*
objectId Id of the object. String */* UTF-8
method The object method to be invoked. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:parameters> #[payload] Optional. The parameters for the specified method. Map<String, Object>
Returns
Return Type Description
List<Map<String, String>> a list of maps representing the output of the invokation

<servicesource:invoke-static-method>

Invoke Static Method Executes a static method on the collection. These methods can perform actions across multiple objects.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The name of the collection ServiceSourceCollection */*
method The static method to be invoked. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:parameters> #[payload] Optional. The parameters for the specified method. Map<String, Object>
Returns
Return Type Description
List<Map<String, String>> a list of maps representing the output object

<servicesource:load-data>

Pushes data through the load API. The ID of the data load job must be included as input. Each invocation of the load API provides data for a single collection and parallel calls can be made to push data to multiple collections. The object content can be deduced from the data dictionary, metadata API or by fetching a pre-existing object using the object fetch API.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A member of the ServiceSourceCollection enum representing the collection that owns the entities ServiceSourceCollection */*
dataLoadJobId The id of the data load job. String */* UTF-8
incremental false Optional. If true performs an incremental load and the data may already exist and should be updated if it does rather than just added boolean */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:objects> #[payload] Optional. A list with instances of ServiceSourceEntity all belonging to the same collection List<ServiceSourceEntity>
Returns
Return Type Description
List<ServiceSourceEntity> a list with instances of ServiceSourceEntity which represent the inserted objects

<servicesource:lookup-key>

Consumes the lookups config API looking for a lookup for the given connection on the given propertyPath. If found, then the name of a lookup matching the displayName is returned

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collectionName The name of collection that the lookup referes to String */* UTF-8
propertyPath The property path of the lookup vlaue String */* UTF-8
displayName The displayName being looked up String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
String a String if the value was found, null otherwise

<servicesource:query>

This method provides basic search capabilities through a collection by providing a mongo formatted query. Take in count that the query is sent as a query param so per http protocol limitations there's a limit on the amount of characters that it can have. To post large filters use search instead.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The collection to query ServiceSourceCollection */*
query A mongo formatted query String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
List<ServiceSourceEntity> A List of objects that matched the query. The actual type of those objects depends on the provided collection but will be a subclass of ServiceSourceEntity

<servicesource:read>

Generic method to read entities from dynamic collections

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A member of the ServiceSourceCollection enum representing the collection that owns the entity ServiceSourceCollection */*
objectId The id of the entity you want to get String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
ServiceSourceEntity a subclass instance of ServiceSourceEntity with the created entity

<servicesource:read-address>

Fetches the address identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Address an instance of Address

<servicesource:read-asset>

Fetches the Asset identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Asset an instance of org.mule.module.servicesource.model.forecast.Asset

<servicesource:read-booking>

Fetches the Booking identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Booking an instance of org.mule.module.servicesource.model.forecast.Booking

<servicesource:read-contact>

Fetches the contact identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Contact an instance of Contact

<servicesource:read-forecast>

Fetches the forecast identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Forecast an instance of Forecast

<servicesource:read-note>

Fetches the note identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Note an instance of Note

<servicesource:read-offer>

Fetches the offer identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Offer an instance of Offer

<servicesource:read-opportunity>

Fetches the opportunity identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Opportunity an instance of Opportunity

<servicesource:read-product>

Fetches the Product identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Product an instance of org.mule.module.servicesource.model.forecast.Product

<servicesource:read-quote>

Fetches the Quote identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Quote an instance of org.mule.module.servicesource.model.forecast.Quote

<servicesource:read-task>

Fetches the Task identified by the object id.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to read. String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Task an instance of org.mule.module.servicesource.model.forecast.Task

<servicesource:search>

This method provides search capabilities by specifying filters through a map. The advantage of using this processor over query is that you can now use a map to visually add the filters and you don't risk exceeding the max length of the query params since the filters are sent as a post.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection The collection to query ServiceSourceCollection */*
streaming false Optional. Wheter or not to do streaming boolean */*
limit 100 Optional. The max number of results to return. If you want to have no limit then pass -1 int */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicesource:filters> Optional. Map that includes filters Map<String, Object>
<servicesource:columns> Optional. An optional list of columns to return. Use this to only return the fields you're interested while reducing network traffic List<String>
Returns
Return Type Description
List<ServiceSourceEntity> A List of objects that matched the criteria. The actual type of those objects depends on the provided collection but will be a subclass of ServiceSourceEntity

<servicesource:start-data-load>

Starts a Data Load by creating an entry in the data load collection. The returned data load object contains an id field and the content of this field must be used in the load and done API call URLs.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
jobName The name of the data load job you want to start String */* UTF-8
dataLoadConfigId The id of the data load configuration that this job references to String */* UTF-8
displayName A friendly name for the generated job String */* UTF-8
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
DataLoad another instance of DataLoad which represents the created DataLoad object. It also includes the id you need to provide later on.

<servicesource:update>

Generic method to update entities from dynamic collections

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
collection A member of the ServiceSourceCollection enum representing the collection that owns the entity ServiceSourceCollection */*
objectId The id of the entity you want to get String */* UTF-8
entity #[payload] Optional. A subclass instance of ServiceSourceEntity with the entitie's new state ServiceSourceEntity */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
ServiceSourceEntity a subclass instance of ServiceSourceEntity with the created entity

<servicesource:update-address>

Updates an address

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
address #[payload] Optional. The new state of the note as an instance of Address Address */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Address The updated address as an instance of Address.

<servicesource:update-asset>

Updates an Asset

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
asset #[payload] Optional. The new state of the asset as an instance of Asset Asset */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Asset The updated asset as an instance of Asset

<servicesource:update-booking>

Updates a Booking

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
booking #[payload] Optional. The new state of the booking as an instance of Booking Booking */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Booking The updated booking as an instance of Booking

<servicesource:update-contact>

Updates a given contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
contact #[payload] Optional. The new state of the contact as an instance of Contact Contact */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Contact The updated contact as an instance of Contact

<servicesource:update-forecast>

Updates a forecast

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
forecast #[payload] Optional. The new state of the forecast as an instance of Forecast Forecast */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Forecast The updated forecast as an instance of Forecast

<servicesource:update-note>

Updates a given note

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the no to update. String */* UTF-8
note #[payload] Optional. The new state of the note as an instance of Note Note */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Note The updated note as an instance of Note.

<servicesource:update-offer>

Updates an offer

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
offer #[payload] Optional. The new state of the offer as an instance of Offer Offer */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Offer The updated offer as an instance of Offer

<servicesource:update-opportunity>

Updates an opportunity

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
opportunity #[payload] Optional. The new state of the note as an instance of Opportunity Opportunity */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Opportunity The updated opportunity as an instance of Opportunity

<servicesource:update-product>

Updates a Product

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
product #[payload] Optional. The new state of the product as an instance of Product Product */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Product The updated product as an instance of Product

<servicesource:update-quote>

Updates a Quote

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
quote #[payload] Optional. The new state of the quote as an instance of Quote Quote */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Quote The updated quote as an instance of Quote

<servicesource:update-task>

Updates a Task

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
objectId Id of the object to update. String */* UTF-8
task #[payload] Optional. The new state of the task as an instance of Task Task */*
Connection Parameters
This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation.
username Optional. Application username String */* UTF-8
password Optional. Application password String */* UTF-8
server Optional. URL of the SRPS server API String */* UTF-8
tenantName Optional. Name of the tenant String */* UTF-8
Returns
Return Type Description
Task The updated task as an instance of Task

Message Sources

Transformers