@@ -40,13 +40,19 @@ The entities which are used but which do not correspond to documents stored in M
> All the activities are defined in the ActivityInternal Folder and extends from [ActivitySchema](https://gitlab.cluster.ensisa.uha.fr/devcolis/colis/-/blob/dev/server/schema/subSchema/ActivityInternal/ActivitySchema.js).
> Each activity must be declared in [schemaVehicle.js](https://gitlab.cluster.ensisa.uha.fr/devcolis/colis/-/blob/dev/server/schema/schemaVehicle.js)
An activity has two functions (which do not have to be necessarily implemented)
An activity has two main functions:
-`_onExecute (vehicle)` which executes the activity for the given vehicle.
-`_onFinished (vehicle)` which executes a code before moving on to the next activity
> Each activity has an `onDate` field which corresponds to the start date of the activity (`null` if as soon as possible) and `isEnded` which is set to true if the activity is completed (it will then be deleted after a call to `_onFinished` by vehicle management).
Each activity also has:
onDate: The scheduled start date (or null if it should start as soon as possible).
isEnded: A status set to true when the activity is complete, prompting its removal after calling _onFinished.
> The server’s role in executing activities is now primarily for notification and removing activities once completed, while the core tasks are managed by the sentinel.
An activity has two functions (which do not have to be necessarily implemented)