org.mule.modules

mule-module-servicenow

config

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

Module Overview

ServiceNow is a software-as-a-service (SaaS) provider of IT service management (ITSM) software.

Summary

Configuration
<servicenow:config>
Configure an instance of this module
Message Processors
<servicenow:delete-multiple>
Delete multiple records from the targeted table by example values.
<servicenow:delete-record>
Delete a record from the targeted table by supplying its sys_id.
<servicenow:get>
Query a single record from the targeted table by sys_id and return the record and its fields.
<servicenow:get-keys>
Query the targeted table by example values and return a comma delimited list of sys_id.
<servicenow:get-records>
Query the targeted table by example values and return all matching records and their fields.
<servicenow:insert>
Creates a new record for the targeted table.
<servicenow:update>
Updates a existing record in the targeted table in the URL, identified by the mandatory sys_id field.

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:servicenow="http://www.mulesoft.org/schema/mule/servicenow"
      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/servicenow
               http://www.mulesoft.org/schema/mule/servicenow/current/mule-servicenow.xsd">

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

</mule>

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:

    <servicenow: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 A username to connect to the service now String */* UTF-8
password A password to connect to the service now String */* UTF-8
serviceEndpoint Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com 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.

    <servicenow:config>
         <reconnect count="5" frequency="1000"/>
    </servicenow: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

<servicenow:delete-multiple>

Delete multiple records from the targeted table by example values. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:delete-multiple type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:delete-multiple-request> #[payload] Delete request object Map<String, Object>
Returns
Return Type Description
Map DeleteMultipleResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

<servicenow:delete-record>

Delete a record from the targeted table by supplying its sys_id. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:delete-record type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:delete-request> #[payload] Delete request object Map<String, Object>
Returns
Return Type Description
Map DeleteResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

<servicenow:get>

Query a single record from the targeted table by sys_id and return the record and its fields. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:get type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:get-request> #[payload] Get object for retrieving entity Map<String, Object>
Returns
Return Type Description
Map GetResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

<servicenow:get-keys>

Query the targeted table by example values and return a comma delimited list of sys_id. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:get-keys type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:get-keys-request> #[payload] Get Keys request object Map<String, Object>
Returns
Return Type Description
Map GetKeysResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

<servicenow:get-records>

Query the targeted table by example values and return all matching records and their fields. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:get-records type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:get-records-request> #[payload] Get Keys request object Map<String, Object>
Returns
Return Type Description
Object GetRecordsResponse object contains the response data
Exception Payloads
Payload ClassDescription
ConnectionException if any error occurs

<servicenow:insert>

Creates a new record for the targeted table. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:insert type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:insert-request> #[payload] Insert request object Map<String, Object>
Returns
Return Type Description
Map InsertResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

<servicenow:update>

Updates a existing record in the targeted table in the URL, identified by the mandatory sys_id field. The targeted table is defined by the 'type' parameter.

XML Sample
<servicenow:update type="INCIDENT"/>

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
type ServiceNow entity type 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. A username to connect to the service now String */* UTF-8
password Optional. A password to connect to the service now String */* UTF-8
serviceEndpoint Optional. Tenant URL in ServiceNow. E.g.:https://dev1.service-now.com String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<servicenow:update-request> #[payload] Get Keys request object Map<String, Object>
Returns
Return Type Description
Map UpdateResponse object contains the response data
Exception Payloads
Payload ClassDescription
ServiceNowConnectorException if any error occurs

Message Sources

Transformers