Processes can have multiple underlying Tasks and the Stage of the Process should be reflected from their related tasks. If a process has related open tasks then it should stays open or if a process is cancelled the all the underlying open tasks should get cancelled.
To implement the aforementioned mechanism, we have added new actions when a user changes the process stage to "Completed" or "Cancelled".
Completing a Process
In a scenario, you want to complete a process without completing all the underlying tasks.
When you go to a Process and changes its stage to "Completed", then all the tasks (including ad hoc) under the process gets completed. If there is any Open Task then an error message will be displayed saying "The process cannot be completed because underlying tasks are not complete".
This will ensure that you didn't miss any important task while completing the process & there won't be any underlying open tasks for a completed process.
Cancelling a Process
In a scenario, you want to cancel a process without deleting, cancelling, or completing all the underlying tasks and without notifying any user.
When you change the stage of a process to "Cancelled", then all the underlying tasks (including ad hoc) will get cancelled. Any completed task shouldn't be affected by this. There shouldn't be any Email alerts sent out to other team members or admin about the cancellation of tasks & process. Once the process and related tasks are Cancelled, there will not be any further action (creating a new task or process).
This will help you to cancel a process without wasting time on underlying tasks and will ensure that all the tasks for a cancelled process are cancelled as well.