This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Conventions The following table documents the conventions used throughout this module:
Convention Description
Bold Text With Border Represents commands, controls, items, menus, options, parameters, and file and folder paths. For example, in an instruction to click on the
OK button; look for a control on the page with OK as its name.
When you see text represented like this, you should see a control, window or field on the user interface with the same name.
Fixed-pitch font Represents text (or code) that must be entered exactly as shown. When you see text represented in this style, you should be typing this text into a textbox, control, code window or other UI component.
[Italic text in Square
Brackets]
Represents variables or values to be selected from the K2 Context browser
<ALL CAPITALS> Represents a key to be pressed on the keyboard. For example, <CTRL> represents the Control key on the keyboard.
Represents a best practice. Best practices are the recommended approach or guidance for specific scenarios. When you see the Best Practice icon, consider how this practice impacts your requirements or how you can implement this practice in your environment.
Represents important information. Important information is highlighted in order to draw attention to a key piece of information, and typically serves as a warning or point you should bear in mind when using the K2 platform in your K2 solutions.
Represents a note. Notes explain a topic or provide additional information, and can provide a summary or explanatory point about a topic.
Explains a concept, or a provides an explanation for a step in an exercise
Represents a hint, tip or available tools and resources that can help you during the design and development cycles of a K2 solution.
Represents trivia. The text included next to this icon is for interest only – think of it as a quick break from learning about K2.
Indicates an estimate time to complete an exercise, step or discussion.
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
Module Overview This module is a practical, hands-on exercise module which guides process designers through designing a K2
process using the K2 Designer for SharePoint. The process is based on a SharePoint list item, and will utilize the
Generated Forms approach for user interfaces. Participants will apply the process development principles
discussed in the K2 Learning module 100.LAX - K2 Designer for SharePoint – Fundamentals to implement a
“Leave Request Approval process” scenario.
Target Audience This module is intended for users who will design K2 processes using the K2 Designer for SharePoint.
Outcomes At the end of this module, you will be able to design a SharePoint list-item based workflow using the K2 Designer
for SharePoint. You will understand how to interact with SharePoint list items as part of a K2 process.
Complexity This Course Level Definition
100 Introduction to the topic or overview and assumes little or no expertise with the topic being covered. Typically level 100 modules cover concepts, functions, features and benefits.
200 Covers intermediate learning materials and assumes 100-level knowledge and provides specific details about
the topic and a fairly complete understanding of the features. 200-level training may discuss case studies that cover a breadth of common scenarios or explain how to use more advanced features.
300 Covers advanced learning materials and assumes 200-level knowledge, and an in-depth understanding of product features in a real-world environment. 300-level training provides a detailed technical subset of product technologies that illustrate specific aspects of the product that are key to improving performance or interoperability and include architecture, performance, migration, development and deployment.
400 Expert learning materials and assumes a deep level of technical knowledge and experience, as well as a detailed, thorough understanding of the topic. 400-level courses are essentially expert-to-expert sessions and the 400-level training content provides the means for customers to push products to maximum performance, achieve the broadest possible interoperability and create applications using the most advanced features.
Prerequisites and Required Knowledge To successfully complete this module, you should have covered the K2 Learning modules listed below (or have
sufficient experience with the K2 platform to be familiar with the topics covered in the listed modules).
Reference Module Name Important topics (if applicable)
100.LAX K2 Designer for SharePoint – Fundamentals
Designing, assembling, deploying and testing list-item based processes using the K2 Designer for SharePoint
This learning module also refers to (or uses) other technologies. Because the purpose of this module is not to
instruct you on these other technologies, you should be familiar with the technologies, systems or approaches
listed below (to the required level of proficiency) in order to successfully complete this learning module.
Skill or Technology Proficiency
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
Understand SharePoint terms like sites, lists and libraries
Able to create new lists and libraries in SharePoint
Know how to interact with list items and documents in SharePoint
Understand basic SharePoint Security concepts
Compatibility This learning module is compatible with the following K2 products and versions
These are the minimum compatibility requirements for this learning module. Earlier and later updates to the listed products may include, exclude or change the available components, screen layouts or product configuration.
Product
Version
Notes
K2 blackpearl 4.5 with Update 1370
K2 blackpoint 4.5 with update 1370
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
Virtual Environment Prerequisites This learning module has prerequisites which need to be configured to support the lab exercises. Follow the
instructions below to set up the necessary prerequisites for this learning module.
This script should be executed in the Virtual Server environment which accompanies this learning module. The script is only compatible with the following virtual server images provided by K2: K2 blackpearl Solutions Version 3 (upgraded to K2 4.5 update 1420)
K2 blackpearl 4.1.x
K2 blackpearl 5.1.x
K2 blackpoint Solutions Version 3 (upgraded to K2 4.5 update 1420)
K2 blackpoint 4.1.x
K2 blackpoint 5.1.x
Step Instructions
Step 1: Install the prerequisites for this training module in the Virtual Server environment
A script is provided that will create all the necessary prerequisites for this module.
Tasks:
1. Copy the file K2 Learning -100.HNL.exe provided with this learning module to any
location in the Virtual Server environment. You may download this installer from the
K2 Learning Module Installers (Download) shortcut on the Virtual Environment
desktop, or directly from the following URL: ftp://K2LearningInstallers:[email protected]/K2 Learning-
100.HNL.exe
Ask your instructor for help, if needed.
2. Double-click the file K2 Learning -100.HNL.exe to start the extract process. You
should extract the files to
C:\K2 Learning (this value should be set correctly by default)
3. After the extract process has completed, double-click the file
C:\K2 Learning\100.HNL\Setup\SetupPreRequisites.bat to install and deploy the
prerequisites for this training module. The installation process may take up to 5 minutes to complete
4. Once you see the success message (Completed setting up prerequisites for
learning module…) close the command window.
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
In this module, you will implement a leave Request process. As a starting point, we have gathered some
requirements from the business before starting the process design and discovery phase.
The business has requested an automated leave approval process
All leave requests will be approved by the employee’s manager
A SharePoint-based calendar should display all employee leave requests, both pending and approved
Denied leave requests should not appear in the calendar
Human Resources will manually capture the employee’s leave details into the HR system – no automatic
integration is required
The employee should be notified of the approval decisions via email
If the approval step has not completed within 2 days before the leave is due to start, remind the originator to
follow up
The requirements listed are typical of a simple process. Based on the business requirements, we have selected the
K2 Designer for SharePoint to build the process, and SharePoint lists will be used to store the data for the request.
Typically, the selected implementation mechanism (in other words, which K2 design tool to use, where to store the data, how to integrate with external systems and so on) is made after the process design and discovery is completed. Process design may raise requirements that cannot be implemented in a particular technology, so the selection of the technology should only be made once design and discovery is completed. When phasing in functionality over several versions of a process, it is a good idea to select the appropriate design tool from the start, since this will make things a little easier when new functionality needs to be added to new versions of the process. K2 processes are portable between designers though, so a process designed in K2 Designer for SharePoint can be extended in K2 Studio or the K2 Designer for Visual Studio design tools.
Scenario and Requirements
The business has requested an automated leave approval process
All leave requests will be approved by the employee’s manager
A SharePoint-based calendar should display all employee leave
requests, both pending and approved
Denied leave requests should not appear in the calendar
Human Resources will manually capture the employee’s leave
details into the HR system – no automatic integration is required
The employee should be notified of the approval decisions via email
If the approval step has not completed within 2 days before the
leave is due to start, remind the origonator to follow up
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
Lab Part 1: Review the Process Design document Step Instructions
Step 1: Install the prerequisites
Tasks:
1. If you have not already done so, follow the instructions under the heading Virtual Environment Prerequisites at the start of this document to install the required SharePoint items for this learning module.
Step 2: Review the process design document
Task:
1. Review the process design document located at C:\K2 Learning\100.HNL\LAB 1\
100.HNL LAB 1 - Process Design Document.docx
2. Feel free to discuss the process design and the process requirements within your group.
Part 1 Complete!
The next lab exercise will cover the assembly, deployment and testing of the process.
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
LAB 2: Assemble, deploy and test the Leave Request process
1. If you have not already done so, Follow the instructions under the heading Virtual Environment Prerequisites at the start of this document to install the required SharePoint items for this learning module.
Step 2: Review the prerequisites
Tasks:
1. Using Internet Explorer, browse to the site: http://portal.denallix.com/K2Learning/100.HNL
2. Review the layout of this site. There is a leave calendar list that will display leave
requests, and a K2 Worklist Web Part to display K2 tasks. A K2 Process Portal subsite also exists for this site.
Part 2: Assemble the Leave Request Process Step Instructions
Step 1: Create the new process from the originating SharePoint list
We will create the K2 process from the Leave Calendar list. When a user enters a new leave request, the process will automatically start.
Task:
1. Create a new K2 process in the 100.HNL Leave Request Calendar list and configure the
process properties
2. Configure the process security Step-By-Step Walkthrough:
a) Open the List Settings for the SharePoint list 100.HNL Leave Request Calendar
b) In the list settings, locate the K2 Process icon in the ribbon, and click it to start designing a
new K2 process
c) Once the K2 dialog box has loaded, click on the Create a new Process option to create the
new process.
d) On the process settings screen, provide the process general properties using the table below
Name 100HNL–LAB2 – Leave Request Approval
Description Leave Request Approval
Category K2Learning
Start Option Start Process when an item is created
Folio [Title]
e) Click on Next button to continue to the next screen. Since we don’t need to add additional
fields and cannot set the process start screen options, keep clicking Next until you get to the
Process Rights screen.
f) On the Process Rights screen, configure process rights as specified by the design
document:
Administrator Admin and View
Denallix\Human Resources
Start and View
Domain Users: Start and View Participate
SP Web Service Start and View Participate
Step 2: Add a step to update the original
Task:
1. Create a new step which updates the Title and status of the original calendar list item
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
LAB 2: Assemble, deploy and test the Leave Request process
After the process has started, we want to update the calendar item with the originator’s name and set the item’s status to Pending.
Step Name Update List Item
Outcomes Continue
SharePoint List Item Changes
Title [Originator Full Name] – [Leave Type] (Pending Approval)
Status Pending
Step-By-Step Walkthrough: a) In the ribbon at the top of the screen, click on the Step category drop-down menu and select
the Lists item, since we want to interact with a SharePoint list item in this step.
b) In the list of available steps, locate the Edit List Item step, and drag it into the new step that
was just created after the Start step. A wizard screen will pop up – it may take a few seconds to populate fully.
c) In the list of available columns, scroll down to find the Title column, select the Update
checkbox and drag items from the Context Browser into the Title textbox [Originator Full Name] (from process context) – [Leave Type] (from SharePoint columns
context) (Pending Approval (hardcoded value))
d) Select the Status column checkbox and then select Pending from the drop-down menu.
The wizard screen should look something like this
e) Click the OK button to finish the wizard
Step 3: Add a step to set the process Folio
We want to give a user-friendly reference to the process instance, which includes the originators name and leave type
Task:
1. Create a new step which updates the Folio of the process
Step Name Set Folio
Outcomes Continue
Folio Value [Originator Full Name] – [Leave Type]
Step-By-Step Walkthrough:
a) On the Process designer, hover over the Update List Item event that we created in the
previous step, and click the icon to create a new outcome for the step
b) In the Workflow Step Outcomes screen, click the Add button to add a new outcome
c) Change the name of the outcome to Continue and then click the OK button
d) In the ribbon at the top of the screen, click on the Step category drop-down menu and select
the General item.
e) In the list of available steps, locate the Set Folio step, and drag it into the new step that was
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
LAB 2: Assemble, deploy and test the Leave Request process
i) Click Next to continue to the Participants screen, and then drag Manager from the context
browser into the default task group. Select the checkbox next to Notify recipients… since we
will send a customized email notification to the manager.
j) On the Event Notification Settings screen, configure the email to include fields form the context browser. You should be familiar enough with the context browser to locate the various fields in the different categories.
Subject: New leave request - Approval required
Message: Dear [Participant Name] A new leave request has been submitted by [Originator Full Name] for [Leave Type] from [Start Date] until [End Date] To check the current leave calendar, click here: [link to 100.HNL SharePoint Site] (Hint: you can drag items from the “SharePoint sites” category onto the email body) Please approve or deny the leave request using the link below: [Link to task item]
k) Click Finish to complete the wizard. You should see that three outcomes flow out of the
Approve request step.
Step 5: Create the “Send Denied notification” email step
Task:
1. Add the Denied notification to the process (attached to the “Deny” outcome from the Approval step) and configure the step with the following properties
Message: A new leave request has been approved for [Originator Full Name] for [Leave Type] from [Start Date] until [End Date]
Please open the leave request information screen using the link below, capture the leave request details in the HR system, and complete the task [Link to task item]
Step-By-Step Walkthrough:
a) Drag a User Task step into the other parallel Approval path of the process.
b) Configure the first screen of the wizard as follows
Name Capture Leave Details
Instruction Please update the HR system with the approved leave request
information below
Actions Task Completed
c) Click Next to continue to the Outcomes screen.
d) Delete the default outcome that was created, since the process will end after HR has
completed their task.
e) Using the context browser, drag fields from the SharePoint context onto the user form, and configure them as shown:
Field Required Read-Only
[Title] X
[Leave Type] X
[Start Date] X
[End Date] X
f) Click Next to continue to the Participants screen, and then search for the Human Resources
group in the context browser (remember to use the icon to change the search scope to
Group).
Drag the group into the default task group, and select the checkbox next to Notify
recipients… since we will send a customized email notification to the manager.
g) On the Event Notification Settings screen, configure the email to include fields from the
context browser. You should be familiar enough with the context browser to locate the various fields in the different categories.
Lab Part 3: Deploy and Test the process Step Instructions
Step 1: Deploy the process designed in the previous Lab exercise
Task:
1. Deploy the K2 process assembled in Part 2 of this lab.
Step-By-Step Walkthrough:
a) In the process designer, click on File and then select Deploy to deploy the process.
b) Wait for the process build to complete, and click next to deploy the process.
Step 2: Add the process to a K2 process portal site
Task:
1. Add the process to the existing K2 process portal site located at http://portal.denallix.com/K2Learning/100.HNL/100.HNL.K2ProcessPortalSite
Step-By-Step Walkthrough:
a) Click the web browser’s Back button to exit the designer, Click OK to acknowledge the
warning message.
b) Browse to the K2 process portal site called 100.HNL.K2ProcessPortalSite
c) In the bottom left-hand corner of the screen, click on the Settings link to open the settings
screen.
d) Click the Show All link to show all processes, and then click the checkbox next to the new
process you just created K2Learning\100HNL-LAB2 – Leave Request Approval
e) Click the OK button to save your change
Testing the process
The process is ready to be tested. The following steps will not describe every task step-by-step, since may steps use technologies and interfaces you will already be familiar with. Step-by-step guides will only be provided where new functionality or complex tasks are described.
Step 3: Register a new leave request
Task:
1. Using Administrator’s Internet Explorer, browse to the site http://portal.denallix.com/K2Learning/100.HNL
2. Use the Submit Leave Request link on the SharePoint site to register a new leave
request. Use a start and end date within the current month for the leave request, and select any category you wish.
Step 4: Approve the leave request
Task:
1. Open William’s browser, and open the SharePoint site at http://portal.denallix.com/K2Learning/100.HNL
2. Notice that the leave request has been added to the leave calendar, but with a “Pending” status.
3. Using the K2 task list on the site, open the Leave Request approval task and approve the
leave request
Step 5: Confirm that the Leave request is approved
Task:
1. Open Administrator’s Outlook and confirm that a Leave Request Approved email was
received
2. If you selected a leave start date within 2 days from today, you should also see an alert
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
LAB 2: Assemble, deploy and test the Leave Request process
3. Open the SharePoint site at http://portal.denallix.com/K2Learning/100.HNL and verify that the calendar list item title has changed the submitter name and the leave type.
Step 4: Complete the “Capture leave details” step
Task:
1. Open Codi’s Outlook, and verify that a task notification email was received. Note that the email content has been customized as designed in the process.
2. Open Codi’s browser to launch an IE session as Codi.
3. Using the task link in Codi’s Outlook, open the Leave Request approval task and complete the HR user’s task.
Lab Complete!
Congratulations, you have successfully completed this lab exercise.
Lab Challenge Steps If time allows, try to complete the Lab Challenge steps.
Step Instructions
Step 1: Report on the process
Task:
1. Use the K2 Process Portal site located at http://portal.denallix.com/K2Learning/100.HNL/100.HNL.K2ProcessPortalSite to run a process instances report. Drill-down on the report to see the process history, and open the View Flow report to review the Process Flow.
Step 2: Format the dates in the emails
Task:
1. You may have noticed that the dates are not formatted well in the email notifications. Using an inline function, you can covert the date to a different format before sending out the email.
In the Inline Functions category of the context browser, use the FormatDateTime inline
function (under the Date and Time category) to format the date into an easier-to read
format.
100.HNL - K2 Designer for SharePoint Hands-On Exercise - Leave Request process
LAB 2: Assemble, deploy and test the Leave Request process
This has been a very hands-on module which allowed to you to become more familiar with the K2 Designer for
SharePoint and build a process with limited step-by-step guidance.
If you have questions about this module or the exercise, feel free to discuss these with your instructor.
Random Fact: Honolulu is the “biggest” city in the world. That’s because Hawaii’s state constitution states that any island not named as part of a county forms part of Honolulu. This makes the entire island of Oahu, where Honolulu is located, plus all the other small, uninhabited islands, known as the Northwestern Hawaiian Islands, part of Honolulu. Honolulu is about 1,500 miles (2,414 km) long, which is roughly the distance from Los Angeles, California, to Denver, Colorado.
2e3cf7ff-fffc-43b7-b5de-7723081b7794
Questions and Answers about this practical exercise