wiki : Technical documentation > Workflow plugin features
Workflow plugin features
In Lutece, the workflow refers to the processing circuit of a submission or request (for example, in the case of the Forms application) or an appointment (in the case of the Appointment application). A request (a file or an appointment), called a resource, goes through different states depending on the progress of its processing and the actions performed.
Examples of commonly used titles for the states a resource can go through: submitted, in progress, awaiting clarification, validated, etc...
The resource transitions from a starting state to an ending state by activating a workflow action. An action includes between none and several tasks. Each task constitutes a process performed on the resource (modification, deletion, notification...) for the resource to move to the next state.
Examples of action titles: request processing, request for clarification, request validation, etc...
In the case of the action request validation, the state of the resource changes from in progress to validated. A task can be associated with this action, for example: notify a user (by email and/or SMS)
There are three types of actions:
- Classic actions are triggered by a manual action of a back-office administrator. These correspond to actions of modification, cancellation, or assignment to back-office users.
- Automatic actions are triggered automatically when the resource arrives in the starting state if all prerequisites are met.
- User-triggered actions. Some actions can be configured to be triggered by users to allow them to modify a request or cancel an appointment, for example.
Tasks are features of the Workflow plugin and its modules. An action can contain several tasks that will all be executed when the action is triggered.
For example, the notification task allows sending an email or SMS notification as an acknowledgment of receipt when a request is submitted. Most often, this task is configured in an automatic action. Other commonly used tasks include archiving (by anonymizing all or part of the fields or by deletion), assigning the resource to a back-office user, or modifying a resource (to add a comment useful for processing the request, for example).
The processing circuit of a request (or an appointment), enabled by the Workflow plugin, is implemented in conjunction with the Forms and/or Appointment (Rendez-vous) plugins. The configuration of the workflow plugin is done in the back office. Depending on the workflow tasks to be executed to meet the application needs, different modules will need to be added.
Example of a module that can be added to perform the task of generating a PDF for the user: the workflow-formstopdf module.
Like every Lutèce plugin, Workflow can be adapted through development when new functionality needs arise.
Workflow Management
Creating a Workflow
Creating a workflow is done from the Workflow Management menu entry, then by clicking the + Create a workflow button.
In the first step, a workflow is defined by a title, a description, and whether or not it is assigned to a workgroup. Assigning a workflow to a workgroup restricts the administration of the workflow to a list of people belonging to a workgroup. By default, the workflow is not assigned to any workgroup.
Modifying a Workflow
Modifying a workflow allows proceeding to the second step of its creation, by defining the different states of a resource, the actions and tasks, and subsequently modifying its configuration. A workflow is thus characterized by a list of states, a list of actions allowing the change of these states, and associated tasks.
State Management
Action Management
Task Management
Graphical View of Workflows
Examples of Business Workflows
Before creating a workflow, you must define the processing circuit of your file or request. The following examples are cases implemented in various Lutèce business applications.
Simple Lifecycle of a Request
This example is compatible with a registration or application request form, for example. The request processing service has defined a request processing circuit. The user submits their request and is immediately notified. The request is in the "Request received" state. The service verifies if the request meets the eligibility criteria. Then, depending on the request criteria, it is either validated or rejected. The state change from "Request received" to "Request rejected" or "Request accepted" is manual and performed by a back-office user.
Finally, depending on the chosen configuration delay, the request will be archived, and the information provided by the user will be anonymized or deleted according to the option chosen in the task configuration.
Another example: We note the use of the archiving task as an automatic task in all states. The archiving task is executed according to the configured delay. Thus, if the resource remains in an intermediate state of the workflow, meaning that for any reason, it has not followed the complete circuit, the resource can still be anonymized at the end of the planned delay.