+44(0)1908 545 770
YOUR EXPERT RPA PARTNER

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.
WATCH NOW

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

Let's choose, design and deploy a process automation solution for your business.

Find out more
TRANSFORM YOUR BUSINESS

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

Automate where it matters most. Scale to solve challenges in every area

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
23 February 2015

Auto generating K2 SmartObjects using the K2 SmartObject Tester

K2 interacts with data sources using a very powerful technology called SmartObjects.  A SmartObject is used by K2 to expose data from variety of data sources to K2 SmartForms, K2 SmartForm Views and K2 Workflow Processes.

Using the K2 SmartObject Tester, we can easily generate SmartObjects from SQL Server, SharePoint, Web Services, Active Directory or any other data source.

In this blog, I will be showing you not only how to generate K2 SmartObjects, but also how to manage them inside the K2 Designer.

K2 Automated Testing Software

BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.

 

Free K2 Five Upgrade Review

First we need some data to publish. In this example, I will be generating a K2 SmartObject from Microsoft SQL Server. I have created a simple table in the database called Users.

1 Publishing K2 blackpearl SmartObjects - Create Data Table

1 Publishing K2 blackpearl SmartObjects – Create Data Table

Using the K2 SmartObject Tester, I will refresh the SQL Server Instance in order to reflect the Tables, Stored Procedures and Views from my database in my K2 Service Instance.

2 Publishing K2 blackpearl SmartObjects - Create SmartObject using SmartObject Tester

2 Publishing K2 blackpearl SmartObjects – Create SmartObject using SmartObject Tester

Now that my Users table is in the Table list, I will right-click it and click on “Create SmartObject”. Doing so will open the Publish SmartObject dialog box.

3 Publishing K2 blackpearl SmartObjects - Create SmartObject using SmartObject Tester Part 2

3 Publishing K2 blackpearl SmartObjects – Create SmartObject using SmartObject Tester Part 2

4 Publishing K2 blackpearl SmartObjects - Create SmartObject using SmartObject Tester Part 3

4 Publishing K2 blackpearl SmartObjects – Create SmartObject using SmartObject Tester Part 3

Two main areas we need to look at before publishing a K2 SmarObject is the Name & Category.

The Name of your K2 SmarObject is visible to other users of the K2 Designer, thus it is important to choose an appropriate name that follows a predefined naming convention. In this example I will call my K2 SmartObject Example.SMO.Users.

The Category of your K2 SmartObject will determine where in the K2 Designer the SmartObject will appear.  Choosing the “Default” option will place the SmartObject in the “Default” directory in the K2 Designer.

Click on the “Publish SmartObject” button on the Toolbar in order to publish the SmartObject. If everything goes well, K2 will provide you with a “Successful” message.

5 Publishing K2 blackpearl SmartObjects - Create SmartObject using SmartObject Tester Part 4

5 Publishing K2 blackpearl SmartObjects – Create SmartObject using SmartObject Tester Part 4

Going back into K2 Designer, you can find the SmartObject by refreshing the Category that you published the SmartObject to. Right-click on the Category and click on the “Resfresh” button.

6 Publishing K2 blackpearl SmartObjects - Published SmartObjects in K2 Designer

6 Publishing K2 blackpearl SmartObjects – Published SmartObjects in K2 Designer

The Example.SMO.Users SmartObject appears now.

7 Publishing K2 blackpearl SmartObjects - Published SmartObjects in K2 Designer Part 2

7 Publishing K2 blackpearl SmartObjects – Published SmartObjects in K2 Designer Part 2

Congratulations, you have just successfully published your first K2 SmartObject.

Next time we will see what happens when we have a related stored procedure, and how we can publish the stored procedure to the same SmartObject by adding a new method to the existing K2 SmartObject.

About K2 SmartObjects

K2 SmartObjects is a patented technology that provides unified data access to a variety of disparate backend data sources.  SmartObject data presents one view of the data world and liberates sometimes hidden or ‘dark data’ that are otherwise hard to expose to users.  K2 SmartObjects integrates deeply with K2 blackpearl Workflow, K2 SmartForms and K2 Reports.  K2 SmartObjects provide reliable data access that takes otherwise long to create using conventional IT programming methods.

About Velocity IT

Velocity IT is a UK based IT company that are business process architects and K2 masters. With over 15 years’ K2 design and development experience, we are the forefront of K2 solution design and implementation.  Our K2 solutions have a user base of over 300,000+ users worldwide.  Please visit velocity-it.com for more help and information.

Need further technical advice or support?