I did spend some time reading the docs/api and 'Activiti in Action' ebook and found the corresponding mapping for my request,
Subtasks - using the ParentTaskId
event stream/discussions - using the Comments on Tasks or Process instance
Transfer and Reassign functionality - Using Delegation PENDING/RESOLVED
Creating standalone cases - Creating tasks without a Process instance
So I'm good on these questions.
But I'm still confused with back and forth between the process initiator and one of the task assignee downstream. Take the following vacation process request as example,
- Employee submits the number of days of vacation as part of StartFormData of 'Vacation Request' process
- A 'Decide' task (taskA) is assigned to the manager to make a decision on the vacation request.
- The manager should be able to 'Approve', 'Reject' or 'Request Edit' of the vacation days.
- On 'Request Edit' a task (taskB) should be assigned to the employee. The employee can change the days and the 'Decide' task should be assigned back to the 'Manager'
- And this back and forth can happen multiple times.
My confusion is what should happen when the Manager selects 'Request Edit',
- Should taskB be created as a dynamic 'Sub Task' of taskA
- Or should I model the taskB at design time and have some kind of loop connecting these two tasks.