Skip to Content
Author's profile photo Abhijeet Mukkawar

Scheduling NW BPM Process

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.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Rajesh PS
      Rajesh PS

      Hello Abhijeet Mukkawar

      Thanks you very much for this blog.

       

      Also could you please share your valuable inputs/suggestions on below thread. Many thanks in advance.

      https://answers.sap.com/questions/12907416/how-to-collect-and-group-records-by-loop-count-in.html?childToView=12907504#comment-12907504