replied on August 31, 2023
You can use Signal Catch Events and/or Timer Catch Events
For time-based expiration, attach a Timer Catch Event directly to the user task and set it to interrupt the activity so the task will end automatically.
For signal events, you create a signal throw and name a signal, then attach a signal catch to the user tasks so it will react whenever that signal is thrown.
The Signal Event is more important than the Timer event because if the leave request is approved or rejected, you want that modification task to go away immediately otherwise it would keep the instance active until the timer elapses.
If you don't have a time limit on modifications, for example if they can make changes at any point up until the request is approved/rejected, then you don't really need the timer at all.
In the following example
- User submits the form
- Approval and Modify tasks are created in parallel
- If time expires, or the approval is completed, the modify task is cancelled
- If a modification is submitted, the existing approval is cancelled and a new approval task is created with the updated values

Just make sure that you configure your timer/signal catches to interrupt the attached task.