07-23-2020 07:31 AM
Hi,
I am using a nuxeo-document-suggestion-widget (in a creation form layout) which is calling an automation chain with just one custom operation :
<chain id="SearchHWPDocuments">
<operation id="SearchDocuments">
<param type="string" name="searchTerm">expr:ChainParameters["searchTerm"]</param>
<param type="string" name="doctype">hwp_document</param>
<param type="string" name="parentId"></param>
</operation>
</chain>
I would like to pass the id of the parent of the document being created to the "parentId" param.
I wanted to try something like that :
<chain id="SearchHWPDocuments">
<operation id="Context.FetchDocument"/>
<operation id="Document.GetParent"/>
<operation id="SearchDocuments">
<param type="string" name="searchTerm">expr:ChainParameters["searchTerm"]</param>
<param type="string" name="doctype">hwp_document</param>
<param type="string" name="parentId">expr:Document.id</param>
</operation>
</chain>
The problem is that the input of the chain is void, so the Context.FetchDocument operation is not working and I got this error :
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'
Does someone know how I could do this ?
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.