Differences between Action and CATRule

Hi
I have a simple EKL script that reports the number of Children of a General Operation. The script is working fine when running it as an Action, but the same code is not returning any results when using it inside a CATRule there's no output of the number of child items.

Is there any differences for EKL execution when running the code as a CATRule?

Find below a screenshot of the code and a video showing the result from both options:
First 35 seconds show the output from running the script as an Action on sec 39 onwards the results from running as a CATRule with a result of 0 for returned children of the selected General Operation.

Any help would be appreciated.

Thanks in advance