Server

HOWTO: Create an Automation Chain

Updated: December 4, 2024

This guide explains how to create and configure an automation chain using Nuxeo Studio.

This is done in two steps:

  1. Create the chain.
  2. Bind it to a button, an action, or an event handler.

Create an Automation Chain

To create an automation chain:

  1. In the left menu, click on Automation and then on Automation Chains.
  2. Click on the New button.
  3. Give your automation chain an ID and click on the Next button.
    The automation chain editor is displayed. The Fetch > Context Document(s) is automatically added as the first operation of the chain.
  4. If needed, remove the Fetch > Context Document(s) and replace it with another Fetch operation. The Fetch operation feeds the chain with some document input, whether it is one document or a list of documents. There are various ways to fetch:
    • Context document will bring either the UI Current document, or the document attached to the event (depending on what you bound your operation chain, see later).
    • Fetch Query will bring back the result of the query as a document list.
    • Get Document fetches a document by its path.
  5. Start to drag and drop operations in the flow, respecting their input and output types. Leverage context and scripting capabilities to capture and reuse information all along the flow.

    Click on the Switch editor button to write your chain in YAML or paste a chain copied from a how-to for instance.

  6. Save your chain. You now need to bind your automation chain by creating a new action or a new event handler.

Automation Chain Binding

Binding the automation chain to a button, an action or an event handler is done in the User action and event handler edition forms.

Binding to an Action

To bind the chain to a button/action:

  1. Create a new user action from the Studio tree:
    1. In the Automation menu entry, click on User Actions.
    2. Click on the New button.
    3. On the pop up window displayed, give the action an ID, a name and select to which category of actions it should be tied (contextual icons, folder bar buttons, clipboard actions, user links...) then click on Next.
      The action edition form is displayed.
  2. Fill in all the required information : Label, icon, ...
  3. In the Action Activation section, give the necessary filtering information, to target your action to the right context.
  4. In the Action Execution section, select the automation chain to which you want the action to be bound.
  5. Click on the Save button.

Binding to an Event Handler

To bind the chain to an event handler:

  1. Create a new event handler from the Studio tree:
    1. In the Automation menu entry, click on Event Handlers.
    2. Click on the New button.
    3. On the pop up window displayed,, give the event handler an ID and click Next.
  2. Choose to which events the event handler should be bound (documentCreated, documentUpdated...) and indicate whether the chain should be run synchronously or asynchronously.
  3. In the Event handler Activation section, fill in the filtering information, to target your event handler to the right context.
  4. Choose the automation chain to which you want the event handler to be bound.
  5. Click on the Save button.