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 View | Description |
---|---|---|
Java Script Functions Section | ||
This section provides a tree view of your available scripts, functions, input fields and output fields. | ||
1 | Transform Scripts | It displays a list of scripts you have created in this step |
2 | Transform Constants | a list of pre-defined, static constants including SKIP_WORKFLOW, ERROR_WORKFLOW, and CONTINUE_ WORKFLOW |
3 | Transform 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. |
4 | Input Fields | A list of inputs coming into the step. Double-click or use drag and drop to insert the field into your script. |
5 | Output Fields | A 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. | Column | Description |
---|---|---|
1 | Field Name | Variable Name |
2 | Rename to | Rename |
3 | Type | String, Date, Boolean, Integer, BigNumber, Binary, Timestamp, Internet Address |
4 | Length | Specify 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. |
5 | Precision | No. of digits after decimal. Specify the precision, - For Number: Number of floating point digits; For String, Date, Boolean: unused. |
6 | Replace value ‘Fieldname’ or Rename to’ | Select Y/N to accept ‘Rename to’. |
Buttons | ||
1 | Get Variables button | Retrieves a list of variables from your script. |
2 | Test script button | Use this button to test the syntax of your script. |
*Transform Functions: Transform functions are broadly classified as below,
No. | Function | Description |
---|---|---|
1 | String Functions | This has several JavaScript String functions. |
2 | Numeric Functions | This has several JavaScript Numeric functions. |
3 | Date Functions | This has several JavaScript Date functions. |
4 | Logic Functions | This has several JavaScript Logic functions. |
5 | Special Functions | This has several Contains a mix of utility functions. |
6 | File Functions | This Category has several, functions that do simple verifications or actions related to files and folders—for example, fileExist() or createFolder(). |