Building the Leave Request Application (V1 or "Basic" Version)

This document contains the step-by-step instructions to build Version 1 (or the "basic" version) of the Leave Request Approval Application. If required, please refer to the Application Design topic for an overview of the Application.

For clarity, we will divide this tutorial into four parts: in Part 1, we introduce you to the Data component by creating a SmartBox SmartObject to store our submitted form content. In Part 2, we concentrate on the Forms component by creating the views and form necessary for our Application. In Part 3, we focus on the Workflow component by building a simple approval workflow and then editing the Forms for the additional workflow integration tweaks. In Part 4, we will test our Application.

Part 1: Data

Most applications require some kind of Data storage. In K2, this data storage usually refers to K2 SmartObjects. Part 1 of this tutorial will introduce you to K2 SmartObjects by creating a SmartBox SmartObject. SmartBox is K2-provided storage where K2 creates a dedicated table in the K2 database on SQL Server. For this scenario we will create a Leave Request SmartObject which will store the leave request information entered by the user.

This part should take around 15-20 minutes to complete.

Part 2: Forms

For this sample application we will be using K2 smartforms as the user interfaces to capture the Leave Request details and to approve the Leave Request. With our Data objects created in Part 1, we are ready to start on the Forms component of our application. The first step is to create an Item View.

Part 3: Workflow

In Part 3 we will create the Leave Request Workflow, which will incorporate the Data and Forms components created in Parts 1 and 2. The workflow will contain a User Task (the manager making a decision on the request) and System Tasks (updating the status property in the Leave Request SmartObject).

Part 4: Test

Now it's time to test our basic Leave Request Application.

Summary

The exercises in the Leave Request (Basic) Application are meant to provide an introduction to building K2 Applications and the K2 components of an Application: Data, Forms and Workflows. By completing the five parts, you should have a basic understanding of how data, forms and workflows integrate with each and how rules can be implemented to provide dynamic functionality to your user interface (for example, auto-populating form fields with the current user details). Key to these exercises are the following:

Data

Forms

Workflows

K2 smartforms Product Documentation: User Guide4.6.10
Video Links Learn Support
No videos found for this article
K2 on YouTube
No Additional links found for this article
No self-learning content for this article
Try some scenarios...
No relevant support links available for this article