How does Seam.PushDocument work?
I have a working chain which utilize Document.Create
. After this operation the user interface should display this new document. I read the documentation and think that Seam.PushDocument
is the correct operation. I used the following code:
<operation id="Seam.PushDocument">
<param type="string" name="name">expr:@{Document["dc:name"]}</param>
<param type="string" name="scope">session, conversation, page, event</param>
</operation>
The error message is Unknown chain
and the server log is empty. So it looks like a general wrong usage.
Short story, this does not work. Any comments, please?
If you just want to navigate to your new created Document you should use the Seam.NavigateTo operation.
The Seam.PushDocument operation push just your Document in the Seam Context.
Seam.PushDocument
with Seam.NavigateTo
then it still does not work. If I just create the document then the chain works without any problems. If I add the operation then Nuxeo reports Unknown chain: chain name
.
This is the actual config:
<operation id="Document.Create">
<param type="string" name="type">SpecialDocument</param>
<param type="string" name="properties">dc:title=blabla</param>
</operation>
<operation id="Seam.AddErrorMessage">
<param type="string" name="message">Loading failed.</param>
</operation>
<operation id="Seam.NavigateTo">
</operation>
Do I have to initialize something or do I need a special version?
I did this:
<extension target="org.nuxeo.ecm.core.operation.OperationServiceComponent" point="chains">
<chain id="MyChain">
<operation id="Context.FetchDocument"/>
<operation id="Document.Create">
<param type="string" name="type">Folder</param>
<param type="string" name="name">test</param>
<param type="properties" name="properties">dc:title=Maman</param>
</operation>
<operation id="Seam.AddInfoMessage">
<param type="string" name="message">Hello les amis</param>
</operation>
<operation id="Seam.NavigateTo"/>
</chain>
</extension>
And it works. I'm checking with error message
Thanks a lot for the example and the testing.