ION Bus Functions

ION functions can be used to create and modify data. By calling the function from Data Processing, it is possible include this in automated testing. Since Data Processing can be used to execute any function, the function and arguments must be set according to the ION documentation.

The function is defined with the */Function keyword together with the name of the function. The arguments for the function are then set as values. Finally the function is executed by calling the *Execute/ keyword.

The example below shows the syntax for creating a transaction by executing “CM_CaptureCashTransaction”.

1083

Executing an ION Function that creates a transaction

Mandatory Arguments

A function may have a number of mandatory arguments that must be set before executing the function. The mandatory arguments for a function can be read from the system by using the *FetchFields/ command

1087

OnBehalf Functions

Some functions have "OnBehalfOfToken" and "OnBehalfOfComponentName" arguments. These values are automatically generated by OmniFi, so you can just exclude them. If you set a value, we will use that value instead.

Optional Arguments

Optional arguments can’t be read from the system, so they must be set according to the ION documentation. That also means that the data type must be specified. This can be done with Data Mappings in the OmniFi configuration folder, or by adding the type to the header as in the example below per ColumnName(DataType).

1142

Argument Data Types

Function arguments can be of the following types

TypeDescriptionExample
STRText valueCurrency(STR)
INTInteger valueTransactionId(INT)
REALDecimal valueAmount(REAL)
DATEDate valueOpeningDate(DATE)

List Arguments

For list arguments the field name should be prefixed with “ARRAY.”. So, if the field is ReconciliationIdList the field name should be ARRAY.ReconciliationIdList. Since this would typically be optional arguments, the argument type should also be added, like: ARRAY.ReconciliationIdList(STR)

925

Function Result

The result from a function call can be read by using the *GetValues command after the function has been executed. To get the result from the function, “result” should be set as the argument. This result could then be used in another function by referencing the result. Please see Keywords for more information about GetValues.

721

Reading result after the function has been executed

Data Mappings

Data mappings is a way of simplifying a function call by mapping complex system values to more readable once. This can be done for argument names and values. How to configure mappings is described in the Technical Whitepaper.

📘

Data Processing tasks that use mappings will not work on a system that does not have the same mappings.

Debug log with designation “DataProcessing” can be used to see the Data Processing row after the values have been mapped.

Argument Name

Argument name mappings affect the header row. So instead of “TransactionDate” it is possible to use mapped value “Transaction Date”

1021

ION Function with mapped argument names

Argument Value

Mappings for the argument value affects the value that is sent to the function. So instead of using the technical name “CPY1010” it is possible to use the mapped value “CPY_ECB”.

1023

ION Function with mapped value for Entity

📘

*GetValues can be used to get the mapped value that is sent to the function.