When running a task within a workflow that publishes or fills an array that was published earlier in the workflow with a high value, the following error occurs:
U00021719 Syntax error in object 'JOB_NAME(2)', line '00000'. 'U01001341 The index '2' is outside of the valid area of the array 'ARR_2_SEND_GLOBAL#'.'.
This can be reproduced in the following way:
The global array will be shown as defined with 50 indexes, but published empty. This shows in the workflow report:
U00020237 The object variable '&ARR_2_SEND_GLOBAL#[00001]' in object: 'JOBP.NAME', line: '00011' (RunID: '0001069075') has been created with the value '' by using the command :PUBLISH.
The first job will then end with FAULT_POST-PROCESSING - error in post processing. The Details of the job show:
U00021719 Syntax error in object 'JOBS.NAME(2)', line '00000'. 'U01001341 The index '2' is outside of the valid area of the array 'ARR_2_SEND_GLOBAL#'.'.
The publishing of the array from the job does got through. This can also be shown in the workflow report:
2022-10-08 01:09:04 - U00020237 The object variable '&ARR_2_SEND_GLOBAL#[00001]' in object: 'JOBS.NAME(2)', line: '00004' (RunID: '0001069076') has been created with the value 'one' by using the command :PUBLISH. 2022-10-08 01:09:04 - U00020237 The object variable '&ARR_2_SEND_GLOBAL#[00002]' in object: 'JOBS.NAME(2)', line: '00004' (RunID: '0001069076') has been created with the value 'two' by using the command :PUBLISH. 2022-10-08 01:09:04 - U00020237 The object variable '&ARR_2_SEND_GLOBAL#[00003]' in object: 'JOBS.NAME(2)', line: '00004' (RunID: '0001069076') has been created with the value 'three' by using the command :PUBLISH.
The script will also print out the contents of the array:
2022-10-08 01:09:04 - U00020206 Variable '&ARR_2_SEND_GLOBAL#[00001]' was stored with value 'one'. 2022-10-08 01:09:04 - U00020206 Variable '&ARR_2_SEND_GLOBAL#[00002]' was stored with value 'two'. 2022-10-08 01:09:04 - U00020206 Variable '&ARR_2_SEND_GLOBAL#[00003]' was stored with value 'three'. 2022-10-08 01:09:04 - U00020408 one -- two -- three
Release : 12.3, 12.3, 21.0
This is behavior as designed
the behavior seen is as designed.
The first :PUBLISH of the global array in the workflow actually publishes the array as an empty array even though it is defined as having 50 indexes. This is for performance reasons as defining and publishing too large an array will have an adverse effect on the system. This is documented here - https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/PUBLISH.htm
The error later on when the array is re-published from the job to the workflow is more of a warning that the array is being re-sized to something larger than the original. A way around this is to define and fill the array fully in the workflow. There are no plans to change this behavior (the message that appears). Workflows and jobs/scripts can be designed in such a way to ignore this error message if it is seen.