Automatically triggering the start of processes

  • 18 June 2007
  • 7 replies
  • 0 views

Badge +1

Hi,


I need to automatically start up a number of instances of a workflow process at the end of each financial quarter. Is there anyway to configure K2 to do start up processes based on a time trigger rather than a user starting it off? The idea is to escalate emails as reminders to users to begin certain tasks.


 Thanks,


 Steve


7 replies

Badge +10

Hi Steve


There are probably a number of different approaches on how to solve this problem using SQL triggers and/or event, some of task scheduler or another mechanism.


However, within K2 you could have a parent process with an activity that loops back on itself.  A start rule can be defined on the activity which basically says that that activity will start after a certain time has elapsed or to start on a certain date which may be retrieved from an external source and evaluated in a process datafield.


At the end of the quarter the Start Rule condition is satisfied and the workflow would flow down a branch to another activity which calls an IPC (Inter process communications event) to initiate a child process which would then send the necessary notifications. 


At the same time that the workflow flows down to call the child process it would also loop back on itself and the parent process would then sit and wait for the new Start Rule date to evaluate to true.  This new start date could have been set or retrieved as the last event in the same activity as the Start Rule is applied.


The very first "End of Quarter" process would need to be initated manually whether its through a form or programatically but after that it should run on its own.


I'll try to post a similar type of process diagram example to try and make this explanation a bit clearer.  But as I said at the beginning there are probably a few solutions to this problem.


Automatically trigger a process based on a start rule


 Regards,


Tim


 

Badge +1

Thanks Tim, that's very helpful


 Steve

Badge +3

Hey guys,


I was trying this approach in K2 blackpearl, but I am having a tough time drawing a line from an activity that loops back on itself.  Could somebody let me know if this is possible in K2 blackpearl?


 


Thanks,


 


Brian

Badge +5

Hi Brian,


It is definately possible. The only catch is that you have to select the Line tool from the toolbox and then drag it using the left mouse button.


Kind Regards,


Gert

Badge +3
Thanks Gert!  Worked like a charm.
Userlevel 1
Badge +8
Another approach could be to use the Event Bus to schedule a process to be kicked off on a schedule. There is an example of how to register events in the event bus in the K2 Developer SDK.
Badge +4

Hi,

 

This is the URL which helps in scheduling but how to attach a process to the scheduling instance.

https://help.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm#Scheduler.html

 

Regards,

Asad Naeem

Reply