System Variables - EcoSys - 3.1 - Help - Hexagon

EcoSys Connect Help

Language
English
Product
EcoSys
Search by Category
Help
EcoSys Version
3.1

The following variables can be used to access statistic, job, datastore records or map data. The following variables can be used in field assignments and other reader, processor, writer settings.

Statistic System Variable

Name

Description

$__SYS(SUCCESS_WRITE_CNT)

Success Count which includes stats inside of one step by the moment system variable has been called.

$__SYS(FAILURE_WRITE_CNT)

Failure Count which includes stats inside of one step by the moment system variable has been called.

$__SYS(TOTAL_SUCCESS_WRITE_CNT)

Success Count which includes stats from previous steps as well as from nested and parent jobs by the moment when system variable has been called.

$__SYS(TOTAL_FAILURE_WRITE_CNT)

Failure Count which includes stats from previous steps as well as from nested and parent jobs by the moment when system variable has been called.

$__SYS(RESEND_CNT)

Number of records resent during the current job’s execution

$__SYS(TOTAL_RESEND_CNT)

Number of record results across all the jobs

  • These system variables will only have values for Processors/Writers that have the Statistic settings configured.

  • Consider introducing Reducer processor before the SOAP processor/SOAP Writer while using system variables inside of one step if previous operation returns entity set. If Reducer processor is not used, all the entities in the SOAP input will be sent with the same statistic values.

Job/User System Variables

Name

Description

$__SYS(ROOT_JOB_NAME)

Job name of the root job

$__SYS(PARENT_JOB_NAME)

Job name of the immediate parent job

$__SYS(JOB_NAME)

Current job name

$__SYS(JOB_PARAMETERS)

Job runtime parameters values

$__SYS(USER)

User name in step component

$__SYS(JOB_EXEC_ID)

Execution ID of the current job

$__SYS(PARENT_JOB_EXEC_ID)

Execution ID of the parent job

$__SYS(ROOT_JOB_EXEC_ID)

Execution ID of the root job

$__SYS(CURRENT_TIME[,formatSpec]

Current time of the job

The IDs ( $__SYS(JOB_EXEC_ID, $__SYS(PARENT_JOB_EXEC_ID), and $__SYS(ROOT_JOB_EXEC_ID) are visible in Connect in the beginning of the Job Execution Logs

For example, 'SystemVariables' job, 'd' step, jobExecutionId='722' started with parameters: {}

MAP and TRANSFORM Variables

To map fields or transform data in a SQL or OData Processor/Writer the $__MAP() and $__Transform() variables can be used.

  • $__MAP(<attr>): Used to get an attribute from an entity set. Similar to $__CTX.

  • For example, if the previous step has a field called NAME, you can reference it in your SQL Statement using $__MAP(NAME)

  • $__TRANSFORM (<what>__,<type>__,<parameters>): Transforms the <what> based on the <type> and <parameters>. The __, is a delimiter. We only support four types of Transform parameters – PREFIX, SUFFIX, DATEFORMAT, and REPLACE.

    • For PREFIX/SUFFIX, the parameter is the actual prefix/suffix string.

    • For DATEFORMAT, the parameter is the date format like mm/dd/yyyy.

    • For REPLACE, the parameter is - ["<Search String>","<Replace String>"]

$__TRANSFORM can be nested.

Example 1: $__TRANSFORM($__TRANSFORM($__MAP(a)__,PREFIX__,pre)__,SUFFIX__,post)

Example 2: Remove single quotes from the EcoSys Response error messages- $__TRANSFORM($__MAP(resultMessageString)__,REPLACE__,["'",""]

Using variables in SOAP/OData transformations

In the SOAP/OData processor/writers when fields are mapped you can specify Prefix, Suffix and Date Format changes on the transformation tab.

The following system variables are supported in the SOAP/OData transformations.

  • $__SYS

  • $__CTX

  • $__PARAM

  • $__STORE

When the variable expression can contain a comma, the comma needs to be converted to a __|

Variable Expression​

Variable Expression used on the Transform tab​

$__SYS(CURRENT_TIME,<format>) ​

$__SYS(CURRENT_TIME__|<format>) ​

$__STORE(<collection>,<attr>)​

$__STORE(<collection>__|<attr>)​

$__STORE(<collection>,<key field name>,<key field value>,<attr>)​

$__STORE(<collection>__|<key field name>__|<key field value>__|<attr>)​

The <format> for date system variables support Java date format. Some example formats are:

Format

Example Date

$__SYS(CURRENT_TIME)

2022-07-20T16:01:44.136721337-04:00[America/New_York]

$__SYS(CURRENT_TIME, MM/dd/yyyy)

07/20/2022

$__SYS(CURRENT_TIME, dd-MMM-yyyy)

20-Jul-2022

$__SYS(CURRENT_TIME, MM/dd/yyyy HH:mm:ss z)

07/20/2022 15:58:18 EDT

$__SYS(CURRENT_TIME, dd MMM yyyy HH:mm:ss.SSS)

20 Jul 2022 15:55:19.071

$__SYS(CURRENT_TIME_MILLIS)

Current date in epoch time in UTC

Prefix and suffix transformers support 2 variables in their expression.

Variable

Description

^__UUID__^

generates a 36 character unique ID of the form 01234567-0123-0123-0123-012345678901

^__SHORT_UUID__^

generates a 20 character unique ID whose max value is 2^64.

Example

PREFIX transform on a field whose value is 'val1'

Expression: ^__UUID__^ -

Result: 01234567-0123-0123-0123-012345678901 - val1