Automation

Automation Exception

Updated: October 16, 2020
  • 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.