Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30933

Trash/SetProperties actions should be resilient to sync listener failure

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF59, 2021.19
    • Component/s: Bulk

      Description

      If a custom listener is failing the computation should handle this as an expected error and not terminate.

      Exemple

      bulk/trash: Terminate computation due to previous failure
      
      Action: bulk/trash fails on record: bulk-trash-00:+3872 after retries.
      
      org.nuxeo.ecm.core.api.DocumentSecurityException: Failed to invoke operation Document.SetProperty, Privilege 'WriteProperties' is not granted to 'foo@bar.com'
      	at org.nuxeo.ecm.core.api.AbstractSession.checkPermission(AbstractSession.java:240) ~[nuxeo-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1605) ~[nuxeo-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.operations.document.SetDocumentProperty.run(SetDocumentProperty.java:71) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor238.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:175) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:180) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:147) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:154) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.lambda$invoke$0(OperationChainCompiler.java:212) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:314) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:279) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.invoke(OperationChainCompiler.java:209) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:115) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:91) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.events.EventHandlerRegistry.handleEvent(EventHandlerRegistry.java:130) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.automation.core.events.OperationEventListener.handleEvent(OperationEventListener.java:40) ~[nuxeo-automation-core-2021.15.12.jar:?]
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:279) ~[nuxeo-core-event-2021.15.12.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.TrashAction$TrashComputation.lambda$fireEvent$0(TrashAction.java:161) ~[nuxeo-core-bulk-2021.15.12.jar:?]
      	at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
      	at org.nuxeo.ecm.core.bulk.action.TrashAction$TrashComputation.fireEvent(TrashAction.java:154) ~[nuxeo-core-bulk-2021.15.12.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.TrashAction$TrashComputation.setSystemProperty(TrashAction.java:143) ~[nuxeo-core-bulk-2021.15.12.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.TrashAction$TrashComputation.compute(TrashAction.java:98) ~[nuxeo-core-bulk-2021.15.12.jar:?]
      
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: