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# :set &LARRAY# = 'TEST_HOST_ARRAY' :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.
Release: AUTWAB99000-12.0-Automic Workload Automation-Base Edition
A correction for this issue is available on the following versions: