Instant Estimate +44(0)1908738254
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
24 August 2016

How to debug a custom K2 Service Broker using a Visual Studio Breakpoint

K2 supports custom Service Brokers that allows K2 Developers to connect any data source with a K2 SmartObjects.  During the development process, debugging is useful to troubleshoot your service broker’s code.  In the blog post we show how you can debug a custom K2 service Broker by adding a break point in Visual Studio and attaching to the K2 HostServer process.

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

Step 1:
Deploy the dll’s for the service broker and make sure the dll’s version must be same in K2 Service broker folder (C:Program Files (x86)K2 blackpearlServiceBroker) or else debug breakpoint won’t hit while debugging. Register service type and create a Service Instance and a Smartobject out of Custom service broker.

Step 2:
Provide a proper debug breakpoint on the service broker code.

K2 Service Broker debugging

1 – K2 Service Broker Code

Step 3:
Go to Tools on task bar of VS and Click on attach to process

2 - Attach to K2 Host Server

2 – Attach to K2 Host Server

Step 4:
An Attach to process box pops up. Check “Show processes from all users” checkbox and select
K2HostServer.exe process and click on attach.

3 - Attach to K2 Host Server

3 – Attach to K2 Host Server

Step 5:
Click on attach for the Attach Security Warning

4 - Attach to K2 Host Server

4 – Attach to K2 Host Server

Step 6:
Execute your Smartobject method which you created from your deployed service broker
with proper inputs.

5 - Hit the K2 Service Broker Runtime

5 – Hit the K2 Service Broker Runtime

Step 7:
As a result, you can see the breakpoint hits and you can continue with debugging.

6 - Hit the breakpoint

6 – Hit the breakpoint

Need further technical advice or support?