Variables

Variables

In InterformNG2 there are 4 kind of variables:

  1. User defined variables, that you define in the designer.
  2. Workflow variables. They can be defined in the workflow either by setting a single variable or multiple variables at a time.
  3. Predefined input variables. These are variables, that contain information about the input file. One kind of input variables are the spooled file attributes, but there is also a set of variables covering input XML files.
  4. Predefined output variables. The value of these variables can be setup before you generate various kinds of output in InterformNG2.
  5. Global variables. You can set these variables for all tenants if you sign on as an admin. You can use these variable for identifying the machine on which you are running both in the workflows and templates.
  6. Tenant variables. You can set these variables on the tenant settings. That can be used in workflows and templates to identify the tenant on which you are running. You can e.g. use this to make it possible for your workflow to differentiate between a production and a test server. You can use this as a way to prevent emailing or arching any documents while running on a test tenant.
The list of all predefined variables (and user-defined workflow variables) can be found in the workflow by clicking the magnifying glass icon next to the letter T.

Common variables between workflow and templates

Please notice, that there is an overlap between the variables in the designer and the workflow variables. So if you create a workflow variable and a designer variable with the same name, then the value is shared. That can be used e.g. to transfer information between the workflow and a template. In the designer you can use the workflow variable element to test how the template would react to a specific value setup in the workflow. A value set on a variable in the designer template, can also be used in the workflow after calling the template.

 

Variables are referenced in Xpath expressions with a preceding dollar sign ($) e.g. $Myvariable.

Notes
Please notice, that variables are case sensitive, so e.g. $var is not the same as $Var.

 Limitation regarding workflow variables and booleans

Please notice, that there is a limitation when it comes to workflow variables and booleans (true() and false()). The workflow variables are handled as strings, when it contains a boolean.

This example will e.g. NOT WORK:

We try to use a workflow variable with a boolean to indicate if a logo should be included or not:

 

- and we combine this with this template:

 


Then we STILL get the logo in the output - even though the variable, InsertLogo is false.

The reason is, that if we use a workflow variable as a condition, then the workflow variable is handled like a string and this does not work....

Instead you should define the workflow variable as a string as below:

 

- and then compare the workflow variable with a string in the template:

     


Variables can be used all over InterformNG2:

  1. In the templates
  2. In the designer components.
  3. In mail templates
  4. In transform files
  5. In the workflow components.
    • Related Articles

    • Tenant variables

      It is possible to define one or multiple tenant variables. This can e.g. be used as a way to identify the tenant on which the current workflow or template is running. The workflow can e.g. use that in a condition to prevent emailing customers if the ...
    • Global variables

      It is possible to define global variables in InterformNG2, which can be read in all workflows and all templates. You can set a fixed value to such a global variable. This can be used in workflows and templates to identify on which machine the ...
    • Excel variables

      You can use variables in the Excel designer exactly like the variable element in the normal template designer. These variables can be used in any Xpath expression. You can create a new variable or update the value of a variable in two ways: You can ...
    • Predefined variables

      InterformNG2 is delivered with a lot of predefined workflow variables, that you can refer to as any of the user defined variables. You can see them while you are editing an Xpath expression in the workflow: In the search field you can type in a part ...
    • Set multiple workflow variables

      The advanced set meta data workflow component, Set multiple workflow variables, sets/defines multiple workflow variables. This can be used later in the workflow and also in a template. The variables can be referenced in XPath expressions with a ...