how to set property list in automation chain?
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
Have you tried with “stringlist” type?
<param type="stringlist" name="value">expr:Fn.concatenateValuesAsNewList(Context["workflowInitiator"])</param>
If it doesn't, I'm sorry I can't help. Hopefully someone with more experience with chains and MVEL will.
Good luck!