I am trying to create a following scenario:
- a task gets assigned to the user to complete
- a task get created for the manager to reassign the user task if necessary (don t ask, they wanted it this way)
- an email reminder neeeds to be sent when the task is nearing a due date
So, I thought of using EventHandlingScope for this:
- I am listening for a task change on the main branch of eventhandlingscope activity,
- listening to reassign task change in event driven branch - and if reassign task gets activated, reassign the first task to the user specified
- in another event driven branch use a delay activity and check periodically if user assigned task is nearing a due date and send an email reminder
So, I though eventhandlingscope would be good for this, and it mostly is, except for the problem with the DelayActivity.
If I put a delay activity in one of the Event Handlers branches it fires once, but not more. Whereas if I put an onTaskChange activity there it fires everytime somebody changes that task.
So, is this the expected behaviour? Why doesn t DelayActivity loop? How could I do this differently? My thought is with a CAG, but this looks a bit more complex...
Update: the problem with CAG is that the whole thing blocks until delay activity fires, even if the onChange event fired. This makes sense, but makes it a bit trickier to use.
Update2: I ve reworded the text to make it hopefully clearer