we're currently developing a business application platform that consists of several independent programs.
When a user performs an action, a backgroundjob will be started. At the end of that job, the user will get a notification (similar to facebook, etc). The notification is availably system-wide, so in all applications. This notification leads him to where he started the action (because the user might be in a total different part of the application OR in a total different application at the time he gets the notification.
My question now is: how should the link of the notification be treated?
If the target application IS running in the current tab (we know the URL so we know what program is active)
--> open the link in the current tab (user would get a security question if he is currently editing something)
If the target application IS NOT running in the current tab
--> open the link in a new tab always.
Now this sounds not so bad per se, but imagine the following situation.
Tab 1: Application A Tab 2: Application B
User performs an action in Application A (Tab1) that runs in the background, then switches to Application B (Tab2) and continues his work there. Once the Backgroundjob from A finishes, he gets the notification (in every open tab). He reads the notification and decides to click it. Computer recognizes that the user is currently running Application B and needs a link to Application A and therefore opens a new tab with the target link.
Now the user has 3 Tabs:
Tab 1: Application A Tab 2: Application B Tab 3: Application A (target link of notification)
Is this a good way to deal with links and where to open them?
It is an unfortunate fact that users will be working in several programs (tabs) at the same time. We want to make the usability as good as possible by reducing breaks in the flow / in usability. I have read many discussions here on ux.stackexchange, but did not really come across anything that would answer my question.
What's your opinion on that?