Accessing Identity Model Attributes
Any identity model attributes can be displayed on a form or set based on data entered in a form field by supplying the model attribute name as the field name.
Access any single-valued attribute at the top level by specifying its name in the field's name attribute:
<Field displayName="first_name" name="firstname" type="string"/>
To display the contents of a multi-valued extended identity attribute, use the following syntax. Multi-value extended identity attributes are shown in the identityModel as a list of string values.
<Field displayName="Cost Centers" multi="true" name="costcenter" type="string"/>
Access any nested attribute, for example, those with a map within the map, using dot notation:
<Field displayName="Manager ID" name="info.manager.id" type="string"/>
Note: Values in the info map should not be altered through the form, as they will not be updated in the model; they are treated as read-only data that provides supplementary data for the corresponding top-level attribute, and they are automatically refreshed based on updates to that top-level attribute.
Display the contents of an object list in the map, such as assignedRoles, detectedRoles, or workgroups, on a form by creating it as a combo box. Do this by specifying the type as the correct object type and specifying multi="true"
:
<Field displayName="Detected Roles" filterString="type=='it'" multi="true" name="detectedRoles" type="iiq.object.Bundle"/>
<Field displayName="WorkGroups" filterString="workgroup == true" multi="true" name="workgroups" type="Identity"/>
The application of a filterString to the workgroups list ensures that only workgroup identities display.
The links list contains a map for each link (account) held by the identity. Access attributes inside that list by referencing the name of the desired link and using dot notation to traverse the map:
<Field displayName="App Owner" name="links['HR_Employees'].sys.nativeIdentity" type="string"/>
In development and debugging, it can be helpful to examine the identityModel in XML or as a string representation to clearly see its structure. The identityModel is visible in the workflowCase for any workflow where it is used and is printed to stdout if the trace variable is set to true for the workflow. It can be printed as a string from a workflow step with a System.out.println(identityModel.toString());
statement.