Set Conditions for a Rule
You determine when a rule is applied by defining a condition. For example, you might create a rule that is applied only when the user is in Canada and has the Manager role.
There are two ways to define the rule's conditions. The first way is to use the basic condition builder to create conditions by selecting criteria and values. This way should be enough to define most conditions. However, if you need to create more complex conditions, and you are comfortable working with expressions, you can click Use Advanced Expression to open the visual expression editor. For more about using the expression editor, see Build Advanced Expressions.
Rules define overrides that are applied to properties only when the rule's conditions are satisfied at runtime. For conditions that use criteria in the User context, like User Authenticated ($user.isAuthenticated
) or Roles ($user.roles
), the condition is met if the logged-in user satisfies the condition.
Note:
When using the Roles criterion ($user.role) in a condition, start entering the role name you need in the Value field. The Value drop-down will display up to 25 matching Oracle Cloud Applications job and abstract roles; keep typing until the desired role displays. (The drop-down will not list any duty roles. If you want to specify a duty role, you can manually type the duty role name in the Value field.)
If the Roles drop-down list is empty, it might be because you haven't been assigned the correct role or privileges to see the roles. When extending a Human Capital Management (HCM) application, to see the roles in the list, you need to be granted the PER_REST_SERVICE_ACCESS_USERS_AND_ROLES_LOVS_PRIV
privilege, or assigned a role granted that privilege (for example, Employee
(ORA_PER_EMPLOYEE_ABSTRACT
). Contact your instance administrator if you require this user privilege.
To create a condition for a rule:
To change the conditions for an existing rule (not a new one), click the rule in the list, then click Edit above the Conditions pane.
If you’re creating a new rule, the next step is to set properties for the fields.