Behavior changed for published Arrays or ForEach Workflows

Document ID : KB000087387
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

If a script creates an array with STR_SPLIT and the input string of the STR_SPLIT is separated using a semicolon (i.e a:b:c:), the array (VARA_ARRAY# in the example below) is published and used as a ForEach workflow. 

For each input string, of the semicolon separated value in the script SCRI.TINO.2,  the ForEach workflow should be executed once and if the input string is empty, it should not be executed.
0EMb0000000IVdl.png

The behavior is different between the Automation Engine version 11.1.4 and version 10 and older and v11.1.5 and v11.2.4 and newer.

In the older versions the script is not executed when the input string is empty, see below.

0EMb0000000IVdq.png

In the newer versions (v11.1.5 and v11.2.4 and newer.), the script is executed once with a blank when the input string is empty:

0EMb0000000IVdv.png
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: The script function STR_SPLIT does not work for Empty Strings. Instead of an empty array, the first array entry has been set to " ".
Resolution:
Update to a fix version listed below or a newer version if available.
 


Fix Status: Released

Fix Version(s):
Component(s): AE Server and Initialdata

Automation Engine 12.1.0 - Available
Automation Engine 12.0.3 - Available
Automation Engine 11.2.6 - Available
Additional Information:
Workaround :
Insert an if around the STR_SPLIT:
 
:IF STR_LENGTH(&STRING#)> 0
:  FILL &TICKETS#[] = STR_SPLIT(&STRING#, ";")
:ENDIF