Chapter 35. Case files
A case instance is a single instance of a case definition and encapsulates the business context. All case instance data is stored in the case file, which is accessible to all process instances that might participate in the particular case instance. Each case instance and its case file are completely isolated from the other cases. Only users assigned to a required case role can access the case file.
A case file is used in case management as a repository of data for the entire case instance. It contains all roles, data objects, the data map, and any other data. The case can be closed and reopened at a later date with the same case file attached. A case instance can be closed at any time and does not require a specific resolution to be completed.
The case file can also include embedded documentation, references, PDF attachments, web links, and other options.
35.1. Configuring case ID prefixes
The caseId
parameter is a string value that is the identifier of the case instance. You can configure the Case ID Prefix in Red Hat Process Automation Manager designer to distinguish different types of cases.
The following procedures uses the IT_Orders sample project to demonstrate how to create unique case ID prefixes for specific business needs.
Prerequisites
- The IT_Orders sample project is open in Business Central.
Procedure
-
In Business Central, go to Menu
Design Projects. If there are existing projects, you can access the samples by clicking the MySpace default space and selecting Try Samples from the Add Project drop-down menu. If there are no existing projects, click Try samples. - Select IT_Orders and click Ok.
- In the Assets window, click the orderhardware business process to open the designer.
- Click on an empty space on the canvas and in the upper-right corner, click the Properties icon.
- Scroll down and expand Case Management.
In the Case ID Prefix field, enter an ID value. The ID format is internally defined as
ID-XXXXXXXXXX
, whereXXXXXXXXXX
is a generated number that provides a unique ID for the case instance.If a prefix is not provided, the default prefix is
CASE
with the following identifiers:CASE-0000000001
CASE-0000000002
CASE-0000000003
You can specify any prefix. For example, if you specify the prefix
IT
, the following identifiers are generated:IT-0000000001
IT-0000000002
IT-0000000003
Figure 35.1. Case ID Prefix field
35.2. Configuring case ID expressions
The following procedures uses the IT_Orders sample project to demonstrate how set metadata attribute keys to customize expressions for generating the caseId
.
Prerequisites
- The IT_Orders sample project is open in Business Central.
Procedure
-
In Business Central, go to Menu
Design Projects. If there are existing projects, you can access the samples by clicking the MySpace default space and selecting Try Samples from the Add Project drop-down menu. If there are no existing projects, click Try samples. - Select IT_Orders and click Ok.
- In the Assets window, click the orderhardware business process to open the designer.
- Click on an empty space on the canvas and in the upper-right corner, click the Properties icon.
- Expand the Advanced menu to access the Metadata Attributes fields.
Specify one of the following functions for the
customCaseIdPrefix
metadata attribute:- LPAD: Left padding
- RPAD: Right padding
- TRUNCATE: Truncate
- UPPER: Upper case
Figure 35.2. Setting the UPPER function for the customCaseIdPrefix metadata attribute
In this example,
type
is a variable set in the Case File Variables field, which during runtime a user may define to it the valuetype1
.UPPER
is a pre-built function to uppercase a variable, andIT-
is a static prefix. The results are dynamic case IDs such asIT-TYPE1-0000000001
,IT-TYPE1-0000000002
, andIT-TYPE1-0000000003
.Figure 35.3. Case File Variables
If the
customCaseIdPrefixIsSequence
case metadata attribute is set tofalse
(default value istrue
), the case instance will not create any sequence and thecaseIdPrefix
expression is the case ID. For example, if generating case IDs based on social security numbers, no specific sequence or instance identifiers are required.The
customCaseIdPrefixIsSequence
metadata attribute is optionally added and set tofalse
(default value istrue
) to disable the numeric sequences for the case IDs. This is useful if an expression used for custom case IDs already contains a case file variable to express unique business identifiers instead of the generic sequence values. For example, if generating case IDs based on social security numbers, no specific sequence or instance identifiers are required. For the example below,SOCIAL_SECURITY_NUMBER
is also a variable declared as a case file variable.Figure 35.4. customCaseIdPrefixIsSequence metadata attribute
The
IS_PREFIX_SEQUENCE
case file variable is optionally added as a flag during runtime to disable or enable the sequence generation for case IDs. For example, there is no need to create a sequence suffix for medical insurance coverage for an individual. For a multi-family insurance policy, the company might set theIS_PREFIX_SEQUENCE
case variable totrue
to aggregate a sequence number for each member of the family.The result of using the
customCaseIdPrefixIsSequence
metadata attribute statically asfalse
or using theIS_PREFIX_SEQUENCE
case file variable and setting during runtime for it the valuefalse
, is the same.Figure 35.5. IS_PREFIX_SEQUENCE case variable