Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Scripting Module Documentation Reference

Configurations


Config

Default configuration

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x 

Operations

Execute

<scripting:execute>

Run a script with provided code, according to the engine and passing parameters.

Parameters

Name Type Description Default Value Required

Code

String

the script source code to be executed

x 

Engine

String

name of the scripting engine for running ths script

x 

Parameters

Object

variables provided to the script as bindings

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Output

Type

Any

Attributes Type

Any

The classes used with the Scripting Module must be exported, if not the execution will fail with a SCRIPTING:COMPILATION error. See How to export resources.

Throws

  • SCRIPTING:COMPILATION  

  • SCRIPTING:UNKNOWN_ENGINE  

  • SCRIPTING:EXECUTION  

In this topic: