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
Thank you manuek ! The solution was :
- Context.FetchDocument
- Document.Move:
target: "@{Document.parent.path}/archives"
- Document.Fetch:
value: "@{Document.path}"
- Seam.NavigateTo: {}
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.
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
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```