Custom event seems to stop once it gets to a for each loop node

Can you show the code of the foreach node?