Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The lifecycle of models consists of several stages:

Definition: a model is developed using Thing Definition Language.

Compilation: a model is deployed to TQLEngine and the definition is compiled

Instantiation: model instance(s) are created when model attribute values are provided (by Create/Save queries)

Update: 

Delete

Explain the lifecycle of models (ThingModel, AppModel, DataModel). From definition, to instantiation, to updates/modification, or delete, to triggering of actions.Updated: changes to the model instance attributes will result in updates of the model instance data in the storage. Updates can happen in two ways:

(1) modifying the attribute's value. Attribute values can be modified by queries (Update or Save queries). This type of update will in turn activate the associated action and workflow if the attribute is an actionable attribute.

(2) modifying the attribute's known (known value).This type of modifications happen when the output of an action/workflow is used to update the Attribute. These updates will NOT activate any action.

Deleted: the model instance is removed. This is done by a DeleteAll query (need conformation).

In ThingModels and AppModels, model lifecycle is closely linked to the workflow lifecycle (DataModels do not have Actions or workflows).

 

Gliffy
nameModel Lifecycle

Models can be "partially" instantiated. That is, if some, but not all attribute values are given, then model instance(s) will still be created with the attributes which have value. The other attribute values can be provided later as model instance updates.

 

Models are defined by using ThingModel, AppModel or DataModel types.

...