We are looking to implement activiti 5.11 , I have a use case that I am not sure how to implement in activiti.
We need to schedule recurrent visits by a nurse to visit a patient at home, this may take place over a 30 day period for example. We also need to send multiple reminders to the nurse to submit the notes for each visit before transitioning to the next activity that requires the nurse to submit a missed visit report if the reminders are ignored.
The expected flow is that multiple instances are created and the timer for each instance should expire at different times, each triggering a separate escalation task based on whether the nurse submitted her notes before the timers expire .So, there might be five visits scheduled but escalation required for just two visits.
I set this up using the timecycle tag of timerevent definition with the intent that the escalation task is created every time the cycle is invoked.
Currently, the activity is set as multi-instance and the number of instances is passed as a process variable.
The test currently sets the number of requested instances at 5, and the number of instances are correctly created.
My expectation is that a timer is created for each created instance and that a job is created for each instance.
When I run the test, I see that there is just one job in the db rather than five jobs for each of the created instances.The job runs once and the test ends.
I am new to activiti after working with jbpm 3 for a number of years, what I would like to know is if my projected workflow is possible with activiti or whether it is possible to work directly with the Engine API to create the multiple instances myself and create the jobs as needed.
My diagram ,bpm20.xml file and test case are below.
I am not able to upload any attachments to this post, because I am getting errors when I try to do so,so, I cant provide the diagram
It's not fully clear to me what the exact requirements are, but it sounds like the multi instance should not be defined on a user task but on a sub process. The sub process then contains a user task with a boundary timer on it. Then you get for example 5 user tasks with a boundary timer job for every 5 of them.
Following on from the last question, the multi-instance sub processes create the multiple tasks, but only one timer is created. I checked the database and job count variable, just one timer is created even though there are five tasks created.