cancel
Showing results for 
Search instead for 
Did you mean: 

Get changeable document data from automation context in web ui

Corentin_Bourdo
Champ on-the-rise
Champ on-the-rise

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 ?

0 REPLIES 0
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

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.