Please give details of the problem

Skip to content

Task Input Variables

Allows you to create variables before running the task. These variables can also be used later in the process.

Input variables
This table defines the variables that shall be evaluated at runtime before executing the task (calling a connector, sending an email...). The first column refers to the variable name, the second column defines its value: each of the two fields may result from the dynamic evaluation of a formula. If you want your variable to be evaluated in a given order, drag and drop it to move it upward or downward. If you want a variable to be secured (ie. not visible in Launched process Parameters tab), check box "Secured".

Click this button to add input variables.

Name of the variable (i.e. myemail).

The value can be fixed (i.e. john.doe@mydomain.com), or dynamic (i.e. ${P_user.login}).

A secured variable is a variable that won't be visible in "Process reports Parameters tab" : it is not sent by RunMyProcess server. A simple yet powerful scripting and templating language is used to define mappings, based on FreeMarker. For example, mappings may include mathematical operators, string manipulation, logical operators and choices, manipulation of a list of values, etc.

You can test your Freemarker script directly in RunMyprocess without launching the process. For that, click on script_code and read Input and Output Variables Tester

info You can now write your script in Javascript script instead of Freemarker thanks to a new Freemarker tag :

<@script env="javascript">
 function somme(a ,b) {
  var sum=new Number(a) + new Number(b);
  return sum;
 setVariable("sum", somme(a, b));

You must use setVariable ("name of variable","value") function to extract value of javascript to a process variable. You can use directly variables from your process by calling them with their name : var tmp=myprocess_var (you don't need to write var tmp="${myprocess_var}" as in RunMyProcess webform).

info Freemarker tester does not work for Javascript scripting : you must launch process to test it

info Trick : To create several variable in one line, leave variable name empty and create a JSON structure in value. For example {"var1":"value1","var2":"value2"} will create var1 and var2 in process.

Internal variables
Some variables are set automatically at process runtime; their name starts with P_ and any name starting with that prefix must be considered as reserved for future use.

For more information on the existing parameters or about Freemarker language, please see the Freemarker API.