<?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 Get changeable document data from automation context in web ui in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/get-changeable-document-data-from-automation-context-in-web-ui/m-p/315156#M2157</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using a &lt;A href="https://www.webcomponents.org/element/nuxeo/nuxeo-ui-elements/elements/nuxeo-document-suggestion"&gt;nuxeo-document-suggestion-widget&lt;/A&gt; (in  a creation form layout) which is calling an automation chain with just one custom operation :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chain id="SearchHWPDocuments"&amp;gt;
	&amp;lt;operation id="SearchDocuments"&amp;gt;
		&amp;lt;param type="string" name="searchTerm"&amp;gt;expr:ChainParameters["searchTerm"]&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="doctype"&amp;gt;hwp_document&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="parentId"&amp;gt;&amp;lt;/param&amp;gt;
	&amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would like to pass the id of the parent of the document being created to the "parentId" param.&lt;/P&gt;
&lt;P&gt;I wanted to try something like that :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chain id="SearchHWPDocuments"&amp;gt;
	&amp;lt;operation id="Context.FetchDocument"/&amp;gt;
	&amp;lt;operation id="Document.GetParent"/&amp;gt;
	&amp;lt;operation id="SearchDocuments"&amp;gt;
		&amp;lt;param type="string" name="searchTerm"&amp;gt;expr:ChainParameters["searchTerm"]&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="doctype"&amp;gt;hwp_document&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="parentId"&amp;gt;expr:Document.id&amp;lt;/param&amp;gt;
	&amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that the input of the chain is void, so the Context.FetchDocument operation is not working and I got this error :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;org.nuxeo.ecm.automation.InvalidChainException: Cannot find any valid path in operation chain - no method found for operation 'Context.FetchDocument' and for first input type 'void'&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does someone know how I could do this ?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 14:31:23 GMT</pubDate>
    <dc:creator>Corentin_Bourdo</dc:creator>
    <dc:date>2020-07-23T14:31:23Z</dc:date>
    <item>
      <title>Get changeable document data from automation context in web ui</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/get-changeable-document-data-from-automation-context-in-web-ui/m-p/315156#M2157</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using a &lt;A href="https://www.webcomponents.org/element/nuxeo/nuxeo-ui-elements/elements/nuxeo-document-suggestion"&gt;nuxeo-document-suggestion-widget&lt;/A&gt; (in  a creation form layout) which is calling an automation chain with just one custom operation :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chain id="SearchHWPDocuments"&amp;gt;
	&amp;lt;operation id="SearchDocuments"&amp;gt;
		&amp;lt;param type="string" name="searchTerm"&amp;gt;expr:ChainParameters["searchTerm"]&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="doctype"&amp;gt;hwp_document&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="parentId"&amp;gt;&amp;lt;/param&amp;gt;
	&amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would like to pass the id of the parent of the document being created to the "parentId" param.&lt;/P&gt;
&lt;P&gt;I wanted to try something like that :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chain id="SearchHWPDocuments"&amp;gt;
	&amp;lt;operation id="Context.FetchDocument"/&amp;gt;
	&amp;lt;operation id="Document.GetParent"/&amp;gt;
	&amp;lt;operation id="SearchDocuments"&amp;gt;
		&amp;lt;param type="string" name="searchTerm"&amp;gt;expr:ChainParameters["searchTerm"]&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="doctype"&amp;gt;hwp_document&amp;lt;/param&amp;gt;
		&amp;lt;param type="string" name="parentId"&amp;gt;expr:Document.id&amp;lt;/param&amp;gt;
	&amp;lt;/operation&amp;gt;
&amp;lt;/chain&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that the input of the chain is void, so the Context.FetchDocument operation is not working and I got this error :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;org.nuxeo.ecm.automation.InvalidChainException: Cannot find any valid path in operation chain - no method found for operation 'Context.FetchDocument' and for first input type 'void'&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does someone know how I could do this ?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:31:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/get-changeable-document-data-from-automation-context-in-web-ui/m-p/315156#M2157</guid>
      <dc:creator>Corentin_Bourdo</dc:creator>
      <dc:date>2020-07-23T14:31:23Z</dc:date>
    </item>
  </channel>
</rss>

