Overview

Robotic Process Automation with Kofax Kapow™

No Comments

Kapow Software was acquired by Kofax in 2013 and fits perfectly to Kofax’s First Mile™ strategy. Kofax Kapow provides a platform to process data from structured or unstructured databases, files, email systems, websites, portals and even legacy mainframe systems or terminal emulations. It handles automated extraction and transformation of data from Excel, XML, XLS, PDF, RSS feeds and from APIs based on SOAP, REST, XML and JSON.

Design Studio

A visual editor called Design Studio enables you to create automated workflows through a point-and-click design and to integrate the applications and data sources of your choice. This is achieved by the Kapow Synthetic API™ technology. The Robotic Synthetic API wraps existing applications or emulates APIs without coding. In Kofax Kapow such an automated workflow is called robot. Designed robots can be consumed as a REST Service or as an endpoint from .NET or Java.

Design Studio

 

Management Console

Built robots can be uploaded from Design Studio to a centralised repository and are managed in the Management Console. The Management Console is moreover responsible for load balancing, failover and monitoring of RoboServer.

RoboServer

RoboServer is responsible for the execution of robots. The robots can be executed on-demand , via a Java or C# API, tailored REST Services or can be launched as a Kapplet.

Kapplets and KappZone

A Kapplet is a web application and exposes a user friendly interface to the robots. It can be customised for the end user’s demands. The Kapplet end users have their own KappZone with the Kapplets an administrator made accessible to them.

KappZone

 

Overview

Kofax Kapow Overview

 

The Business Case

The codecentric website includes a subpage “Team” where many of us are listed and linked with our own subpages. These subpages disclose information about each employee as well as our specialised areas of expertise. When it is necessary to look for someone with a special skill set, you would ordinarily need to click all the subpages to have a closer look at the listed skills. I realise you would ordinarily just ask in the company’s Slack for this, but I want to direct you away from that. A robot will do this work, loop through all subpages, extract information, and in the event it finds a profile, sends an email:

Email content

 

Creating a Robot for our Business Case

Design Studio

Design Studio is the visual editor with which we want to create our robot. It offers several views to accomplish the creation of a robot.

Project View

The Project View gives you an overview of your robots and types or other resources.

Project View

 

Robot View

The Robot View shows you the steps defined for a robot. You can switch between design and debug mode for later testing. Here you define your steps and actions of the workflow.

Robot View

 

Step View

The Step View gives you information about a single selected step and shows all the configurable properties and mainly the action to process in this step.

Step View

 

Browser View

If a step loads a webpage, the content is displayed in the Browser View.

Browser View

 

Source View

The source of the related page is shown in the Source View.

Source View

 

Variables View

The defined variables and their actual values of the robot are displayed in the Variables View.

Variables View

 

Variables and Types

Before you define a robot you should think about the data the robot should extract. The extracted data has to be persisted in variables. There are already defined types like Short Text, Number, Binary, Image, JSON, Password and so on. These types are called simple types. But you can also create own types that have one or many attributes that base upon one of the existing simple types. These own types are called complex types. Input or output variables must always be of complex type.

Creating a new Project

In our Project View we create a new project named Blog.

Create new project

 

After that we create two new folders named Robots and Types to separate between our robots and types. Now we have the following structure:

My Projects

 

Defining Types

We want to create a type Blog first and it shall have the following attributes:

Attribute NameAttribute Type
NameShort Text
TitleShort Text
TeamShort Text
EmailShort Text
LinkShort Text
TitleLong Text
ImageImage

Finally we need a type for an input variable. When defining a type you can set a default value. That is useful for debugging a robot inside Design Studio.

Attribute NameAttribute TypeDefault Value
SkillSetShort TextKofax

The types are defined by selecting the folder Types and then right clicking and choosing New » Type.

My Projects

 

Creating a new Robot

Now it is time to create and develop our robot. We select the folder Robots in our project, right click and choose New » Robot.

Create new robot

 

We are now starting with an empty Robot View.

Empty Robot View

 

The triangle at the beginning marks the beginning of the robot and the crossed circle the end step of a branch.

Branches, Robot States and Execution Flow

The following example shows a robot that is executed linear, starting at the left most step and continuing sequentially to the end step where the robot stops.

Linear robot

 

For each step a robot has various elements that make up its state:

  • currently open windows and frames
  • variables
  • cookies, authentication and other

The following example shows a non-linear robot with two branch points:

Non-linear robot

 

The robot executes each branch from top to bottom. Each time the robot reaches an end point, execution is continued on the next branch.

Each time a new branch is executed the robot reverts its state. If Step 1 in our example was a step were we loaded a page, then in Step 6 and Step 10 the state of Step 1 is preserved and the page doesn’t have to be loaded again. The robot just rolls back to where it left off.

If steps 5, 9 and 13 are doing the same action you can also join the steps.

Robot with joined steps

 

And it is possible to build complex robots.

Complex robot

 

The execution flow is as follows:
Step 1 » Step 2 » Step 3 » Step 4 » Step 5 » End Step
Step 6 » Step 7 » Step 8 » Step 5 » End Step
Step 8 » Step 5 » End Step
Step 9 » Step 10 » Step 11 » Step 5 » End Step

Once execution reaches an end step, execution will continue from the next branch of the most recently reached branch point.

For Each Loops

For Each Loops are exceptions to the rule previously stated.
These loops include the following actions:

  • For Each Tag
  • For Each Window
  • For Each URL and other

For Each Loops

 

If the end point is reached, the execution will not go to the next branch but to the next iteration of the loop step. If no more iteration remains, the execution will then continue from the next branch.

Once execution reaches an end step, execution will continue from the next branch of the most recently reached branch point or from the next iteration of the most recently reached loop step.

Defining Variables

In the Variables View we have to define our variables for persisting data during our later steps.

Defining variables

 

Variables
Variable NameAttribute TypeDescription
skillShort TextA temporary variable
blogBlogVariable for persisting our extracted data
skillSetLong TextA temporary variable for concatenation of skills (global)
inputInputOur input skill the robot searches for

Global variables persist their values during the execution of a robot.

Defining Steps

After the concept of branches, states and execution flow, we are ready to define our steps to build our workflow. By right clicking on the beginning of our robot and selecting Insert Step After » Action Step we create a new step.

Defining steps

 

Every step needs an action to process. In the beginning the step is unnamed and undefined.

Unnamed step

 

Load Page Step

The action of the step is defined in the Step View:

Select an action for step

 

The exclamation marks show you that you have to choose the action for that step. We choose Load Page.

Load Page step

 

After inserting the URL we want to load, we just have finished our first step. If we click on the next step behind this step, in our case the end point, the Load Page step is executed. In the Browser View you can see Executing… while the page is loaded. After the page is loaded it is rendered in the Browser View.

Browser View

 

For Each Tag Path Step

On this page all employees are linked with a photo that is also linked to the employee’s profile subpage. We want to loop through all of them. So after the Load Page step we insert a new action step and set the action to For Each Tag Path.

On the Finders Tab we define where to search, in our case:

Finders Tab

 

And on the Action Tab we define the action that is performed inside the tag found by the defined path on the Finders Tab:

Action Tab

 

If we click on the step after this step we can test the iteration by clicking on the icons for next or previous iteration.

Iterate through tags

 

In the Browser View the image of the current iteration is marked by a blue frame.

Blue frame iteration 1

 

Click Next Iteration

Blue frame iteration 2

 

Extraction of Data

In the next step we want to extract data and assign it to our blog variable. We can use the Source View to achieve that. We select the tag we are interested in by clicking on it.

HTML Source View

Then we right click and select the action Extract » Attribute, choose itemref and assign it to our variable blog.Team.

Extract Attribute

 

We do the same with a next step and extract the link to the profile page.

Loading the Profile Page

With the extracted data of the link the value is persisted in blog.Link. We create a new step and load the page with this link. We can also use a variable for the URL of this action:

Load profile page from variable

 

If we click on a step behind this step the Load Page Action of the profile page is performed and the new page is loaded:

Profile page sbl

 

Extract More Data

We want to extract more data like image, name, title and email. We can do that by right clicking in the Source View and select what to extract and which variable to assign the data to.

Converters

The email is a tag attribute href and it’s value has a prefix mailto:. We can use a converter to get rid of this prefix and grab the email address.

On the Action Tab a converter can be defined:

Extract Tag Attribute

 

In special circumstances we use a Replace Text converter:

Replace Text Configuration

 

At this point, our robot looks like this:

Robot definition

 

Loop Through the Skills

The skills are listed on the page and if we select the first list item in the Browser View we then can create a Loop For Each Tag and loop through all list items of this unordered list.

Skills on profile page

 

This is now our second loop we use and we extract the text of each skill in a following step. We assign the text to our temporary variable skill. After that we want to add the skill to our global variable skillSet and collect all skills from the profile page. This is done through another step and the action Assign Variable.

Assign Variable

 

It is a simple concatenation of the single skills in our variable skill into our global variable skillSet.

This is what our second loop looks like:

Robot definition second loop

 

At the end of the loop we have collected relevant data in our blog variable and all skills of one employee in the global variable skillSet. And consequently, we need to create a branch before the second loop.

Create a Branch

First we select the step preceding our second loop step, right-click and select Create Branch.

In this branch we need to check if the value of our input variable matches the collected skills in our global variable skillSet. If so, we send an email. Otherwise we skip the process flow and the execution flow goes to the next iteration of the first loop.

Test Value

Checking, if the skills match the value of the input variable is achieved by a new step with the action Test Value:

Test Value

 

If the condition is not satisfied then the following steps are skipped.

Sending an Email

At this point we have definitely found an employee that matches the skill we are looking for. Before sending an email we want to assign the value of skillSet to our variable blog.SkillSet and we want to be a bit puristic and get rid of a possible semicolon at the end:

Assign Variable with code

 

Finally we need a step for sending of an email. On the Message Tab we have to define the addresses for the email, subject and the message itself. You can concatenate and combine text and variables. At last you can choose the Message Type – plain text or HTML.

Send Email Message Tab

 

On the Server Tab you have to define the credentials for sending the email.

Send Email Server Tab

 

On the Attachment Tab you can define attachments for the email. In our case we want to attach the image of the employee.

Send Email Attachment Tab

 

Our second loop and the branch look like this:

Robot definition second loop and branch

 

As our variable skillSet is global we need to reset it at the beginning of our second loop. We use a step with an Assign Value action and assign an empty string to the variable.

Grouping of Steps

It is possible to select steps and group them together. This is a convenient way to structure your robot. The steps can be hidden or collapsed:

Grouping steps

 

Error Handling

Each step has an Error Handling Tab. Errors are logged by default and an API exception is thrown. In case an employee has no skills in his profile – and I faced that problem – an exception is thrown and the robot ends. Therefore you can decide not to throw an API exception and define to skip the following steps. In this described case the execution flow goes back to the next iteration of the first loop.

Final Robot View

And this is the final view of our robot with the grouped extraction steps.

Final robot deinition

 

And it works!

Email input folder

 

Remark

I must admit that this robot is just a robot to demonstrate how to work with Kofax Kapow. Normally you would have a robot that runs weekly and grabs the data of all employees and stores them in a database. Searching for employees with a special skill would go directly against the database.

Stefan Blank

I have 25 years of professional experience in fields of document and input management. As a Kofax Certified Capture Consultant I offer comprehensive knowledge of the Kofax products and technologies. The focus of my work is determination and evaluation of customer’s demands and responsibility for conception and realisation based on the possibilities the range of Kofax products offers (customising and software development).

Share on FacebookGoogle+Share on LinkedInTweet about this on TwitterShare on RedditDigg thisShare on StumbleUpon

Comment

Your email address will not be published. Required fields are marked *