Parameters

Parameters tab

Required parameters list

Additional parameters list

Invalid parameters list

If there are parameters that are no longer required by the selected sub-process, they become invalid and will appear in this list and can be deleted manually.

Parameter editing screen

Editing parameter expressions

WorkflowGen supports VBScript and JavaScript expressions in action parameters, which can be created either directly as action parameter values, or in TEXT type process data mapped to action parameters as IN values.

Creating an expression as an action parameter value

  1. Under Send the value of in the Edit parameter panel, choose a text and place the expression in the text area.

  2. Next to Scripting, check Enable, then choose either JavaScript or VBScript.

Creating an expression as a TEXT process data

  1. In the Edit data panel, place the expression in the Default value text area.

    Tip: Click the pencil icon next to the Default value text area to open a larger text editor that includes JavaScript and VBScript syntax highlighting.

  2. Specify the language either on the Mapping tab in the Form Designer, or in the Edit parameter panel:

    • In the Edit parameter panel, check Enable next to Scripting, then choose either JavaScript or VBScript.

      OR

    • On the Mapping tab in the Form Designer, choose the data's Value IN button, select the expression from the Data drop-down list, check Enable next to Scripting, then choose either JavaScript or VBScript.

All WorkflowGen macros (except notification macros) are fully supported in both languages and are enclosed by < >(e.g. <WF_PROCESS_INST_ID> for the request number).

In both languages, the expected result must be either a number, a string, or a date.

Examples

This example would return the request number plus 5 in both JavaScript and VBScript:

<WF_PROCESS_INST_ID> + 5

No return keyword is needed for expressions, with the exception of JavaScript inside a function. However, you cannot directly return the function; instead, it must be invoked and must return something like the following example, which would get tomorrow's date:

(function(){
    var today = <WF_SYSTEM_DATE>;
    var tomorrow = new Date();
    tomorrow.setDate(today.getDate()+1);
    return tomorrow;
})();

OR

function test(){
    var today = <WF_SYSTEM_DATE>;
    var tomorrow = new Date();
    tomorrow.setDate(today.getDate()+1);
    return tomorrow;
}
test();

Last updated