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?

0 votes

2 answers

908 views

ANSWER



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.

0 votes



If I replace 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:

&lt;operation id=&quot;Document.Create&quot;&gt;
    &lt;param type=&quot;string&quot; name=&quot;type&quot;&gt;SpecialDocument&lt;/param&gt;
    &lt;param type=&quot;string&quot; name=&quot;properties&quot;&gt;dc:title=blabla&lt;/param&gt;
&lt;/operation&gt;
&lt;operation id=&quot;Seam.AddErrorMessage&quot;&gt;
    &lt;param type=&quot;string&quot; name=&quot;message&quot;&gt;Loading failed.&lt;/param&gt;
&lt;/operation&gt;
&lt;operation id=&quot;Seam.NavigateTo&quot;&gt;
&lt;/operation&gt;

Do I have to initialize something or do I need a special version?

05/03/2012

do you have some other trace than unknown chain (during the deployment or during the action execution) ?
05/04/2012


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

0 votes



Same, it works. Maybe a problem of 5.5, I try on 5.5 version (I was on 5.6-SNAPSHOT)
05/04/2012

It works now for me too. It looks like another mistake. I'm sorry for the confusion but sometimes I get only an error message that the chain is unknown. This means that I make a mistake but I don't get an error message :(

Thanks a lot for the example and the testing.

05/13/2012