Updating arcplan / Longview Analytics Objects
This article describes the workflow which is applied in arcplan / Longview Analytics to update invalid objects, e.g. if you switch a menu which affects the content of a table, the table needs to be updated afterwards.
In this context it is important to distinguish between update and invalidate objects.
- Update is the process, which re-calculatets the content of an invalid object
- An object is set on the state invalid, if it's content is obsolete and needs to be re-calculated afterwards.
In the previous example with the menu and the depending table, the switch of the menu only sets the table on the invalid state. After that, the update process is started which recalulates and validates all invalid objects one after another.
Objects get invalid after the following actions
- after the first load of the document,
- by the function UPDATE, or
- after changes of other objects, which:
- are referenced by a calculation formula
- apply a database condition by a connection arrow
The direct change of object content, e.g. by a manual entry or a formula assignment operation (:=), is not treated by the update process. Here the event "After update" is not submitted by the object.
Update Process / Lazy Evaluation
Updating objects in arcplan / Longview Analytics follows the principle of Lazy Evaluation.
That means the update process is only started if the direct or indirect result is visible for the end user. So for instance an object on a background layer, which content is not evaluated by any other visible object will not be updated. It will maintain it's invalid state, as long as it's content is not requested by another object. The advantage of this principle is a significant performance increase for most arcplan / Longview Analytics applications.
Definition of Lazy Evaluation in arcplan / Longview Analytics: An invalid object will be updated, if:
- it's on the document layer and the property visible is set, or
- it's requested during another object's re-calculation
Order of object update
The order in which invalid objects are updated is given by the z-order of the objects in the document (i.e. the order in which objects cover each other).
During an event evaluation, e.g. after a button click, objects become invalid during the formula execution. After the formula is completely executed, all remaining invalid objects are updated afterwards.
Of course, the principle of Lazy Evaluation is applied here as well.
Object Update on the Client
On the server, all objects are updated and packaged which are loaded on the client. So also all objects, which are covered by other documents or which are currently invisible. Usually this follows the same process as within the Application Designer. Nevertheless, there are situations in which the update order might be different.