I am going to publish a series of short posts on how we use the Nuxeo Content Services Platform internally at Nuxeo. As you will see, there are indeed several use cases that are worth sharing. Eating our own dog food (as it is called) is very important in our product management process: it helps us understand what the limits of the platform are, it gives us the desire to continuously improve it, and it is also a great way to test the product in some more specific ways.
As you can imagine, maintaining a platform is far more complex than a simple out-of-the-box application, with a framework the test cases can be infinite. Thanks to this process, we are able to discover and fix a great number of bugs before releasing!
I’ll skip the basic document sharing use case as there are no surprises here: Nuxeo Platform is our intranet tool, and everybody uses it as well as the Drive extension for sharing documents internally. We also have more advanced use cases that I will share with you in this series:
- Our vacation request workflow
- The internal Techlead report publishing using the template rendering module
- Nuxeo Online Services and Marketplace applications - all Studio based
- A data extraction chain made using Studio
- Our customer reference management tool
- A simple Q&A module
- Our QA report plugin
- A training / consulting workflow
Vacation Request Workflow
I’ll start today with the vacation request workflow - one of the oldest use cases for our platform. As in every company, people have to take vacations at Nuxeo (note the very corporate “have to” ;-). Asking for vacation at Nuxeo used to be an email-based process. This was working quite well, but was a nightmare for Ornella, our HR manager, when it came to checking what was taken for a give period of time.
As soon as we introduced Automation in 2010, we decided to implement this simple process on our intranet, a bare Nuxeo Platform. Since then, the Time Off Request module has been continually improved, following the evolution of Nuxeo Platform’s workflow capabilities. This included the use of the Tab Designer in 2011, Content Routing at the end of 2011, and the newer Content Routing features in 2013 (like escalation).
The workflow is quite simple:
The user launches the request:
Then the user fills the vacation request: number of days, dates and comment:
Then the request is submitted to the manager of the employee. Finally it goes to the HR Manager, who logs it into our internal ERP for the wages edition. It is possible to go back and forth at every step.
Users are notified via email, with details of the request included in the email. Some callbacks are sent when the manager processes the request late. It is also possible for the user to ask for a modification of an already validated request, as well as a cancellation.
A dashboard enables a user to see specific time-off-request process tasks, and to browse past requests. A specific ACL policy is applied so that a normal user always sees his/her own requests, whereas a manager can view the requests of his/her team, and the HR manager views all requests. Color codes are used at every step to show if the request has been accepted, is in the validation process, or was refused. The HR manager can filter by dates and user, and can do an Excel export of all the data, so as to be able to do some yearly aggregation, or other computation.
After 2-3 years of being used, we can say the application did reach its goals of improving the trace-ability of vacation requests, and definitely saved Ornella’s time, while not consuming too much of mine. Of course we followed all of the Nuxeo Platform releases and improved the plugin each time.
One improvement we would like to add in the future is to post in our internally shared Google time-off calendar the periods where an employee is absent. This should not be too hard to add, although it will require a bit of Java (there is currently no Java in the plugin, it is all done via Studio). Ornella recently asked for more workflows - with Nuxeo hiring many consultants and developers, streamlining this process is getting critical!
The project is shared as an application template in Studio (I just re-shared it as it was a very old version that was shared up until now). Since the implementation started even before content routing existed, the implementation state is limpid as if I was starting this project just now. There is a Time Off Request document object. I use the workflow to fetch the data from the user, and then persist it on the document in the output chains of the nodes of the workflow. I use the operation StartWorkflow to start the workflow immediately after creation of the time off request, without requiring the user launch it manually.
The Modification/Cancellation request is another workflow that can be started on the Time Off Request document type. I use the setACL operation with a specific “HR” ACL (Nuxeo Platform handles named ACLs) that I set after each node for controlling whether the time off request can be modified, and by who. For letting the system know who is the boss of who, I use a vocabulary. Ornella fills the correspondence table between username of the employee (in the id field of the vocabulary) and username of their manager (field “label” of the vocabulary). Then, in the workflow, on the node where a task is assigned to the manager, I “compute” the manager username in the input automation chain, using the following MVEL instruction:
user:@{Fn.getVocabularyLabel(“EmployeeManagerMapping”,Document[‘dc:creator’])}
For the dashboard, I use some content views.
To better understand how to work with workflows in the Nuxeo Platform, you can read the documentation and do this simple tutorial.