Awaken Scripting User Guide

Please email helpdesk@awaken.io for omissions or errors.
×
Menu

Workflow Page Load Order and Behaviour

 
The order in which Fields on a Page are loaded and executed can impact the behaviour of a Workflow. To ensure that the Workflow behaves as expected, this article explains the page execution sequence for Scripting.
 
Before Page Load
Any Fields marked to run Before Page Load (such as button-type Controls configured to Autoclick) will be executed on the server before the page is even provided to the user. The result of any of these operations will then be included in the initial Page data provided to the client on Page load.
 
 
On Page Load
Any JavaScript Fields are executed (see Code Execution), and then all Fields on the page that have any On Page Load behaviour (such as button-type Controls configured to Autoclick) are executed. The Fields will be executed from the top-left to the bottom-right in sequence, and any visibility settings or Stylesheets applied before the Fields are actually rendered to the Page.
 
The time that the Page takes to render will depend on the number of Fields on the Page, and how long the user's computer takes to execute any contained JavaScript.
 
It should be noted that JavaScript Fields are executed prior to the initialisation of Fields or System and Workflow Variables, and attempting to read from/write to any Fields or Variables at this stage will fail.
 
 
Page Loaded
Any time the agent alters the value of a Field, all the Calculate Fields on the Page are re-evaluated in the same top-left to bottom-right sequence as On Page Load (see Code Execution). Any changes made to the Page are applied as they are executed by the Calculate Fields.
 
 
Page Departure
When a Page has been dealt with and the transition to the next Page has been triggered, then the values of all Fields will be saved back to the database before the Page is left.
 
 

Notes

The Last Page only executes the Before Page Load section of the above description, and closes before any client-side execution occurs. Attempting to complete any actions that aren't set to run Before Page Load will simply be bypassed - it recommended that no content be kept on the Last Page, but if not then the content needs to be configured with this in mind.