PUBLISH statement causes non-related variable to be blanked out

Document ID : KB000103218
Last Modified Date : 26/06/2018
Show Technical Document Details
In this particular case, a time event is defined to execute 'Repeatedly', in intervals of minutes (number is not relevant), and 'Immediately'.

In the Runtime section, an MRT is defined with a 'Fixed Value' of a few seconds and the 'Actions and Runtime Deviations' Cancel the task and then Execute itself.

In the 'Process' Section, the following script is defined :

:define &LARRAY#,string,10
:clear &LARRAY#[]
:publish &LARRAY#[],GARRAY#,"TASK"
:set &LVAR# = 'LOCAL TEST'
:pset &GVAR# = 'GLOBAL TEST'
:print 'GVAR = &GVAR#'
:print 'LVAR = &LVAR#'

When the event is executed, on the first iteration you get the following:
2017-09-29 12:15:18 - U00020408 GVAR = GLOBAL TEST
2017-09-29 12:15:18 - U00020408 LVAR = LOCAL TEST

On each following iteration the following:
2017-09-29 12:15:50 - U00020408 GVAR = &GVAR#
2017-09-29 12:15:50 - U00020408 LVAR = LOCAL TEST

If the 'PUBLISH' statement is commented out, the problem does not occur!

The PUBLISH command for arrays causes other variables to be unintentionally blanked out. 
This only happens if publish is used with a different name where the new name is already in use.
A correction for this issue is available on the following versions:
  • Automation Engine 12.2.0 - currently planned to be released end of June 2018.
  • Automation Engine 12.1.2 - Available
  • Automation Engine 12.0.5 - Available
Please install one of the above listed versions or a higher version to resolve this issue.