Stringlist parameter pass to Context.StartWorkflow
How should the stringlist parameter be passed to Context.StartWorkflow in the proper way? I have tried:
participants=@{Context["participants"]}
participants=@{java.util.Arrays.asList(Context["participants"])}
Hello,
If you want to put a list like for instance a NodeVariables[“assignees”], You can do this:
Set Context Variable name: participants value: @{new java.util.ArrayList()}
Run Script script: java.util.Collections.addAll(Context[“participants”], java.util.Arrays.asList(NodeVariables[“assignees”]));
Using Collections.addAll method.
Hope it helps
Can't you use a context variable to assign to your parameter?
<operation id="Document.GetUsersAndGroups">
<param type="string" name="permission">MailingListPermission</param>
<param type="string" name="variable name">varMailingList</param>
<param type="boolean" name="ignore groups">false</param>
<param type="boolean" name="prefix identifiers">true</param>
<param type="boolean" name="resolve groups">false</param>
</operation>
<operation id="Context.StartWorkflow">
<param type="string" name="id">xxxWorkflowReview</param>
<param type="boolean" name="start">true</param>
<param type="properties" name="variables">expr:mailinglist=@{Context["varMailingList"]}
</param>
</operation>
Lists as "varMailingList" can be many.
The param "properties" of Context.StartWorkflow is Properties type.
org.nuxeo.ecm.automation.core.util.Properties is extending HashMap<String,String> and not a list.
For instance: <param type="properties" name="properties">dc:title=MyDoc</param>
Hope it helps.