Skip to main content

I'm trying to create a workflow for a user that wants to automate a review process. Our users (and IT administrators) are already familiar with SharePoint and one of the priorities is to make updating the forms, etc. updateable by the business process owners, so our idea is to use K2 as minimally as possible and allow the business users to create their own forms in InfoPath and use SharePoint document sets to store scanned documents as part of their process. Here's the breakdown...

 

  1. Have one list in SharePoint that will store the listing of locations with contact information and the date of the next audit review.
  2. Have a document library in SharePoint that will have document sets for each audit review instance.
  3. A K2 workflow automatically creates a new document set on the indicated audit review date and emails the contacts stored in the list. Note: we don't plan to use a task in K2
  4. K2 then updates the list to indicate the next audit review (3-6 months in the future) and waits until then to repeat step 3 and return to step 4.

I know how to do this using SharePoint Designer, but we'd like to use K2 so we don't end up with a bunch of long running SPD workflows (bad practice).  I'm stuck though because I can't figure out how to put in a "wait until ldate]" in the K2 workflow. I saw some other posts indicating that I need to use a start rule on a step, but I can't find that in any of my screens. How can I do this?

These scenarios generally aren't optimal use of K2. You still have what could be considered long running processes, you just have shifted the behavior out of SharePoint into K2.

 

That disclaimer being said, you won't find a date related start rule on the process itself. If you go into a K2 thick client design tool such as K2 Studio or K2 for Visual Studio and right click on the "Start" activity, you will have access to enable a start rule for the process that is essentially code. Unlike activity start rules that have a nice UI around them, the process start rule is code based.

 

Also, the process start rule doesn't have a concept of time as it ultimately always evaluates to a true or false. The process starts or it doesn't. You may need to write some sort of scheduling mechanism to allow you to queue up work in something like a Smartbox and then kick off a k2 workflow that does something with that information and potentially IPCs to start the processes that are supposed to do the work.

 

One additional question I have is how do you intend to start the first K2 process? You mention a time basis for subsequent processes, but it wasn't clear how you were going to start the very first process. SharePoint Event Receiver? If you are in a high volume environment, I would be careful about what even receiver was used to avoid unecessary traffic to the K2 server. Even if a process isn't started, event receivers can still create traffic to the K2 server.

 

Please be wary of implementing any polling scenarios, and if you do ENSURE that you reach an asynchronous event in K2 so the state of the process will save to the database and not continue to grow in memory consuming resources and keeping a thread tied up.

 

Hopefully this gives you some food for thought.


Thanks for this. What I'm probably going to end up doing is using SP's document retention functionalityon the location/contact info list to launch a SPD workflow that will create the document set and update the date in the list for the next audit. This will probably go over a bit better since we're much more familiar with the tools available in SP.


Reply