--- title: "Role" slug: "base-role-value" updated: 2026-04-16T08:30:40Z published: 2026-04-16T08:30:40Z canonical: "docs.lobstersoftware.com/base-role-value" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Role *See also:* [Company value](/v1/docs/en/base-company-account-value) > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Returns the data of a statically selected role. > > > [!TIP] > > Tooltip > > > > - **Usage**: The resolver returns the data of the **Role** statically selected in the configuration. The *input* *value* is ignored. > > - **Parameter:** Exactly one **Role** can be selected as the *return value* from all roles for which read access exists in the context of the configuration. > > - **NOTE:** In the context of a [Meta exchange](/v1/docs/en/administration-metaexchange), the selection for the **Role** is automatically adjusted based on the defined links between roles in different environments (e.g. Test/Productive). ![images/download/attachments/128386859/image2023-2-9_16-15-21-version-1-modificationdate-1675955721208-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2023-2-9_16-15-21-version-1-modificationdate-1675955721208-api-v2.png) The [Role](/v1/docs/en/base-role-value) resolver retrieves the data of the role specified by static selection for the optional **Role** parameter (see [Roles](/v1/docs/en/base-role)) from the server. - Without any selection for the **Role** parameter, the *return value* is "no value" (`null`). - A new instance of the [Role](/v1/docs/en/base-role-value) resolver is added without a selection and appears with an "empty label", as shown above. - When an existing selection (or the "empty label") is removed by clicking the "X" symbol within the label, the combobox appears empty. Saving a configuration with a [Role](/v1/docs/en/base-role-value) resolver in this state will make the "empty label" reappear. **IMPORTANT:** Instead of the [Role](/v1/docs/en/base-role-value) resolver, an [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) resolver for the "Role" type could be used, which is supplied with the ID (`id`) of a role (e.g. as a static `Long` value) as input value. Although there are no differences in the runtime behavior of the two methods, there is an important difference when **Lobster Data Platform/Orchestration** configurations are exchanged between systems via [Meta exchange](/v1/docs/en/administration-metaexchange) in the context of implementation. If the [Role](/v1/docs/en/base-role-value) resolver is used to access a specific role, relevant links between roles (e.g. between test and production systems) are taken into account in the [Meta exchange](/v1/docs/en/administration-metaexchange) to automatically assign the "corresponding" role regardless of the ID (`id`) valid in the respective environment. However, if a role is addressed by a `Long` value with the [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) resolver, then this service does not take effect, which can have a fatal impact on the runtime behavior of configurations transferred between two systems. **CAUTION****:** The [Role](/v1/docs/en/base-role-value) resolver is not available in a [Client Workflow](/v1/docs/en/frebehav-client-workflow)! The reference to a statically determined role can be established in a [Client Workflow](/v1/docs/en/frebehav-client-workflow) by performing a [Search](/v1/docs/en/core-search) as a substitute. With regard to the [Meta exchange](/v1/docs/en/administration-metaexchange), however, it is not guaranteed that the search criteria used will "find" the corresponding role (according to the [Meta exchange](/v1/docs/en/administration-metaexchange) links) across systems. ## Configuration | In a [Combobox](/v1/docs/en/fre-combo-box-vo) element, the optional **Role** parameter lists all [Roles](/v1/docs/en/base-role) for a static single selection that have read access in the session in which the resolver is configured. **NOTE:** Neither ownership rights nor [Company authorizations](/v1/docs/en/base-company-release) are relevant for [Roles](/v1/docs/en/base-role). Within the scope of the configuration, access is granted to the [Role of session](/v1/docs/en/base-session-role-value) and all roles that are directly and indirectly subordinate to it. At runtime, the resolver returns the data of the role selected in the configuration without considering access restrictions in the applicable login context. The *input value* is ignored. | ![images/download/attachments/128386859/image2022-2-25_8-42-17-version-1-modificationdate-1675955564643-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-42-17-version-1-modificationdate-1675955564643-api-v2.png) | | --- | --- | ## Examples ### Example: Criteria for row formatting in an overview In an overview for [Guest users](/v1/docs/en/base-guest-user), all guest user accounts should be given an "alert status" (color scheme "white/red") through row formatting (see [Row formatting in datagrids](/v1/docs/en/datagrid-row-formatter)) that do not refer to a role explicitly intended for guest users. In the following example, the two roles `XF_GUEST` and `XF_SPECIAL_GUEST` (see screenshot in "Configuration" section) serve as legitimate roles for [Guest users](/v1/docs/en/base-guest-user). Runtime example: ![images/download/attachments/128386859/image2022-2-25_8-43-28-version-1-modificationdate-1675955564640-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-43-28-version-1-modificationdate-1675955564640-api-v2.png) - The screenshot shows a data grid in a "Guest user overview", where the first row displays the "alert status" (white/red), because the guest user account in question has been assigned a role that should not actually be used for [Guest users](/v1/docs/en/base-guest-user). **NOTE:** [Guest users](/v1/docs/en/base-guest-user) can only be maintained interactively via the default input form, so that specific restrictions for the selection of the role (`roleId`) cannot be regulated via the [Form designer](/v1/docs/en/fre). However, most [Guest users](/v1/docs/en/base-guest-user) are also created automatically (e.g. via [Create guest user](/v1/docs/en/base-create-guest-user-actor) event action). However, the "alert status" in the list can also be useful in conjunction with automatic role assignment, e.g. to detect if there are active guest user accounts that deviate from the currently valid positive list for allowed roles. Configuration: | Within the list settings for the guest user overview, row formatting (see [Row formatting in datagrids](/v1/docs/en/datagrid-row-formatter)) is created in the data grid settings, which defines the "white/red" color scheme for the "alert level". The "condition" of the row formatting is formatted as shown on the right: - A [Field restriction](/v1/docs/en/core-property-search) checks whether one of the [Roles](/v1/docs/en/base-role) explicitly intended for guest users is selected in the "Role" (`roleId`) field of the guest user account. - On the right side of the [Field restriction](/v1/docs/en/core-property-search), the positive list of allowed [Roles](/v1/docs/en/base-role) is first created by a [Create list](/v1/docs/en/core-create-list-resolver) resolver. Each entry uses its own instance of the [Role](/v1/docs/en/base-role-value) resolver, in which an allowed role is selected. - A [Collect values](/v1/docs/en/core-collect-resolver) resolver follows per concatenation, which converts the list of [Roles](/v1/docs/en/base-role) (`Role[]`) into a list of `Long` values (`Long[]`) by accessing the "ID" (`id`) field of the role via an [Object property](/v1/docs/en/core-property-resolver) resolver. - Another [Field restriction](/v1/docs/en/core-property-search) follows within the AND conjunction here, which checks whether the guest user account is "Active", so that the formatting does not define a "false alarm" for accounts that are already deactivated. **NOTE:** Additional constraints can be added or exceptions can be defined, e.g. to prevent "expired" [Guest users](/v1/docs/en/base-guest-user) from being alerted. | ![images/download/attachments/128386859/image2022-2-25_8-46-23-version-1-modificationdate-1675955564636-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-46-23-version-1-modificationdate-1675955564636-api-v2.png) | | --- | --- | ### Example: Cancellation criteria when saving In the previous example, the rule violation when selecting a role for a guest user account is handled more strictly in the next expansion stage. This is recognizable by the "alert status" in the row formatting of the guest user overview: - Saving a guest user account with an invalid role (`roleId`) is effectively prevented by canceling it. - An error message informs the user directly on the reason for the cancellation and permitted options for the role selection. Runtime example: ![images/download/attachments/128386859/image2022-2-25_8-50-37-version-1-modificationdate-1675955564624-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-50-37-version-1-modificationdate-1675955564624-api-v2.png) Configuration: | An event handler that responds to "Create" and "Update" (see [Common action event](/v1/docs/en/core-common-action-event)) as **Triggering** **events** is configured as shown on the right: - The **Validating rule** first ensures that an entity of the "Guest user" type is saved. **NOTE:** Depending on the objective, further criteria could be examined in order to specify the scope of the rule, for example via a [Role rule](/v1/docs/en/base-role-rule) or [Company type rule](/v1/docs/en/base-company-type-rule). - Within the AND conjunction, an [Entity property rule](/v1/docs/en/core-entity-property-rule) follows below. Its structure basically corresponds to the [Field restriction](/v1/docs/en/core-property-search) from the previous example: - On the left, an [Object property](/v1/docs/en/core-property-resolver) resolver accesses the "Role" (`roleId`) field of the guest user account stored as the *reference object*. - By combining the [In list](/v1/docs/en/core-in-matcher) matcher (below) in conjunction with the negation by the [not (Matcher)](/v1/docs/en/core-not-matcher), the [Entity property rule](/v1/docs/en/core-entity-property-rule) is considered to pass if the ID of the role (`roleId`) is not included in the positive list defined on the right. - As in the previous example, the positive list (right) is first constructed starting from a [Create list](/v1/docs/en/core-create-list-resolver) resolver, in which each entry specifies a permissible role via a [Role](/v1/docs/en/base-role-value) resolver. - The [Store value as variable](/v1/docs/en/core-store-value-resolver) resolver following in the concatenation stores the [Roles](/v1/docs/en/base-role) list in variables `whiteList`, so that the positive list can be reproduced in the error message in case of cancellation. - Similarly to the previous example, the [Collect values](/v1/docs/en/core-collect-resolver) resolver is used below to obtain a list of `Long` values from the [Roles](/v1/docs/en/base-role) list for matching with the `roleId` , where the [Object property](/v1/docs/en/core-property-resolver) resolver accesses the "ID" (`id`) field of the role. | ![images/download/attachments/128386859/image2022-2-25_8-48-12-version-1-modificationdate-1675955564632-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-48-12-version-1-modificationdate-1675955564632-api-v2.png) | | --- | --- | | An [Abort](/v1/docs/en/core-abort-actor) is executed as the **Action on passed rule**, which is configured as follows: - The **Error type** is assigned to "Notification: Error" so that the message appears at runtime as a "red flag" in the right margin. - In accordance with the randomly chosen **Error** **code** `SECURITY_GUEST_USER_ROLE_ALERT` an entry of the [Localization](/v1/docs/en/core-localization-entry) is addressed (see below). The text key used as an **Error code** is also specified here in the **Default error message** parameter, which appears in the error message if no localization is found. - A parameter is added to the **Parameter** list that generates a formatted list of role names (`roleName`) from the contents of the `whiteList` variable via the [Template](/v1/docs/en/core-template-content-builder) resolver. | ![images/download/attachments/128386859/image2022-2-25_9-1-38-version-1-modificationdate-1675955564599-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_9-1-38-version-1-modificationdate-1675955564599-api-v2.png) | | In [Localization](/v1/docs/en/core-localization-entry), an entry is created in the **Resource bundle** `error` for the localization of the error message, whose **Resource name** corresponds exactly to the **Error code** (`SECURITY_GUEST_USER_ROLE_ALERT`). - The **German** field shows the localization for this [Locale](/v1/docs/en/core-locale). To the right is the corresponding definition for the [Locale](/v1/docs/en/core-locale) **English**. - In both languages, the reference to the parameter `{0}`marks the position where the list of allowed [Roles](/v1/docs/en/base-role) from the **Parameter** defined by the [Template](/v1/docs/en/core-template-content-builder) in the error message is inserted at runtime. | ![images/download/attachments/128386859/image2022-2-25_8-52-27-version-1-modificationdate-1675955564615-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-52-27-version-1-modificationdate-1675955564615-api-v2.png) | ![images/download/attachments/128386859/image2022-2-25_8-53-4-version-1-modificationdate-1675955564605-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-2-25_8-53-4-version-1-modificationdate-1675955564605-api-v2.png) |