Using K2 for controlling page flow/branching in web apps

  • 1 March 2005
  • 1 reply
  • 0 views

Badge +8
You could use the K2ROM to finish the client event, but ensure that the client event is finished Synchronously.

This can be done by setting the "Sync" parameter to true. You can then just open the user's Worklist again and filter by this particular Process' ID. You can then redirect to the new page as dictated by the process.

The following post is a very good write-up on this:
http://forum.k2workflow.com/viewtopic.php?t=2651

1 reply

Badge +1
hi,

I'm new to K2 and seek advice in building a simple prototype that shows how to redirect to certain pages based on rules and activities defined in K2.

Here's the very simplistic example: Based on user input (age) on an AgeVerification page, the system should redirect to two different pages (>=X years or <X years). I have setup the workflow in K2Studio with corresponding activities and line rules.

AgeVerification (activity)
--- Eligible ----> NextActivity (activity)
--- Ineligible ---> Exit (activity)

The eligible/ineligible Line Rules evaluate the DataField Age, which is bound to a SmartControl in the AgeVerification Page. Each activity is bound to a aspx page in the web app.

How do I redirect to either NextActivity(.aspx ) or Exit(.aspx). In other words, from within the Code Behind of the AgeVerification page (in PostBack?!), how can I access the result of the Line Rules, read the next Activity and find its aspx page ?

Perhaps my thinking is flawed (wouldn't be the first time). Perhaps there's a better, simpler way? Perhaps K2 is not build to model and control page flows?

has anyone build such a scenario and can point me to examples? Thanks in advance for any advice?

Markus

Reply