I have a workflow for credit requests from customers. The last stage of the workflow is a client event where the user has to confirm that the customer has made a claim (requests are raised when there's an issue, investigated and then only paid if the customer claims). At this stage the workflow is 'pending'. Customers can make a claim for anything that happened up to two years ago.
My question is that since there will be a lot of requests in the 'pending' stage (assume about 2000 process instances that complete, 500 left in pending state per year), what is the best way to implement this sort of workflow?
I currently have one workflow process for the whole thing. This means there will be a lot of pending requests in the worklist and probably make K2 slow to a crawl.
Alternatively I could have two workflows, whereby the first ends when the request goes into the pending state, and then the second one starts when the customer claims.
The workflow is integrated with a Winforms app. The issue I have with the second option is that this would break down the abstraction with the workflow and mean the application will need more knowledge of the workflow process in order to deal with the two workflows. Currently I have a toolbar in the app which queries K2 to get the current actions for the user and builds a menu of their approval options, so the app doesn't need any knowledge of what the workflow is doing.
I'm also wondering exactly what affect all the pending requests would have on K2 performance? I think it will be fine on the SQL side of things, so it's more the time it takes to retrieve the user's worklist/full worklist that I'm concerned with. I'd use the WorklistCriteria from the API to allow the user to only get pending items or non-pending items, so is that likely to get around any performance problems?
I can test all this by witing some code to kick off a few thousand process instances, but thought it more sensible to gather some advice on best practices first. :)