- 14 Feb 2022
- 4 Minutes to read
- Print
- DarkLight
Creating a Case Entity Data Structure
- Updated on 14 Feb 2022
- 4 Minutes to read
- Print
- DarkLight
Overview
The Case Entity Data Structure is primarily used to store data that goes through states in irregular order. Similar to Flow Execution Extensions, Case Entities are also used for a business process that needs to be tracked and stored within Decisions. The main difference between the two structures is how they store the data. Instead of using Process Folder, Case Entities use Decisions Entities to track information and stores them in a Folder. Since Case Entities are stored in the Decisions Portal, a normal Folder will need to be created to store those records. Case Entities also have a Case Editor in the Configuration Folder. The purpose of the Case Editor is to configure states and Flows for the Case Entity process.
Decisions Designers should ask themselves the following questions to determine if this would be the best Data Structure for their use case:
- Does data need to be stored within Decisions?
- Do states within the business process occur in irregular order?
- Is process tracking required?
Creating A Case Entity
- In a Designer Folder, select CREATE DATATYPES/INTEGRATION from the bottom Folder panel.
- In the Create DataTypes/Integration window, select Case Entity.
- In the resulting Case Entity window, declare a name for the Case Entity [EmploymentApplication].
- Then, declare data fields by inputting a Name and selecting a Type.Note: The Data Structure and data field names are used for illustrative purposes.These values differ depending on the Designer's use cases.
Case Entity Data Structure Settings
Setting Name Function Enable Caching Enables the Entity to be loaded into the cache Hide In Search This hides the data type from appearing when it is searched Include ID In Flow Cache Key Adds the GUID to the Cache Step Key for easier searching Type Name Space Creates the unique identifier for the Entity (namespace.typename) and is used to generate the SQL table name for the Entity (namespace_typename) Audit Changes This saves changes to entity data in the Audited Entities table. This option is used when data monitoring is required for this Entity Category Order Allows data field categories to be organized in a certain way. For example, grouping required data fields together Include Type Name in Description This enables or disables the visibility of the Type namespace State Configuration
- Immediately after clicking SAVE, Decisions will navigate the user to the Case Editor Page.
- To add more states to the Data Structure click the Add State button.The 'Add State' button will add another state in chronological sequence at the end. The 'Add State' action below the pre-configured state creates new states after that specific state.
- If states need to be rearranged, they can be moved by clicking the arrow that appears when the state is hovered over.
Add Activity
The next significant action in the Case Editor is the Add Activity action. When clicked on, this action will open a menu that contains two more actions called the User Action and Trigger Flow.Action Activity Function User Action Are Flows that will be user right-clickable actions when the data is reported on - User Action - actions visible for a single Case Entitiy
- Group User Action - actions visible for a groups of Case Entities
- Shared User Action - actions visible in all Case Entities; a custom generic user action
Trigger Flows Are Flows that will run when a Case Entity record enters that particular state - Auto Trigger/Transition - Flow(s) that start once data enters the parent state in the Case Entity
- Shared Auto Trigger/State Transition - Flow(s) that start once data enters the same named parent state in all Case Entities
- To illustrate Trigger Flows, create one on the Started state.
- The Trigger Flow will only contain an Add Comment step which can be found in Integration > Internal Services > Comment > AddComment.
- Declare Constant or Select From Flow input mappings for the Comment Name and Comment Description.
- On the entityid input, map in the FolderId variable.
- After these configurations, Save and close the Flow Designer.
- Return to the Designer Folder and create a new Flow [Create Case Entity Record Flow]. This Flow will be used to create the Case Entity records.
- Within this Flow, navigate to the Case Entity category located in Steps > User Defined Types and find the Create step for the user-defined type.
- On the Extension Data input, set it to Build Data.
- Then, add some Constant values to the user-declared data fields.
- Next, add Constant values to the Folder Description and Folder Name fields.
- For the Parent Folder ID set the input to a Constant and select a normal Folder to store the records or create one and select that Folder.
- Once this is completed, then Debug the Flow.
- Navigate to the normal Folder that is storing the Case Entity records and left-click on the record's name to view the Case View page.
- This Case View Page on the Folder will have a Case Activity panel. Within that panel, the Trigger Flow that was developed to add a comment successfully ran. This is because any Case Entity record that is created will immediately be placed in the first state, and automatically run any configured Trigger Flows contained with that state.Note on Case Activity Panel - Create Assignment CheckboxWhen viewing a case's activity panel, you can toggle the appearance of the "(Pending State Change)" comment in the case's future steps by enabling the Create Assignment checkbox. This setting is found when editing a state from the Case Editor Page. Changing this setting will not affect pre-existing cases, but new cases will respect the setting change.
State Timeline Configuration
The following tutorial demonstrates how to update the Case Editor Page with another visual State Timeline configuration.
Note on Case Activity on Case Editor PageThe Case Activity window tracks the state changes of the case both experienced and anticipated to be experienced. Future states not yet achieved cannot be hidden from this default Page. If also wishing to further customize the Case Activity window, a new custom Case Editor Page must be created and assigned to the Case Entity Data Structure.- On the Process View (Case View) Page, navigate to the Global Action Bar and search for the Default Process View Page.
- In the Page Designer, remove any unneeded information from the top gray bar.
- Next, locate the State Timeline component from the Page Elements > Data > Folder section and place it in the empty gray space; this process inherits the State process data automatically.
- Save and close this Page Designer.