If you attempt to switch between modules while a task is executing, you are prompted with the following message:
Leaving this page will cancel any tasks in progress. Are you sure you want to continue?
If you tap Yes, the task is aborted and you are taken to the module you selected. If you tap No, you will remain in Workflow and the task will continue to execute.