Derived state rules
A derived attribute is an identity attribute that Owlie computes instead of reading from a source. Each derived attribute has an ordered list of rules. Owlie checks the rules from top to bottom against the identity's current values, and the first rule that matches supplies the value. If no rule matches, the identity gets the attribute's fallback value, so a derived attribute always has a value.
Lifecycle state is the derived attribute every organization has. You can add your own, for example
a custom.worker_class that reads EXTERNAL when employee_type is CONTRACTOR, VENDOR or
TEMP and EMPLOYEE otherwise, and then use it in policies and mappings like any other attribute.
Where the rules are
- Lifecycle state rules are under People lifecycle > States > Rules, beside the states they produce. Lifecycle state and overrides covers the built-in rules and the manual override.
- Your own derived attributes are under Directory > Directory Settings > Derived attributes.
Viewing needs the derived_state.read permission. Adding or changing attributes and rules needs
derived_state.modify.
Date-based lifecycle reactions also create derived attributes for their own use. They appear in the same list and stay editable.
Add a derived attribute
- Open Directory > Directory Settings > Derived attributes and select Add derived attribute.
- Enter a Key in lowercase with underscores, such as
worker_class. Owlie stores it ascustom.worker_class. The key can't be changed later. - Choose a Data type: Text, Number, Boolean, Date or DateTime. The type can't be changed later.
- Enter the Fallback value. It is required and must fit the data type.
- Select Create attribute.
The new attribute has no rules yet, so every identity receives the fallback value. Select the attribute's row to expand it and add rules.
Add and order rules
- Expand the attribute and select Add rule.
- Optionally enter a Name, a label for administrators such as "External workers".
- Enter the Value the rule produces. It must fit the attribute's data type and can't be empty.
- Under Filter, build the condition. Each term has a field, an operator and a comparison value. All terms must match. Select Add term for another one.
- Select Add rule.
The field list contains every identity attribute, built-in and custom, plus status, type,
deleted, is_owlie_user and lifecycle_state. The operators are:
| Operator | Matches when |
|---|---|
| equals | The field has exactly this value. |
| does not equal | The field has a different value. |
| is any of | The field has one of the comma-separated values, such as A, B. |
| is none of | The field has none of the comma-separated values. |
| has any value | The field is not empty. |
| is empty | The field has no value. |
For anything the builder can't express, select Advanced (raw JSON) and enter the complete condition in Condition (JSON). Owlie checks it when you save.
Rules run from top to bottom and the first match wins, so put specific rules above general ones. Use the arrows on a rule to move it up or down. Each rule's row shows its position, name, value and a summary of its condition. Select Edit to change a rule, or the delete icon to remove it.
To change what unmatched identities receive, select Edit fallback on the attribute, enter the new value and select Save fallback.
What a rule can read
A rule describes the identity's state now. It can't compare a new value with an old one or react to a change as it happens. Owlie rejects a condition that refers to old or previous values. For "when someone moves from A to B, do this once", use a lifecycle reaction. A reaction runs once on a transition. A derived rule holds for as long as its condition is true.
Two more limits keep the result well defined:
- A rule can't read the attribute it produces.
- Derived attributes can read each other, but not in a circle. Owlie refuses a rule that would make two derived attributes depend on each other.
Built-in rules and attributes
Rules and attributes that Owlie ships carry a Built-in badge. Where built-in rules and yours sit in the same list, yours are marked Your rule. You can edit and reorder built-in rules, and edit a built-in attribute's fallback, but you can't delete them.
Choose how relative dates work
Each rule has a Relative date timing field. It affects comparisons such as “older than one day” or “within the next week.” It has three choices:
| Choice | How Owlie counts days and weeks |
|---|---|
| Elapsed UTC (existing behavior) | Fixed 24-hour days and seven-day weeks. This is the default. |
| Calendar days in a fixed time zone | Local calendar days in the IANA time zone entered in Time zone, such as America/New_York. |
| Calendar days in each identity's time zone | Each identity's time zone. Owlie saves the organization's current time zone as the fallback for identities without a valid preference. |
A date-only attribute begins at midnight in the chosen time zone. A date and time with an offset is an exact instant. Calendar days can vary in elapsed hours when clocks change. These choices do not add business-day or holiday rules.
Changing an identity's time zone can change when an identity-zone rule next matches. If the rule sets lifecycle state, that change can affect access. Review the rule's effect before choosing this mode.
The simple filter builder handles basic comparisons. For a relative-date comparison, choose
Advanced (raw JSON) and enter a FILTER predicate. For example, this rule matches after an
identity's end_date is more than one calendar day old when you select a calendar timing mode:
{
"include": [
{
"kind": "FILTER",
"filter": { "end_date": { "$olderThan": { "days": 1 } } }
}
],
"exclude": []
}
A newly saved timing choice also recalculates the attribute for the identities the rule affects.
When Owlie recalculates
Owlie recalculates a derived attribute for an identity when one of the attributes its rules read changes, for example after a Sync updates the person's employment status. It also recalculates when a date in a relative-date rule passes its threshold. Sync inputs and derived state explains how source data reaches the attributes your rules read.
Saving a rule, reordering rules, deleting a rule or changing the fallback recalculates the attribute for every identity. Review a change to lifecycle rules before you save it: a different lifecycle state can change people's access.
How a derived value becomes the identity's value
A derived attribute's source priority lists only its own Derived source, and administrators can't edit its value by hand. On an identity's Attributes tab its source reads Derived.
Lifecycle state is the exception. Its priority puts a manual override ahead of the derived value, so an administrator can temporarily override what the rules compute. The Owlie account status (Active or Disabled) is a separate setting and is never derived.
Delete a derived attribute
Select the delete icon on the attribute's row, then Delete attribute. Owlie removes the attribute, its rules and every derived value for it. Owlie refuses the deletion while another derived attribute's rules still read this one. Lifecycle state and other built-in attributes can't be deleted.