Using K2 for controlling page flow/branching in web apps

  • 1 March 2005
  • 1 reply
  • 2 views

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

1 reply

Badge +8
I suspect it may be simpler just to do a response.redirect on the server side to redirect the user to a particular page...

Reply