ACTIVATE_UC_OBJECT allows recursive self call contrary to documentationen

Document ID : KB000084626
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
If a script activates itself recursively, it does not result in an error 20423 any more. It will now be cancelled, because it's interlaced to much.

With the script function ACTIVATE_UC_OBJECT an object shouldn’t be able to activate itself:
 
"Objects cannot activate themselves by using this script function. Any attempt to do so results in an infinite loop and could bring the whole AE system to a halt.".

Recursive call is possible and will lead to infinite loop.

If you use a predefined &$NAME# the recursive call is possible.

Example:
:SET &RUNID# = ACTIVATE_UC_OBJECT(&$NAME#)

And, it is also possible if you use a normal object name.

Example:
:SET &RUNID# = ACTIVATE_UC_OBJECT(SCRI.TEST.FEP)
Cause:
Cause type:
Defect
Root Cause: A recursive call of ACTIVATE_UC_OBJECT can lead to an endless loop in the Automation Engine.
Resolution:
Update to a fix version listed below or a newer version if available where a script that activates itself recursively is canceled because it would be interlaced too much.

Hotfix-Description: ACTIVATE_UC_OBJECT allows recursive activation

Behavior has been improved where a recursive call of ACTIVATE_UC_OBJECT lead to an endless loop in the automation engine. Now after an activation depth of 16, the activation is cancelled same as for workflow depth.

 

Fix Status: In Progress

Fix Version(s):
Automation Engine 12.2.0 - Planned release date: 2018-06-19
Automation Engine 12.1.1 - Available
Automation Engine 12.0.4 - Available
Automation Engine 11.2.7 - Available
Additional Information:
Workaround :
Use an if condition to avoid the infinite loop. Check if the parent has the same name as the object to be activated and exit if true.
 
:IF &PARENT_NAME# = &$NAME#
: PRINT "Parentname = NAME -> Exit 1 to avoid a loop"
: EXIT 1
:ENDIF

If the infinite loop is triggered, rename the object that is being activated.