Initializing the location of a moving entity
You can initialize an attribute that stores values related to the movements of a location, so that you can use them in your solution logic.
Use the following operators to initialize a moving geometry attribute:
set <attribute> of [attribute of]* <entity> to a new moving geometry [tracked for <calendar period>]
The construct tracked for <calendar period> is optional. By default, the history limit that determines the time during which the geometry is tracked is 24 hours, but you can specify a different calendar period for each moving geometry.
In the following example, if the rule executes, the location of the car is initialized as a new moving geometry, and this geometry is tracked for two days.
Business model definitions:
a car is a business entity identified by a plate number with a model, a capacity (numeric), a color, a location (a moving geometry).
a telemetry report is a business event related to a car.
a telemetry report has a location (a point).
Rule:
when a car telemetry event occurs
if
the location of 'the car' is null
then
set the location of 'the car' to a new moving geometry tracked for 2 days;