CASE¶
From RuLa, you can access certain information about the case itself.
For this, within applicable rules, you have access to the constant CASE like to any other instance.
On this instance, the following information is available:
| Property | Description |
|---|---|
| Property | Description |
CASE.case_number |
The case number in the user readable format, e.g. CSE-1991. |
CASE.process_key |
The key of the process the case is based on, e.g. end_to_end_onboarding. |
CASE.process_name |
The translated name of the process the case is based on, e.g. End to End Onboarding. Note: This will be translated on documents and in the case manager. Within rules, it's just a placeholder, so e.g. `CASE.process_name = 'Onboarding'` will not work. Use process_key for such comparisons. |
CASE.outcome_instance |
The outcome instance this case operates on. For a case creating a new contract this is often ContractualRelationship. |
CASE.state |
The key of the current state the case is in, e.g. draft. |
CASE.all_states |
All possible states the case could be in according to the workflow of the process. |
CASE.states_history |
Returns a dictionary with some statistical information about each state. This includes:
|
CASE.last_transition |
The key of the last transition (if any) that was done to arrive at the current state, e.g. back_to_draft. |
CASE.last_transition_at |
The time when the last transition (if any) happened, e.g. 2022-11-17 11:05:30.322951 |
CASE.last_transition_by |
The username of the user that performed the last transition |
CASE.last_transition_by_name |
The name of the user that performed the last transition |
CASE.number_of_missing_information |
How many information still should be provided (the sum of all the grey bubbles on information tabs). |
CASE.number_of_tasks |
Current number of tasks within the case. |
CASE.number_of_issues |
Current number of issues within the case. |
CASE.created_at |
The time when the case was created, e.g. 2021-11-30 16:40:12.923654 |
CASE.last_update |
The last time the case was updates, e.g. 2021-03-12 11:58:08.644664. |
CASE.owner |
The owner of the case (the email in rules and the full name and email when printed) |
CASE.owner_name |
The full name of the case owner |
CASE.owner_groups |
A list of the names of the groups the current case owner has. |
CASE.owner_roles |
A list of the names of the roles the current case owner has. |
CASE.initiator |
The initiator of the case (the email in rules and the full name and email when printed) |
CASE.initiator_name |
The full name of the case initiator |
CASE.assignee |
The assignee to the case (the email in rules and the full name and email when printed) |
CASE.assignee_name |
The full name of the case owner |
CASE.approver |
The user (if any) who approved the case (the email in rules and the full name and email when printed) |
CASE.approver_name |
The full name of the case approver |
CASE.documents |
A list with the names of all documents that are used in a case. This can be used to e.g. create a customised table of contents. |
CASE.documents_by_key (new in Atfinity 17) |
A dictionary from a document's key to the document itself. |
CASE.booklets_by_key (new in Atfinity 17) |
A dictionary from a booklet's key to the booklet itself. |
CASE.proofs |
A list with the names of all proofs that are used in a case. This can be used to e.g. create a customised table of contents. |
CASE.comments |
A list of dictionaries about all the comments in a case. Each dictionaries contains these keys:
|
CASE.is_first_rule_engine_run (new in Atfinity 17) |
Whether the case is currently in its very first evaluation, so before any rule has been applied to it. Useful to give a case starting values once. Existing cases created before this became available report false. |
CASE.num_active_wizards (new in Atfinity 17) |
The number of wizards on the case that a user can still fill in and submit, i.e. those in status created or opened. |
CASE.wizards (new in Atfinity 17) |
A list of dictionaries about all wizards on the case, in any status. Each dictionary contains these keys:
|
CASE.cross_case_usage_by_instance_id (new in Atfinity 17) |
A dictionary keyed by the id (as a string) of every instance in the case that is also linked into another ongoing case, or has a pending value warning. Each entry contains:
|
CASE.number_of_instance_warnings (new in Atfinity 17) |
The number of instances in the case that currently have a pending value warning. |
CASE.signature_links (new in Atfinity 17) |
A list of dictionaries about every signature request on the case, in any status, newest first. Each dictionary contains these keys:
A signatory sent two separate requests appears twice, so filter by |
CASE.ai_case_problems (new in Atfinity 17) |
A list of dictionaries about the problems the AI Case Checks on the case currently report, newest first. A problem a user ignored, a problem below the minimum confidence, and a problem whose check no longer matches the case are all left out, so the list holds what the case wizard shows once the current evaluation is saved. Each dictionary contains these keys:
|
CASE.ai_case_problems_by_key (new in Atfinity 17) |
A dictionary from an AI Case Check's key to the problems that check reports. Every check on the case's process has an entry, so a check that found nothing gives an empty list rather than unknown. |
CASE.number_of_ai_case_problems (new in Atfinity 17) |
The number of problems in CASE.ai_case_problems. |
CASE.pending_ai_case_check_keys (new in Atfinity 17) |
The keys of the AI Case Checks whose result is not in yet, either because they have never run or because the case data behind them changed and they are running again. Their previous result still counts towards CASE.ai_case_problems until the new one arrives. |
CASE.number_of_pending_ai_case_checks (new in Atfinity 17) |
The number of keys in CASE.pending_ai_case_check_keys. |
Example: CASE.number_of_issues¶
This rule will only be fulfilled when there are no issues or tasks within a case.
Example: CASE.state¶
This rule would only be fulfilled while the case is in the state with the key '"draft".
If you are using this to create an issue or comment, it would be, as any other issue, comment or warning, removed when the case leaves that state (unless a user replied to it or was assigned to it).
Example: CASE.num_active_wizards¶
This rule is only fulfilled when there are no wizards left that a user can still fill in and submit.
Example: CASE.wizards¶
You can use CASE.wizards together with the list operators to reason about
individual wizards, for example counting the wizards that have already been submitted:
Example: CASE.signature_links¶
Filter the list down to the signatory you are writing the rule for, and take the first element to get their current request:
Together with a Send Email action this sends a signatory their signing link.
The link belongs in the body of the action rather than in an email template, because a template cannot reach case
data.