Skip to main content

Modified Java Script

Description

Modified Java Script is a step in the Scripting Plugin for Process Studio Workflows. It is an easy, expression based user interface for building JavaScript expressions. This step also allows you to create multiple scripts for each step. Please keep in mind that this step has performance disadvantages due to the fact that it is interpreting the JavaScript. Please see the other steps in the 'Scripting' section when performance is critical for you.

Configurations

No.Tree ViewDescription
Java Script Functions Section
This section provides a tree view of your available scripts, functions, input fields and output fields.
1Transform ScriptsIt displays a list of scripts you have created in this step
2Transform Constantsa list of pre-defined, static constants including SKIP_WORKFLOW, ERROR_WORKFLOW, and CONTINUE_ WORKFLOW
3Transform Functions*It contains a variety of String, Numeric, Date, Logic and specialized functions you can use to create your script. To add a function to your script, simply double-click on the function or drag it to the location in your script that you wish to insert it.
4Input FieldsA list of inputs coming into the step. Double-click or use drag and drop to insert the field into your script.
5Output FieldsA list of outputs for the step.
Java Script Section

This section is where you edit the script for this step. You can insert functions, constants, input fields, etc. from the tree control on the left by double-clicking on the node you wish to insert or by ragging the object onto the Java Script panel.

There are two versions of the javascript engine: the 2.5 version and the 3 version. If "compatibility mode" is checked (and by default it is), javascript works like it did in version 2.5. Obviously the new version should be used if possible so uncheck "compatibility mode" if yo u can.

Fields Section
The Fields table contains a list of variables from your script including the ability to add metadata like a descriptive name.
No.ColumnDescription
1Field NameVariable Name
2Rename toRename
3TypeString, Date, Boolean, Integer, BigNumber, Binary, Timestamp, Internet Address
4LengthSpecify the length,

- For Number: Total number of significant figures in a number;

- For String: total length of string;

For Date: length of printed output of the string.

5PrecisionNo. of digits after decimal. Specify the precision,

- For Number: Number of floating point digits; For String, Date, Boolean: unused.

6Replace value ‘Fieldname’ or Rename to’Select Y/N to accept ‘Rename to’.
Buttons
1Get Variables buttonRetrieves a list of variables from your script.
2Test script buttonUse this button to test the syntax of your script.

*Transform Functions: Transform functions are broadly classified as below,

No.FunctionDescription
1String FunctionsThis has several JavaScript String functions.
2Numeric FunctionsThis has several JavaScript Numeric functions.
3Date FunctionsThis has several JavaScript Date functions.
4Logic FunctionsThis has several JavaScript Logic functions.
5Special FunctionsThis has several Contains a mix of utility functions.
6File FunctionsThis Category has several, functions that do simple verifications or actions related to files and folders—for example, fileExist() or createFolder().