Creating a user attribute definition

You can associate unique capabilities or qualities with one or more users by creating user attribute definitions.

About this task

This procedure triggers dynamic group creation, which can be time consuming. You can configure IBM® Business Automation Workflow to deactivate these triggers.

In Process Designer, you can create a user attribute definition as a data type. For example, if you want to store an attribute that pertains to all users, you could use the following attribute:
Name: skill, type: integer

The values for an attribute are maintained using one of the following methods:

  • The Process Admin Console (by selecting User management > Bulk User Attribute Assignment)
  • REST APIs (a bulk version of /rest/bpm/wle/v1/user/a?action=setPreference&key=...&value=...)
  • JS APIs

Some customers and business partners have built tools to synchronize user attributes from various outside sources into the Business Automation Workflow database for use in different contexts. In many instances, only the predefined attributes are used – especially email address. However, organizations could also replicate elements from an external registry into the database.

For example, custom portal implementations could use this approach for personalization by storing user preferences like startPage or preferredLanguage in user attributes.

When a user creates a new user attribute definition in a process application, the new attribute may need to be added to one or both of the following whitelists that describe authorization on a per-user-attribute level depending on the authorization requirement using a REST API for the specific attribute. These whitelists are included in the 00Static.xml file and can be overwritten by users in the 100Custom.xml file.
  • server/user-attributes/rest-authorization/public-attribute
  • server/user-attributes/rest-authorization/self-manageable-attribute
When accessed using a REST API, users that are not assigned privileges in the ACTION_MANAGE_ANY_USERATTRIBUTE action policy:
  • Can only see attributes of themselves and other users listed as public-attribute
  • Can only see and update own attributes listed as self-manageable-attribute
The following example shows how to add a new attribute to the list of self-manageable attributes in the 100Custom.xml file:
<server>
<user-attributes merge="mergeChildren">
<rest-authorization merge="mergeChildren">
<self-manageable-attribute merge="append">CustomAttribute</self-manageable-attribute>
</rest-authorization>
</user-attributes>
</server>
Important: You must exercise caution when deleting user attributes in an application because there is no check for whether other applications reference it. User attributes have system-wide (global) scope. They are defined in an application, but the value for a user can be accessed or set by other applications. It is not specific to the application where it is defined. This means that if a snapshot that contains a user attribute is deleted, the user attribute is also deleted. When the last snapshot of the application is deleted, the attribute is deleted from the system.

To create a user attribute definition:

Procedure

  1. Open Process Designer.
  2. Open a process application in the Designer view.
  3. Click the plus (+) sign next to Data and select User Attribute Definition from the list of components.
  4. In the New User Attribute Definition window, provide a unique name for the attribute, and click Finish.
  5. Supply the following requested information about the user attribute definition:
    Table 1. Input required for the user attribute definition
    Dialog area Field or link Description
    Common Name Displays the name that you provided in step 4.
    Documentation (Optional) Provides a description of the attribute in this field.
    Type Business Object Specifies the business object type. The default type is String. Click Select to choose a different type.
    Possible values Source Specifies the sources of other possible values for the user attribute. Select the source from the list, Any valid value, or List. The choice that you make determines the information that is required.
    If you select Any valid value... Specifies that the possible values for the attribute are limited only by its business object type.
    If you select List... Add new values to the list by clicking the + button. Remove values from the list by clicking the x button. Change the order of the values that are displayed in the list by clicking the Up arrow and Down arrow buttons.
  6. Click Save on the main toolbar.
    IBM Process Designer saves the user attribute definition.