To add a multiselection list of groups that is populated dynamically from the resource
Add groups to the right side of the schema map. The values displayed in the right side of a text area that displays a multiselection list are populated from the current value of the associated view attribute, which you identify through the field name.
Add the following text to any form, changing only the Field name, prompt, availabletitle, selectedtitle, and the name of the resource as needed.
In the following example, the: (colon) that precedes display.session indicates that you can ignore the base context of the form and reference objects from the root of the workflow context.
In the following example, the : (colon) that precedes display.session indicates that you can ignore the base context of the form and reference objects from the root of the workflow context.
<Field name=’global.AD Groups’> <Display class=’MultiSelect’ action=’true’> <Property name=’title’ value=’AD Group Membership’/> <Property name=’availableTitle’ value=’Available AD Groups’/> <Property name=’selectedTitle’ value=’Selected AD Groups’/> <Property name=’allowedValues’> <invoke class=’com.waveset.ui.FormUtil’ name=’listResourceObjects’> <!-- send session information which will be used by the method to validate authorization user --> <ref>:display.session</ref> <!-- resource object type– This will differ from resource to resource, but common types are account, group, and “distribution list” --> <s>Group</s> <!—- Name of resource being called --> <s>AD Resource Name</s> <!-- options map– Some resources have options like the context that the group is listed in.For example, active directory has multiple containers. By default, the container used will be the one specified on the resource.The value can be overridden by specifying it here. If the resource does not support options,the value should be <null/> --> <Map> <MapEntry key=’context’ value=’ou=Austin,ou=Texas,dc=Sun,dc=com’/> </Map> <!-- cacheList– specify true or false whether you would like this list to appear in the Resource Object List Cache--> <s>true</s> </invoke> </Property> </Display> </Field>
If the resource does not support options, the value of options map should be null. Some resources have options such as the context that the group is listed in. For example, Active Directory has multiple containers. By default, the container used will be the one specified on the resource. This value can be overridden by specifying it here.
Specify the value of cacheList as true or false to designate whether this list should be stored in the Resource Object List Cache. This will cause the method to be run once, and the results are stored on the server.