--- title: Create a JMS activity description: Create a custom JMS activity to retrieve or send messages to external systems using the Java Messaging Service.Configure your system to use Java Messaging Service \(JMS\) with a custom Orchestration JMS activity.You use execution parameters to create the input process script in the Preprocessing form.Use these parameters to create a post-processing script. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/servicenow-platform/orchestration/t\_CreateAJMSActivity.html release: australia product: Orchestration classification: orchestration topic_type: task last_updated: "2026-03-12" reading_time_minutes: 6 breadcrumb: [Orchestration custom activity templates, Orchestration activity designer, Classic Orchestration, ServiceNow AI Platform Additional Capabilities, Extend ServiceNow AI Platform capabilities] --- # Create a JMS activity Create a custom JMS activity to retrieve or send messages to external systems using the Java Messaging Service. ## Before you begin Role required: activity\_creator or workflow\_admin ## About this task The JMS activity supports third party JMS providers whose JMS client application is written with a typical Java EE pattern and can support these operations: - Using JNDI to find a ConnectionFactory object. - Using JNDI to find one or more destination objects. - Using the ConnectionFactory to create a JMS connection object. - Using the JMS connection to create one or more JMS session objects. - Using a JMS session and the destinations to create the MessageProducer and MessageConsumer objects. - Starting the JMS connection to enable delivery or consumption of messages. **Note:** The JMS activity designer has been tested with the JMS providers ActiveMQ and Tibco EMS. When connecting to a JMS provider, refer to your third party user documentation. ## Procedure 1. Create or verify your [JMS credential](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/r_JMSCredentialsForm.md) . Your JMS credentials must have permission for the target database and proper configuration for the corresponding JMS connection. Credentials must be set up before you can create a JMS activity. 2. Create or verify your [JMS connection](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAJMSActivity.md) . Your JMS connection must be configured with valid JMS credentials set up before you can create a JMS activity. 3. Create a [custom activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/create-custom-activities.md). This action creates a custom activity using a template. 4. After setting up [general properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/General-Flds-Templates.md) and [creating input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md), configure the JMS Execution Command.
| **Configure your credential** | Fill in the fields necessary for your database connection. |
| **Connection Factory** | Name of the JMS Connection Factory. You should create or verify your JMS connection. This configuration links the name of the Initial Context Factory with the URL of the JMS provider. |
| **Destination Type** | Type of destination used for this message:- **Queue**: Message is queued for point-to-point communications. **Note:** The **GET** operation is only supported for the Queue destination type. - **Topic**: Message is used for publish and subscribe communication. |
| **Destination Name** | Name of the queue or topic destination that is configured on the JMS provider. |
| **Message Type** | The JMS message type value. Only the **Text Message** type is supported. The queue or topic destination must be configured to receive or send only Text Message. Other message types are dropped, since the JMS Activity cannot process them. |
| **Operation** | The programmatic operation to perform on the destination. The choices are **PUT** or **GET**. |
| **Timeout \(Secs\)** | Allowed time to wait for a message in the message queue before it times out, in seconds. The default is **30**. |
| **Custom message headers** | The custom header values in a name/value pair format, that is available on the JMS destination. **Note:** This is only supported for a **PUT** operation. |
| **Message payload** | Actual message content or payload that is sent to the JMS destination.**Note:** This is only supported for a **PUT** operation. |
| **Credential tag** | A tag for an individual credential for a JMS activity in an Orchestration workflow. |
| **Required MID Server capabilities** | MID Server to use, by capabilities. |
| **Name** | A unique and descriptive name for identifying the file in the instance. |
| **Version** | A version number for the file, if one is available. |
| **Source** | Location of the JAR file for reference purposes. Source information is not used by the system. |
| **Description** | Short description of the JAR file and its purpose in the instance. |
| **Name** | Unique name of this connection factory. |
| **Initial Context Factory** | Name of the JNDI class that is used to create the InitialContext. **Note:** For example, to connect to ActiveMQ V5.10 \(JMS Provider\), the value is `org.apache.activemq.jndi.ActiveMQInitialContextFactory`. |
| **Provider URL** | Location of the running JMS provider installation. **Note:** For example, to connect to ActiveMQ V5.1: `tcp://ipAddressOrHostName:61616`. |
| Name | Variable | Type | Usage |
|---|---|---|---|
| Jms ds | jms\_ds | Reference | Selected JMS data source. |
| Destination type | destination\_type | Enumerated | |
| Destination name | destination\_name | String | |
| Message type | message\_type | Enumerated | |
| Operation | operation | Enumerated | |
| Time out | time\_out | Integer | Length of time to wait for the query to return results. |
| Custom headers | custom\_headers | Array of JavaScript objects | |
| Message payload | message\_payload | String | |
| Credential tag | credential\_tag | String | List of required MID Server capabilities. |
| MidCapabilities | midCapabilities | String \(comma separated\) | |
| ValueCapabilities | valueCapabilities | Array of hashmap | Capability values used to select the MID Server. For more information, see [MID Server capabilities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown). If there are additional capabilities that are assigned by value, use this example to customize the MID Server selection:``` var valueCapability = {'NEW_MID_CAPABIILTY':'NEW_MID_CAPABILITY_VALUE'}; executionParam.valueCapabilities.push(valueCapability); ``` |