Scripting in xDI Designer processes

In Semarchy xDI Designer, you can write your own scripts, and use them in Semarchy xDI processes. Scripting features can customize the behavior of your processes and integration flows.

Scripts are mainly used through scripting actions. You can also use them to within text and property fields in processes and mappings.

Scripting actions

The first way to make use of scripting is by adding dedicated actions to a process. You can use the Bean Scripting Framework action, or the Java Native Scripting action.

The actions support the following scripting languages:

  • Java Native Scripting action

    • Rhino (Javascript)

    • Nashorn

    • Jython

    • Groovy

  • Bean Scripting Framework action

    • Beanshell (Java)

    • Javascript

    • Jython

    • Groovy

Enter the script you want to run in the action’s Expression Editor.

scripting in process

The Jython scripting engine may be upgraded with the Semarchy xDI versions. If your scripts are not compatible with more recent Jython engines, you can force a Jython version with the jythonVersion runtime parameter.

Scripting in text fields

Another way to use scripting is by defining properties in xDI Designer. For example, you can use scripting to configure conditions, text, or process parameters. You can also use scripting to control a process execution flow by defining complex execution conditions.

Use this scripting syntax in a property text field:

%e(<language>){<script>}e(<language>)%

Text fields support the following scripting languages:

  • Rhino (Javascript)

  • Nashorn

  • Jython

  • Groovy

The script is interpreted during execution, and its result replaces the script in the text field.

In the following example, the script generates a parameter value.

scripting in field

Further reading

The following pages explain scripting in more detail: