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.
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.
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:
R4/2016-03-11T12:13/PT5M
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.