Random exception in a workflow after a move document (fail to fetch doc)


We got an unpredictable error on a workflow, after a moveDocument operation. The next operation is FetchDocument and sometimes we got the error “Caught error: org.nuxeo.ecm.core.api.ClientException: Failed to get document” … (new path of the document). But the document exists at the indicated path. If you got back on the document and retry the operation, it can fail again or succeed. Recently, two users ask us to do something about this blocking exception and the only thing I found, is to do it again and again until it works. Looking for this error in log, show me that this problem had happen times to times (but no one complain) but since June, it happens much more frequently (I don't think this can be correlated with an increase of activity, but I can still be wrong)

We got a nuxeo-5.8.0-HF31-1.0.0 with nuxeo DM.

More details on our workflow and automation chains :

We got two main “critic” steps when we perform a move document. The first, is to deals with the read authorisation of the workflow document and the second is to rename the document with some workflow data (users can found more easely documents).

When our workflow start, the support document is created on a temporary “workspace”. The first task of the creator of this document is to indicate in which workspace this document had to be (the choose is made with a widget “single directory suggestion” to limit answer with user's authorised workspaces). When the “next” transition is call, and if the workflowVariable for the workspace is filled, an automation chain is launch with the following operations : …

  • set some Context Variables (document Id, Name…, workspace choose by user, and document path where we want put the document i.e. here directoryEnd)
  • Fetch > Document (value : @{Context[“doc”]})
  • Document > Move (target : @{directoryEnd} ; name : @{docName})
  • Fetch > Document (value : @{directoryEnd}/@{docName}) <- the one's which sometimes fails

If it's OK, the user can fill the some other variables of the workfow. Two of them are also used to rename the document at this second step. This other DocumentMove/Fetch operations can also fails sometimes.

Is it something bad in our automation chain ? A colleague suggest that the fetchDocument operation can be performed before the ending of the Move operation. Is it a possible explanation ?

What to do to correct it ? Thank for your help

0 votes

0 answers



I forget to tell that before trying to go to the next step in workflow, I refresh a test platform with data of the prod (postgreSQL db) and I didn't reproduice the problem : it was working very well (no user on that platform, "clean" db). Cache problem, better perfs on queries ?

It happens again. A user complain about be bloqued in its workflow progression. He tried 5 times (if I believe the logs) before complain us. I had to retry 10, before succeed to go to the next step. This is really annoying. No one have a solution for this ? I can send more error log if it can help.

Maybe try the "Document.SaveSession" after the move operation?

Thank for your suggestion.

My collegue had suppress the fetch operation after the move (just let the User Interface -> NavigateTo after the move operation). This modification had been in production since several weeks now and it seems in was the good solution as we have no more the fetch error [ or users stop to use the workflow :-) ]