A task is a long action running on the platform. This is not a job/software but its a big action executed by the user.
For example, when a user wants to delete a project, we need to remove all project data (soft or hard delete).
Before doing the big request: The client may ask the server to create a Task object.
When doing the request, the client just needs to pass the parameter task (= id task). If the service support Task, server will update the task progress during the request.
The client may ask the task progress during the request execution on the server.
Package main classes
A task running on the platform.
The Task domain is not a real GORM/Hibernate domain. The file is located under src/groovy.
Its not a domain because it must be outside any "hibernate session". The progress updating must be visible during the current request for an other request.
Op for task running on the platform.
Client create a task resource.
Server create the task (progress=0) and response the task object.
Client send a "big" request to the server (e.g. delete a project and all its data) and send the task id as a parameter.
If the service support task param, it modify the task progress value during the request
- Just after sending the request, the client regulary ask the task progress to the server. The client may update a progress bar with the task progress value.
- Server finished the task