Scope extends Accessible, ActionEdgeSource, CanBeSynced, ContainsFunctions, ContainsOperations, ContainsValues, ContainsWires, GeneratedElement, GeneratesElements, NamedElement, Wireable

A particular runtime scope of a web application, which permits lifecycle modelling. Scopes may contain other Scopes through a containment hierarchy.

All scopes in IAML are instances of Scope, and a Scope may contain another Scope through a hierarchy of containment. A Scope may directly contain any number of Scopes. Every Scope will contain the pre-render lifecycle Events onAccess (through Accessible) and onInit.

When a Scope is rendered, the lifecycle events for that Scope must be executed in the following order. If a failure occurs during this process, the current lifecycle execution process is cancelled and the failure handler for the current Scope is executed. If an ECARule is executed which must redirect the user to another Frame, the current lifecycle execution process is cancelled.

  1. If this Scope is contained by a parent Scope, then the pre-render lifecycle events for that parent Scope must be triggered.
  2. If this Scope has not yet been initialised according to the storage semantics of that Scope, then the onInit Event is triggered.
  3. The onAccess Event is triggered.
  4. All entry Gates contained within this Scope are sorted according to their name. The access semantics of each entry Gate are then executed.
  5. All exit Gates contained within this Scope are sorted according to their name. The access semantics of each exit Gate are then executed.
  6. The Scope is then rendered.

Failure Handler

An outgoing ECARule from a particular Scope with the name "fail" is defined as a failure handler for the given scope. If an error occurs during the execution of the given Scope -- for example, an Operation fails -- then the failure handler for that Scope is executed according to the execution semantics of the ECARule.

If the current Scope does not define a failure handler, then the failure handler of the containing Scope is used as the failure handler. If an exception is not caught through the containment hierarchy of Scopes, then the exception is caught by the runtime environment and the web application will display a runtime error.

[Scope.html]

Direct subtypes:

All subtypes: Toggle

Implementation Notes

Inference Rules

Constraints

Attributes

(none)

Inherited Attributes

Children

Inherited Children

References

(none)

Inherited References

Extensions

Inherited Extensions