3. Variables
Version 2.6 by Outhman Moustaghfir on 2021/04/27 15:22
Introduction
Variable is a container that holds a value and can be called in the iXPath Scenario. The importance of variables is to make flexibility in using some values without referring to their origins.
There are 2 types of variables:
- System variables
- Local variables
To call a variable, we should put it inside ${}. Eg: for a variable named ‘iXVar’, it can be called as ${iXVar}.
System variables
System variables define some default values in the system, and they can be called by users several times.
Here is the list of system variables :
- At the declaration of the scenario:
- iXSession: it returns the ID of the current session.
- iXSessionPath: gets the Path of the session folder.
- env: name of the environment.
- inputFile: this variable collect all input files in one list.
- For a mail listener :
- iXFrom: refers to the sender of the mail.
- iXSubject: refers to the mail subject.
- For an AS2 listener :
- iXFrom: return the value of the AS2 sender.
- All connectors declare a system variable of type BpmnFile, the connector variable uses a bunch of functions to handle the list of BpmnFiles that will be detailed in the table below :
Function Description Use Get Get a file with index number "i" from the BpmnFile list, the indexes begin from 0 as the first element, and so on. if we have an XmlToXml connector named "XmlToXml1" we can get second bpmn file as :
${XmlToXml1.get(1)}
NB : we will make examples on the same connector
getTrkValues Return the Tracking values from a BpmnFile