--- title: Create a JavaScript Probe activity description: Create a JavaScript Probe activity to instruct a MID server to execute server-side javascript.You use execution parameters to create the input process script in the Preprocessing form of the activity designer.Use these parameters to create a post-processing script.Use the input variables you created to configure the command that Orchestration executes on the JavaScript Probe target host. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/servicenow-platform/orchestration/t\_CreateAJavaScriptProbeActivity.html release: australia product: Orchestration classification: orchestration topic_type: task last_updated: "2026-03-12" reading_time_minutes: 5 breadcrumb: [Orchestration custom activity templates, Orchestration activity designer, Classic Orchestration, ServiceNow AI Platform Additional Capabilities, Extend ServiceNow AI Platform capabilities] --- # Create a JavaScript Probe activity Create a JavaScript Probe activity to instruct a MID server to execute server-side javascript. ## Before you begin Role required: activity\_creator or workflow\_admin ## About this task The JavascriptProbe activity has the same functionality as making ‘Packages’ calls into standard Java libraries. It allows you to have more control over the Java libraries on the MID Server. You can load your own JAR files on the MID Server and have the JavascriptProbe make Package calls into those java files. ## Procedure 1. 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. 2. 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 JavaScript probe activity Execution Command.
| **[Map the input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md)** | Use the variables you created to configure the command that Orchestration executes on the MID server. |
| **Script type** | Select the type of script to include. Available options are:- Custom JavaScript - MID Server script include |
| **Script** | Custom JavaScript to run with this probe. **Note:** This field is available when the **Script type** selected is **Custom JavaScript**. |
| **MID Server script include** | Script for the MID Server to run with this probe. **Note:** This field is available when the **Script type** selected is **MID Server script include**. |
| **Select MID Server by host** | MID Server on which the probe runs. |
| **Required MID Server capabilities** | MID Server to use, by capabilities. |
| **Parameters** | Name-value pairs to pass to the host with this probe. You can create these parameters manually, or drag input variables into the **Parameters** fields and assign a value. |
| Name | Variable | Type | Usage |
|---|---|---|---|
| Script Type | script\_type | Enumerated | Type of script to run. The possible types are:- custom\_javascript\_typ - mid\_script\_include\_type |
| Script | script | String | Script that runs custom JavaScript when the **script\_type** is **custom\_javascript\_type**. |
| Mid script include | mid\_script\_include | Reference | The sys\_id reference associated with the MID Server script include to call, when the **script\_type** is **mid\_script\_include\_type**. |
| Source | source | String | Target host on which to run the script. |
| MidCapabilities | midCapabilities | String \(comma separated\) | List of required MID Server capabilities. |
| Parameters | parameters | Array of JavaScript object | Array of JavaScript objects, expressed with the `executionParam.` prefix. To add more name-value pairs to the **parameters** array, append them to the existing array. Create a JavaScript object with the following syntax, and add it to the `executionParam.parameter` array. This assigns additional parameters to the message:``` var newParameter = {"name":"parameterName","value":"parameterValue"}; executionParam.parameters.push(newParameter); ``` |
| 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); ``` |
| Field | Description |
|---|---|
| Input | Input variable builder. [Create input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md) to [map](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md) to available fields. |
| Script type | Select the type of script to include. Available options are:- Custom JavaScript - MID Server script include |
| Script | Custom JavaScript to run with this probe. This field is available when the **Script type** selected is **Custom JavaScript**. |
| MID Server script include | Script for the MID Server to run with this probe. This field is available when the **Script type** selected is **MID Server script include**. |
| Select MID Server by host | MID Server on which the probe runs. |
| Required MID Server capabilities | MID Server to use, by capabilities. |
| Parameters | Name-value pairs to pass to the host with this probe. You can create these parameters manually, or drag input variables into the **Parameters** fields and assign a value. |