移動式エンティティーの位置の更新
移動式ジオメトリー属性を持つエンティティーの位置を更新して、時間の経過にともなうエンティティーの移動を反映できます。イベントが発生すると、この位置のスナップショットをエンティティーの移動ヒストリーに追加できます。これは移動式ジオメトリー属性に保管されます。
以下の演算子を使用して、移動式エンティティーの現在の位置を更新します。
move <attribute> of <entity> to <geometry value>
ジオメトリーの現在の位置は、now の値に対応します。
以下の演算子を使用して、移動式ジオメトリーの位置を特定の時間における新しい位置に更新します。
move <attribute> of <entity> to <geometry value> at <date & time>
以下の例では、ルールが実行されると、car エンティティーの location 属性が、telemetry report イベントの時間における car の新しい location に更新されます。
ビジネス・モデル定義:
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).
ルール:
when a new car telemetry report occurs
if
the location of 'the car' is not null
then
move the location of 'the car' to the location of this telemetry report
at the timestamp of this telemetry report;