Triggers: Order of execution on an object
Apr 14, 2020
By
Beth Linden
According to this article (https://community.articulate.com/series/articulate-storyline-360/articles/articulate-storyline-360-user-guide-how-to-work-with-triggers#order), if multiple triggers are applied to an object they should execute in order from top to bottom. Correct?
I'm seeing evidence that this may not always be the case. I have an object/button that when clicked should send completion, and then execute a javascript to take the user to a specific page. We are seeing that occasionally the completion isn't being sent (or trigger isn't fully executing?), before the next trigger starts? Is this something anyone else has experienced, or is my configuration just special and full of trolls?
(Articulate Storyline 360)
Thanks!
5 Replies
Hi Beth,
Triggers are indeed executed in order from top to bottom in the list and so I am uncertain as to why your javascript trigger should be executed before your course completion is reported.
Sorry I can't shed any light on your problem, but I can at least confirm that trigger order is important.
Beth,
There is an old saying in the computer world that 'The compiler is what the compiler does." That means that no matter what the manual says, you can't show it to the machine and force it to follow the manual. I don't believe it is necessarily correct to believe that the triggers execute in order. I believe it is more accurate to believe that they BEGIN to execute in order. In your case, I can easily imagine that if there is the slightest hiccough in the connection to the LMS (or even if there are a lot of results to be aggregated) that the js would complete first.
Caveat: I haven't seen the code, so I don't know for sure, but if what I said is right, it could cause the results you are seeing. If this is happening in a predictable or reproducible manner, you could build a .1 or .25 second delay into the js and see if that changes anything.
Agree with Walt the completion trigger is going to take a little time for the communication to complete, also you javascript probably needs a little more time.
Thank you!
Walt - you are so right, and I'll try to build in a slight delay to see if that helps.
This discussion is closed. You can start a new discussion or contact Articulate Support.