If the duration of the last event on a sublayer is exceeded, the sublayer’s flow processing freezes until the parent event is deactivated. The last sublayer event is active until deactivation of the parent event, longer than its predefined duration. However, it’s always possible to command the parent event to deactivate at the selected moment. One of the method is to create a global ‘flag’ variable of Boolean type and define it in the Header, like:
Then, organize event flow on the parent layer in such way, that a consequent event after the ‘parent’ one has a logical activation condition with:
Thus, the ‘parent’ event is going to be aborted any time, when the global Boolean StopFlag becomes true.
In your example, I would add a “dummy” event into the sublayer and make it activated at the end of a real processing of the sublayer. Then, add the assignment into the 'Control Loop' snippet of the dummy event:
The general idea behind of this is that it’s always possible to control the event flow logic manually, with a help of global Boolean ‘flag’ variables, changed in code snippets, or by other means.