Updated routing to remove intermediate activity from history and create
a new task when routing to the final activity.