Nuxeo Server

Automation Chain Exception

Updated: September 22, 2017 Page Information Edit on GitHub

Content Automation provides means to debug and handle exception during the Automation operations and chains calls.

Automation exception chain can be added to be executed when an error occurs during an Automation execution.

After contributing your custom chains, you can declare your exception chains:

<extension point="chainException"
             target="org.nuxeo.ecm.core.operation.OperationServiceComponent">

    <catchChain id="catchChainA" onChainId="contributedchain">
      <run chainId="chainExceptionA" priority="0" rollBack="true" filterId="filterA"/>
      <run chainId="chainExceptionA" priority="0" rollBack="false" filterId="filterA"/>
      <run chainId="chainExceptionB" priority="10" rollBack="true" filterId="filterB"/>
    </catchChain>

    <catchChain id="catchChainB" onChainId="anothercontributedchain">
      <run chainId="chainExceptionA" rollBack="false"/>
    </catchChain>

</extension>
  • This contribution declares a set of execution chains to be executed after 'contributedchain' failure.
  • Here 'chainExceptionA' and 'chainExceptionB' are different candidates.
  • Filters can be added (see next chapter).
  • Rollback is set to defined if we should rollback transaction after 'contributedchain' failure.
  • Priority can be defined to know which chain is going to take the hand on a candidates range. Higher priority wins.

Here is the contribution to deploy filters that can be added to decide which chain is going to be executed:

<extension point="automationFilter"
             target="org.nuxeo.ecm.core.operation.OperationServiceComponent">

    <filter id="filterA">expr:@{Document['dc:title']=='Source'}</filter>

    <filter id="filterB">expr:@{Document['dc:title']=='Document'}</filter>

</extension>

These filters are strictly written in MVEL template or expression starting by 'expr:'.

Exception is cached into the operation context and can be used into filters:

<extension point="automationFilter"
             target="org.nuxeo.ecm.core.operation.OperationServiceComponent">

    <filter id="filterA">expr:@{Context['Exception']=='NullPointerException'}</filter>

</extension>

If two candidate chains have the same priority and both have their filter evaluated to true, the last one contributed is executed.

2 days ago Solen Guitter Don't show excerpt 'upgrade-9.2-drop-change-token' and add comment
2 years ago Solen Guitter 20
3 years ago Solen Guitter 19 | Format
3 years ago Vladimir Pasquier 18
3 years ago Vincent Dutat 17
3 years ago Solen Guitter 16
4 years ago Alain Escaffre 15
4 years ago Vladimir Pasquier 14
4 years ago Solen Guitter 13
4 years ago Solen Guitter 12 | Use nuxeo.conf reference page content, formatting
4 years ago Solen Guitter 11 | Formatting
4 years ago Vladimir Pasquier 10
4 years ago Vincent Dutat 9
4 years ago Vincent Dutat 8
4 years ago Florent Guillaume 7
4 years ago Vladimir Pasquier 6
4 years ago Vladimir Pasquier 5
4 years ago Vladimir Pasquier 4
4 years ago Vladimir Pasquier 2
4 years ago Vladimir Pasquier 3
4 years ago Vladimir Pasquier 1
History: Created by Vladimir Pasquier