Information about the 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
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:
initiator
(the last one)entered
(when was this state entered last)days
(Total days in state, so the time in days the case was in this state every time it entered)times_entered
(how many times the case entered this state)previous_state
(the last one)
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.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.
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".
Please note that 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).
Last updated