Updating the location of an entity

Update the location of an entity based on the geographic data from the incoming event.

In the following example, the location of the parking tariff zone is defined as a polygon in the business model. The location of the parking tariff zone is updated when a parking tariff zone update event arrives into the agent that processes the event.

when a parking tariff zone update occurs
then
   set the area of 'the parking tariff zone' to the updated area of 'the parking tariff zone update' ;

In the following example, the location of the car is defined as a point in the business model. The longitude and latitude of the location the car are updated when a car arrival event arrives into the agent that processes the event.

when a car arrival occurs
if
   the arrival location of this car arrival is Valbonne
then
   set the location of 'the car' to the point with 7.0095 as longitude and 43.6424 as latitude ;