Collapse all process instances in only one instance

1
0
-1

Hi ,

I have a sub-process that inserts the users waiting for OHS Training session in a mysql database. And when it is available a new OHS training session the OHS trainer should send an email to all users waiting for OHS Training.

OHS TRAINING

"Waiting for OHS Training" --> Inserts users' data in the database; "Get Users Waiting" --> mysql connector that returns all emails of users waiting for training "New OHS Training Notification" --> shows a form with all users' emails , message, subject ... "Send OHS Training Notification" --> email connector , send an email to all users waiting.

My problem is that the OHS trainer will get as much process instances as the number of users that apply for OHS Training and I want that the trainer only gets one process instance that sends an email to all users inserted in the database.

In other words , I want that "New OHS Training Notification" and "Send OHS Training Notification" only have one instance, other wise, for each process instance that the OHS Trainer performs all users will receive an notification email.

If there are 10 users waiting , in my current version of this sub-process, the OHS Trainer will have 10 process instances, and the OHS Trainer will have to perform all of them and each user will receive 10 repetead emails when they only should receive one.

After those two tasks ("New OHS Training Notification" and "Send OHS Training Notification") all process instances should be available again.

Has anyone had a problem like this ? Or know how to fix it ?

Greetings, João

1 answer

1
0
-1

Hello João,

You could try splitting this into separate processes (which could be two pools in the same diagram). One option would be to create a process that is used to register people for training, putting their details into the database. You would see many instances of this, but they would only be "live" for a short time each. Then use a second process that the trainer uses to get the list of registered attendees, and trigger the email to the users. You could start this one on a schedule, or when you reach the minimum number of attendees for a training, or when the trainer wants it to run. Let us know how you get on!

Chris

Notifications