Skip to Content

Few times we have come across requirement to have BPM process scheduled. So, that will run at predefined interval. We couldn’t find any standard way of doing it than having it triggered from PI/ECC, some scheduling tools or by some other process (or perhaps using Java Schedular API). But in the unavailability of any other system and scheduling tools, we have to do it in BPM itself.

We have tried it in BPM by providing a trigger from within the same process. This is a very simple variance in modelling and should be straightforward to implement. The scheduling is done by taking use of “Activation time” attribute of human activity. The parameter (desired time interval) for task activation is supplied to the process Start trigger.

Taken a simple scenario where particular human task is to be executed a day after 1st process on continual basis.

1. Create a single human activity process with message trigger for START that accepts a single string attribute. The input parameter of the message is used to provide desired activation time for the task.

Scheduler1.JPG

1.      

DO_Activate is the process context attribute that stores the activation time value passed to Start event.

Scheduler1.5.JPG

2. Configure the activation time property of the human activity as shown below.

2.   Scheduler2.JPG

3. Create an automated activity following the above human activity. The interface for this activity is the same message interface that is used in the trigger for Start event. The input parameter for this message interface will hold the same value that is used in activation time for the task. As its a static value in the example, it’s the same that is initially passed to the DO_Activate. Hence, same is mapped to input parameters of the interface. (If we want to have next process dynamically started, we can use output of human activity as an input to automated activity which will have dynamic activation time value)

Scheduler3.JPG

3.      

4. Build and deploy the process. Assign provider system to the service group that provides configuration to the message interface used in the process.

5. Start the process from the process repository with some initial activation value. (in example its 1 )

4.    Scheduler4.JPG  

6. Thought the process seems to have started, the task is still inactive and get activated only after give activation value.

5.     Scheduler5.JPG 

Once the task is processed, the process will restart itself with the same activation value and continues until cancelled.

In the cases of automated activities, instead of activation time, we can perhaps use Intermediate Timer event to have desirable delay in the processes.

As we are using same message interface in automated activity that is used in the Start trigger, there could be some impact. And you can see that in process editor in the form of nice yellow icon.

However, since the time we implemented this, we haven’t come across any problem. But it would be nice if anyone could comment on potential impact of this.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply