---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Create a JavaScript Probe activity

# Create a JavaScript Probe activity {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 Minuten Lesedauer

Create a JavaScript Probe activity to instruct a MID server to execute server-side
javascript.

## Vorbereitungen

Role required: activity_creator or workflow_admin

## Warum und wann dieser Vorgang ausgeführt wird

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.

## Prozedur

1. Create a [custom
   activity](https://www.servicenow.com/docs/access?context=create-custom-activities&version=australia&pubname=australia-integrate-applications&ft:locale=en-US).  
   This action creates a custom activity using a template.
2. After setting up [general properties](https://servicenow-prod.fluidtopics.net/0Sm9zu2rRND~nSxb9VUhVw "The following General Property fields are common to all activity designer templates.") and [creating input
   variables](https://servicenow-prod.fluidtopics.net/9cajF_Pe381UXOE8RYlECw#CreateInputVariables "Create the variables to pass into the activity in the Inputs form of the activity designer."), configure the JavaScript probe activity Execution Command.

   | Option | Bezeichnung |
   | [Map the input variables](https://servicenow-prod.fluidtopics.net/9cajF_Pe381UXOE8RYlECw#t_MapAnInputVariable "After you create the input variables, map them to the fields in the Execution Command form.") | 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 {#t_CreateAJavaScriptProbeActivity__ul_klf_3tp_vz} |
   | Script | Custom JavaScript to run with this probe. Hinweis: 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. Hinweis: 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. |
   |-|-|

   {#t_CreateAJavaScriptProbeActivity__choicetable_jlf_3tp_vz}  
   Hinweis:  
   You can map parameter values in a test payload to variables in the Outputs tab automatically. See [automap output
   variables](https://servicenow-prod.fluidtopics.net/zQra3zyXD57jq4LB0fHzRQ "You can map parameter values in a test payload to variables in the Outputs tab automatically.").

## Nächste Maßnahme

Finish creating your JavaScript probe activity by [creating output
variables](https://servicenow-prod.fluidtopics.net/4NlOweZ9wgBtc9OOpy0QJg#t_CreateAnOutputVariable "The Outputs form in the designer contains a variable builder for creating data structures of objects and arrays."), [creating a parsing rule](https://servicenow-prod.fluidtopics.net/jecuRsCuzIyfFDyPkB_Ehw#t_CreateAParsingRule "Populate output variables defined in a custom activity with payload data returned from an inputs test on an external host or endpoint."), or [Conditions](https://www.servicenow.com/docs/access?context=conditions&version=australia&pubname=australia-integrate-applications&ft:locale=en-US). Refer to the [create
custom activities](https://servicenow-prod.fluidtopics.net/0eg3YSA_OLwnlcnztlbEUw "You can create and update different types of custom activities in the Workflow Editor using a custom template.") topic to know your template options.

## JavaScript probe template execution parameters {#ariaid-title2}

You use execution parameters to create the input process script in the
Preprocessing form of the activity designer.
For descriptions of the JavaScript Probe command fields, see the table in [Configure the JavaScript Probe execution command](https://servicenow-prod.fluidtopics.net/~fReuZmmDkvZNFnqP8PTNQ#t_MapJavaScriptVarsToExecutionComm "Use the input variables you created to configure the command that Orchestration executes on the JavaScript Probe target host.").  
Hinweis:  
You must use the `executionParam.` prefix with all variables in this table.  
{#r_JvScrPrbTmpltExctnPrmtrs__table_pbn_kh5_cr__entry__4}

| 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 {#r_JvScrPrbTmpltExctnPrmtrs__ul_o1l_z35_cr} |
| 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://servicenow-prod.fluidtopics.net/Ixqp8gLvT6tnD2ksANEvaQ "MID Server capabilities define the specific functions of a MID Server within an IP address range."). 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); |
[Tabelle : 1. JavaScript template execution parameters]

{#r_JvScrPrbTmpltExctnPrmtrs__table_pbn_kh5_cr}

## JavaScript probe template post-processing parameters {#ariaid-title3}

Use these parameters to create a post-processing script.
{#r_JvScrPrbTmpltPPPrmtrs__table_xlq_3n5_cr__entry__4}

| Name | Variable | Type | Usage |
|-|-|-|-|
| Payload | payload | String | Contains raw payload returned from the JavaScript Probe. |
| Output | output | String | Contains output data returned from the JavaScript Probe. |
| EccSysId | eccSysId | String | Contains the reference ID associated with the ECC Queue input message. |
| Error Messages | errorMessages | String | Contains the error messages returned from the JavaScript probe. If no error messages are returned, this value is null. |
[Tabelle : 2. JavaScript probe post-processing parameters]

{#r_JvScrPrbTmpltPPPrmtrs__table_xlq_3n5_cr}

## Configure the JavaScript Probe execution command {#ariaid-title4}

Use the input variables you created to configure the command that Orchestration
executes on the JavaScript Probe target host.

### Vorbereitungen

Create the input variables you need in the Inputs form before you can advance to the Execution Command stage.

Role required:
activity_creator, admin  
Hinweis:  
You can test the JavaScript Probe connection between the MID Server and the target without having to run the acvitity in a workflow context. For details, see [test template
outputs](https://servicenow-prod.fluidtopics.net/9cajF_Pe381UXOE8RYlECw#test-template-inputs "You can test the input parameters of a custom activity during its development without having to run the activity in a workflow context.").

### Prozedur

1. Drag variables from the list of inputs and drop them into command fields.  
   The system formats the variable in the proper syntax for the command.  
   Abbildung : 1. JavaScript Probe execution command
2. Complete the fields shown in the table.  
   {#t_MapJavaScriptVarsToExecutionComm__table_zmv_v25_cr__entry__2}

   | Field | Description |
   |-|-|
   | Input | Input variable builder. [Create input variables](https://servicenow-prod.fluidtopics.net/9cajF_Pe381UXOE8RYlECw#CreateInputVariables "Create the variables to pass into the activity in the Inputs form of the activity designer.") to [map](https://servicenow-prod.fluidtopics.net/9cajF_Pe381UXOE8RYlECw#t_MapAnInputVariable "After you create the input variables, map them to the fields in the Execution Command form.") to available fields. |
   | Script type | Select the type of script to include. Available options are: * Custom JavaScript * MID Server script include {#t_MapJavaScriptVarsToExecutionComm__ul_akw_z25_cr} |
   | 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. |
   [Tabelle : 3. JavaScript Probe execution command fields]

   {#t_MapJavaScriptVarsToExecutionComm__table_zmv_v25_cr}
3. Click Save.
4. Click Continue to advance to the Outputs stage.
{#t_MapJavaScriptVarsToExecutionComm__steps_jjb_jrk_r5}

