This section explains what an Event is, how they are triggered, how to listen for them, etc.
An Event is a declaration that some action has occurred. An Event will be generated by the Motive engine when certain life-cycle actions take place. For example, every time a [permalink id=1846 text=’Frame’] is closed, each [permalink id=1848 text=’Resource’] in the Frame emits the [permalink id=1912 text=’Deactivate’] Event. Alternatively, users can generate a [permalink id=1940 text=’Custom Event’] using the [permalink id=1855 text=’Custom Event Resource’].
Events are useful as a way to trigger Frames and the Resources within. A Frame can have a Precondition that listens for a specific Event. Once this Event is emitted, the Frame’s Precondition will be satisfied, and the Resources within that Frame will begin their processing.
There are two ways of creating an Event Precondition for a Frame. The first method is to create a new Frame, and then select Object Event Condition from the Precondition dropdown. Using this Condition, you can select the Frame and the Event you would like to listen for. If you are listening for a Custom Event, instead use [permalink id=2147 text=’Custom Event Condition’] and type the name of the Event for which you are listening. The alternative way to create an Event listener is to navigate to the Resource whose Event the Frame will wait upon. Then, in the bottom right hand corner of this Resource, click the blue plus (“+”) symbol and choose the Event for which you want to listen. This will create a new Frame with a Precondition for the Event you selected.