Skip to main content

I am creating a workflow to automate purchasing approval requests.

The approval process with depend on the value being approved, if the originator's approval limit is lower than purchase value, then it will go to manager for approval, the manager will then approve, but in some cases if even the manager approval limit is still not enough, then it will then go to the manager's manager to approve (until it reaches manager with sufficient approval limit).

 

How do I set up this rule so that K2 knows to keep escalating approval process until a manager with sufficient approval limits approves the purchase?

Thanks

So basically what you want is a workflow with multiple paths, and depending on the condition, the workflow can flow to one of the many paths?


 


If you are on K2 Five or higher, and is designing your workflow in Designer, you can look into using the Decision step to help you control the flow of your workflow.


 


If you are on K2 4.7 or lower, you can explore using Line rules to control the flow.


 


The problem with decision step and line rules is they can make it difficult to manage your workflow. And designing a workflow with multiple paths can cause your workflow to become too big.


 


From your description, it seems you are using the approval limit and purchase value to decide which manager to route the task to. Why not create a SQL stored procedure that takes in the approval limit and purchase value, then return the appropriate Manager's username? Then create a SmartObject to execute that stored procedure, and you can use that directly in your workflow. In your workflow, you can use that SmartObject to assign the destination user for the task. Your workflow will be easier to manage this way, and in the future if you want to change the underlying business logic, you can just update your SQL stored procedure.


 


I would also look into using the Certain Recipients, based on a rule. This is found on the Recipients tab on a Task in K2 Five:

 


Yeah CJack's solution works as well.


Reply