Low Code Automation & Nintex K2 Five Journey By Nintex MVP - A Deep Dive into K2 Designer - Part 1 - Smart Objects
Following my last post which introduced the 3 K2 modules, K2 Workspace, K2 Designer & K2 Management. This article provides deeper insight into K2 Designer and its first building block "Smart Objects". This is part 1 of "A Deep Dive into K2 Designer" and will be followed with articles that drill deeper into the other K2 Designer building blocks "Smart Views", "Smart Forms" and "Workflow".
Smart Objects: Being a middle layer between the external data source and the user interface via a service object, there are 3 types of smart objects in K2. The "Smart Box", "Advanced Smart Object" & the "Composite Smart Object".
Smart Box:
The Smart box is a smart object that automatically creates a storage location with a local system DB. It is not recommended to use a smart box for hosting process related data, as that may result in performance issues due to process usage load on the system database. It is more commonly used for system configurations and non process related purposes.
Advanced Smart Object:
An advanced smart object is used to connect to non system related external data sources for hosting process related data such as a dedicated SQL database.
Composite Smart Objects:
This is a smart object that can connect to multiple data sources e.g. 2 or more SQL tables that store information related to 1 request. This maybe needed for creating a custom report view.
The 4 Elements of a Smart Object:
Smart Objects constitute of 4 elements: Column names, Data Types, Methods and Mappings.
Columns: These are the elements which would host data sent and received from a user interface from one end and the data to be sent or received from a DB table from the other end.
Data Types:
Columns needs to be configured with a data type to define the nature of the data that is to be hosted within the column. E.g. Integers for numbers, Text and Memos for Alphanumeric data, Booleans for logical values such as True & False and many other types.
Methods:
Methods define the interaction a smart object may have with a DB table it is connected to via a service object. There are 5 methods that are associated to a smart object. "Create", "Update", "List", "Read" and "Delete"
- Create: Its the method used to write to a database table. It does not require any mandatory input from the user interface and can give back the created Row ID created in the database table.
- Update: In a smart box its referred to as "Save", In an Advanced smart object as "Update". Its the method for updating a specific row within a DB table and it requires a mandatory input of Row ID. It does not provide any output.
- List: In a smart box its referred to as "Get List", In an Advanced smart object is "List". It's used to query a database table and retrieve 1 or multiple records as output. It does not require an mandatory input field.
- Read: In a smart box, its referred to as "Load". In an advanced smart object "Read". It is similar to "List" method, except this method is used to retrieve 1 row ID from a DB table. It requires a mandatory Row ID as an input.
- Delete: It is used to delete a row from a DB table. It requires a mandatory Row ID as input.
In the next article, I will be diving into "Smart Views", the different types and elements of a view