Building the Leave Request Approval 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, this tutorial is divided into four parts: in Part 1, you are introduced to the data component by creating a SmartBox SmartObject to store your submitted form content. In Part 2, you concentrate on the forms component by creating the views and form necessary for your Application. In Part 3, you 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, you will test your 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 you 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.

If you are using a virtual environment provided by K2, you may log into your environment using the following credentials:
User Name: Denallix\Administrator
Password: K2pass!

Part 2: Forms

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

Part 3: Workflow

In Part 3 you 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). Recall that User Tasks are tasks performed by a human, such as making a decision. A System task is performed by K2, such as sending an email or updating a list of some kind.

Part 4: Test

Now it's time to test your basic Leave Request Approval application.

Summary

The exercises in the Leave Request Approval (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