Creating a loop / modelling a service


I’m trying to model a service that continuously (in a loop) polls a mailbox and works with the received mails. The process has no user interaction and only consists of service tasks.

Something like the pizza example of bpm-mail:

All my tasks in the workflow are service tasks and I want to automatically start the process over again after a run is finished.

This is my current approach:

My model is indeed working, but I suspect this isn’t the right approach.
Maybe it is a better idea to start a new process instance with a service task at the end of currently running task and create a loop that way?

Please show me the right way to design such a “service” (loop) process.

Hi @tobof,

starting a new instance for every run definetly seems like the better idea.
For starting process-instances in specific intervals you can have a look at the timer start event. You could change your blank start event to a timer start event. There you can define a rule, in which intervals you want your instances to start.

The example from the documentation page is like this:


This example will start 4 instances, in 5 minute intervals, starting on 11th of March 2016, at 12:13

So for the process of your current approach set the timer as the start event rather than at the end.

Hope this helps


1 Like

Hi @tobof,

have a look at this (quite old) example:

Hope this helps, Ingo

1 Like

Another option without explicitly modelling / polling:

Wow amazing, thank you!

I’ve followed @Philipp_Ossler hint and it works like a charm so far!