how to define autosteps

  • 7 February 2005
  • 2 replies
  • 0 views

Badge +1
I am new to K2 workflow and doing some POC....started working on k2 a week back.... I would like to know how to define a autostep as part of the business process. My business case needs to do a db check to decide which path to follow. for e.g. in travel request approval my business case needs to check a flag where it checks a table-column value to check if the travel request needs approval. if approval is not required the request is directly approved. and if the travel request needs approval it has to go for approval activity. On approval a mail is send to the originator.....


Thanks and Regards
Prasad

2 replies

Badge +2
Hi

To do this you would need to do two things:
1. Look up a value in the Db
2. Brach according to this value

Look up value in DB:
You have two options here. The first is to use a Sever Event and write code to connect to the DB and store the lookup value in a Process/Activity Data field. The second is to use the SQL Event Template. This template will allow you to browse to a Db and Table, and will prompt you for the action you need to perform.

How to branch based on process data:
You would need to set up your branch logic to look at a Process/Acivity Data field to follow an "Approval needed" or "No Approval needed" route. To do this you would have to go into your line rule properties and define the rule criteria. K2 will move down the lines that evaluate to true - this could be one or more lines according to your specifications.


Your process would thus start and proceed down a single path where the last Activity before the branch would be to look up the vaue in the DB. After this Activity, the process would branch to one of two Activities. Depending on your process design the two paths might converge at a later activity or continue down different paths until completion.


Hope this helps.
Emile
Badge +1
thanx emile...

Reply