Error after operation Document.Move

Hi, I think my problem is that I don't understand Document.Move operation result or don't know to use it. Here is my “simple” automation chain :

- Context.FetchDocument
- Document.Move:
    target: "@{Document.parent.path}/archives"
- Context.FetchDocument

I get a NoSuchDocumentException after automation chain execution. What is wrong ? Is it because Document.Move does not return the moved document ? And how to avoid this behaviour ? I can't find a simple way.

It is the same described here with the difference it is systematic.

Thanks in advance

0 votes

3 answers

2265 views

ANSWER



Thank you manuek ! The solution was :

- Context.FetchDocument
- Document.Move:
    target: "@{Document.parent.path}/archives"
- Document.Fetch:
    value: "@{Document.path}"
- Seam.NavigateTo: {}
0 votes



Hi,

It seems that the last document.fetch is unuseful. My colleague suppress it and since some weeks we do we not have anymore the random error on the fetch after the move operation. You can try if you start to experiment problems.

12/14/2015


Studio doesn't let me do that :

Validation error: : JS-YAML: bad indentation of a mapping entry at line 3, column 13:
        target: @{Document.parent.path}/archives
0 votes



I don't understand, I've just been adding a Document.Move operation with @{Document.parent.path}/archives as a value for the target parameter and Studio was OK with that. Goog luck.
08/26/2015

yes, in the "visual" automation chain editor there is no quote, if you switch to the script editor (from which I copied to my message above) there are some quotes.
08/26/2015

Oh sorry, though what document do you want to fetch in your last instruction ?
08/27/2015

The moved document. The error desn't happen during Fetch operation but on the user view refresh but I can't find a solution to avoid that. Here is the exception stack trace : [http://pastebin.com/Hzkup2kS](The same. The error desn't happen during Fetch operation but on the user view refresh but I can't find a solution to avoid that. Here is the exception stack trace : http://pastebin.com/Hzkup2kS)
08/28/2015

Maybe you are trying to fetch a document that has been moved. The move operation returns the moved document as an input for the next operation in your chain so I guess this fetch thing is unnecessary.
08/28/2015

With or without Fetch I get the error. I tried "Seam.NavigateTo" without success. I don't know what to do.
08/28/2015

Hi, after the fetch > Document with the new path of it (in your case : @{Document.parent.path}/archives), we have a User Interface > Navigate to document. In our case, it works "most of the times" ! If it can help…
08/28/2015

I tried that. I get exception ```org.nuxeo.ecm.automation.InvalidChainException: Cannot find any valid path in operation chain - no method found for operation 'Seam.NavigateTo' and for first input type 'org.nuxeo.ecm.core.api.impl.DocumentModelListImpl'

at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain(CompiledChainImpl.java:160)
at org.nuxeo.ecm.automation.core.impl.ChainTypeImpl.newInstance(ChainTypeImpl.java:126)
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:195)
... 121 more```
08/29/2015


Hi, can you try without those quotes in your target parameter ?

0 votes