<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Workflow output automation and pop/push in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/workflow-output-automation-and-pop-push/m-p/321330#M8331</link>
    <description>&lt;P&gt;Sorry, answer is in the bottom of the documentation ! :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Getting the first document of the
document list in the automation chains
ran from a workflow node Icon As we
mentioned above, the workflow engine
injects a document list in the
automation chain, even when there is
only one document. You may have
sometime a "Cannot find any valid path
in operation chain" exception, because
the operation you put in the chain
expects one document in input and the
previous operation gives a list. You
can avoid this situation, when you
know you have only one document, by
fetching this document first. To do
so, you can use:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;Execution Context &amp;gt; Restore input document from a script
script: This[0]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Then, for the rest of the chain, you
will have only one document in input
transiting from one operation to the
other.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 07 Jul 2014 10:10:02 GMT</pubDate>
    <dc:creator>Anthony_H</dc:creator>
    <dc:date>2014-07-07T10:10:02Z</dc:date>
    <item>
      <title>Workflow output automation and pop/push</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/workflow-output-automation-and-pop-push/m-p/321329#M8330</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;i'm working on an automation chain to execute at output of a workflow task node.
As soon as I add a "pop/push document" operation in the chain, an exception is thrown when the workflow execute it. To be more precise, the exception is thrown by the operation next to the pop/push, which always fail with a message similar to :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caught error: Cannot find any valid path in operation chain - no method found for operation 'XXXXXX' and for first input type 'org.nuxeo.ecm.core.api.impl.DocumentModelListImpl'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;XXXXX is any operation waiting for a document input, next to the pop or the push.&lt;/P&gt;
&lt;P&gt;I tried to call the operation chain outside of the workflow, using a context button on document, and it works well.&lt;/P&gt;
&lt;P&gt;Any idea ? is there something "different" to do to get the context document on a workflow operation chain ?&lt;/P&gt;
&lt;P&gt;I'm using nuxeo 5.8 HF15.&lt;/P&gt;
&lt;P&gt;Anthony.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 12:30:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/workflow-output-automation-and-pop-push/m-p/321329#M8330</guid>
      <dc:creator>Anthony_H</dc:creator>
      <dc:date>2014-06-24T12:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow output automation and pop/push</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/workflow-output-automation-and-pop-push/m-p/321330#M8331</link>
      <description>&lt;P&gt;Sorry, answer is in the bottom of the documentation ! :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Getting the first document of the
document list in the automation chains
ran from a workflow node Icon As we
mentioned above, the workflow engine
injects a document list in the
automation chain, even when there is
only one document. You may have
sometime a "Cannot find any valid path
in operation chain" exception, because
the operation you put in the chain
expects one document in input and the
previous operation gives a list. You
can avoid this situation, when you
know you have only one document, by
fetching this document first. To do
so, you can use:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;Execution Context &amp;gt; Restore input document from a script
script: This[0]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Then, for the rest of the chain, you
will have only one document in input
transiting from one operation to the
other.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 07 Jul 2014 10:10:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/workflow-output-automation-and-pop-push/m-p/321330#M8331</guid>
      <dc:creator>Anthony_H</dc:creator>
      <dc:date>2014-07-07T10:10:02Z</dc:date>
    </item>
  </channel>
</rss>

