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
06 June 2016

Passing parameters in URL using K2 workflow

Passing parameters in URL using K2 workflow

When configuring a K2 Client event, K2 allows you to configure a form that is displayed when the user clicks on a worklist item.  Sometimes it’s required to add an additional parameter to the querystring K2 created.  Often, this is an object identifier used to load a database record and this value is used as an identifier.

Configuring the client event to pass querysting information from the K2 designer to the K2 worklist form is as very simple.  The following steps are used to achieve this:

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

When you configure the Client Event action the first part of the wizard will ask you 2 things:

  1. The Task URL
  2. The Additional URL

The Task Item URL opens when the user clicks on the worklist item.  It’s important to configure this correctly to ensure the correct form open when the user clicks on a worklist item in order to action it.

Now, in this case we want to change the Task Item URL to add the serial number of the worklist item to the URL where it is later used to loan the correct worklist item.

Here is an example of the setup screen of the Client Event Wizard:

Passing parameters in URL using K2 workflow

How to use a parameter added to the Task Item URL?

The K2 SmartForm below gets the details from the URL defined in the Task Item URL and then passes it to the SN and IdeaId form parameters when the SmartForm initializes.  It’s up to you to use the parameter in the SmartForm to open the workflist item for example (SN is used in this case), or get the information from the database using a SmartObject Load() method passing in the IdeaId

Passing parameters in URL using K2 workflow

In summary

When loading a worklist item in K2, it is required to pass the serial number (SN) parameter to the SmartForm.  In addition, additional querysting parameters can also be passed in.  This is configured in the Task Item URL in the K2 Client Event Wizard and copied into the K2 SmartForm when the form initializes.

Need further technical advice or support?