Skip to end of metadata
Go to start of metadata

Automation

Nuxeo Studio enables you to create your own business logic and workflows. Most of the time, business rules, workflows, new buttons etc, are configured using automation chains. An automation chain is an ordered set of operations through which a document or a list of documents goes. Those "operations" are unitary operators that implement a particular documentary function, such as "move a document", "update a property", "change the lifecycle state", "transform to PDF", "send as email"...

Automation chain configuration is done using an operation catalog from which you just need to drag and drop operation in an ordered chain, and fill in the operation’s parameters. Automation chains are then used by the user actions you create (such as “buttons” that you can place at different locations of the user interface as explained below) or by event listeners.

User actions

In Nuxeo applications, many links are provided to navigate between various features. For instance, when you are on a document, you have various "tabs", and you also have icons on the top-right part of the screen (such as print, export, send via email...). You also have buttons on which you can click after having selected various files in a folder. Another group of links is the one just below the worklist. All these links are called "User Actions" in Nuxeo terminology.

You can declare a new action in Studio and bind it to a content automation chain so that it is executed each time you click on the button. You can add some filtering information when you declare your action, in order to make it display only for specific types of documents, and specific user profiles.

Actions are grouped by categories. The screenshots below highlight the default categories locations available in Nuxeo DM. If you have created new content views, you can also display your new actions in these new content presentations.

Contextual tools

Document List toolbar

Folder toolbar

Worklist

Clipboard

Header links

Document creation form

Document edition form

Document Summary Actions

User menu actions

Event Handlers

Sometimes, you want your business logic to be executed without requiring users to click on a button or link: you want an action to be triggered automatically when an event occurs. That’s what event listeners (also called event handlers) are for. A listener is a piece of Java code that runs some code when a given event occurs.

Some built-in events are: Document created, Document imported, Document modified, Document security updated, Document locked, Document unlocked, Children order changed...
A sample listener is the "Dublin Core" Event Listener. It is enabled in our out-of-the-box products such as DM and DAM to systematically update the contributors and last updated fields (dates) every time a "Document modified" event is fired, so that we always know who participated to the modification of a document and when the last modification occurred.

Nuxeo Studio enables you to easily declare new event listeners. You need to bind them on one side to events of your choice, and on the other side to content automation chains that you have edited in your project so that the selected content automation chain is executed each time one of the selected events happens.

Next step: Plugins and extensions with Nuxeo EP
Previous step: About layouts and content views

Related howtos
Page: Use Content Automation
Page: Implement user actions on edition screen of documents
Page: Fetch documents with a query on date parameters
Page: Create and Use Document Templates
Page: Automatic PDF conversion
Page: Make a task assignment to one or many users