cancel
Showing results for 
Search instead for 
Did you mean: 

how to set property list in automation chain?

Gabino_Reyes
Champ in-the-making
Champ in-the-making

Hello,

I have the simple property

<xs:element name="para">    
<xs:simpleType>    
<xs:list>        
<xs:simpleType>            
<xs:restriction base="xs:string" ref:resolver="userManagerResolver" ref:type="user"/>        </xs:simpleType>    
</xs:list>    
</xs:simpleType>
</xs:element>

Then in the automation chain:

<chain id="setPara">    
<operation id="Document.SetProperty">        
<param type="string" name="xpath">doc_base:para</param>        
<param type="boolean" name="save">true</param>        
<param type="serializable" name="value">expr:Context["workflowInitiator"]</param>    
</operation>
</chain>

When I execute the chain, output the next error:

Name: setPara Exception: OperationException Caught error: Only scalar types can be set using update operation Caused by: org.nuxeo.ecm.automation.OperationException: Only scalar types can be set using update operation

The value for workflowInitiator is: | Key: state, Value: ready | Key: workflowInitiator, Value: pedro |

Any suggestion for set the property?

Regards! Gabo

3 REPLIES 3

ioihanguren_
Star Contributor
Star Contributor

Have you tried with "stringlist" type?

Hello ioihanguren,

I don't know if it is the best way to do it, but I think the problem is that you are setting just one username and you need a list. Probably there is a better / easier way to do that with MVEL, but I think that this should work

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.