Detect User Leaving the Browser tab

Certified Associate Developer

Hello,

I would like to know if there's a way to detect the User abandoning a session.

The issue is that there are User Input Tasks that I lock to specific users when they accept them.

I have a problem with the case where the User exits the form not by clicking the "EXIT" button, but by just closing the browser tab, which leaves the process running until timeout and the task remains locked.

Is there a way, other than the timer, to determine whether the User had abandoned a session on a form?

Thank you.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    No. You cannot detect when the user runs away. This is why Appian uses the "Start Form" concept which starts the process only after submit. And a real task in a process should probably stay with the user.

  • +1
    Certified Lead Developer

    Four things you can do:

    1.  Set up "Tasks" to really be flagging variables in DB that cause user to be able to start new processes, say from their "My Tasks" list in their landing page.  These start up PMs that get all the parameters they need from a DB query, and they start with a Start Form.  All the functionality of Tasks without the hanging processes.  No. 1 pick of most teams I've been on.

    2.  Avoid quick tasks.  If the user leaves, they won't ever be able to get back in, ever.  Then you have to wait for the timeout.  Without quick tasks, user will see the task in their list still not done and go back in and finish it.

    3.  Make the timeouts generous enough, but not too generous.  Shorten timeouts.  Make processes hang as little as possible.

    4. Maybe, just maybe, there's a way to set up shorter timer that doesn't kill abandoned process but reassigns task to the whole group of assignees again?  If the original person wants to go back and finish they can, but if not someone else can finish it?  IDK how to do that, if I'm honest, but I may look into that as an approach.

  • 0
    Certified Lead Developer
    in reply to Dave Lewis
    Set up "Tasks" to really be flagging variables in DB that cause user to be able to start new processes

    I've done this approach before and I like it, though it requires dedication to the concept, and real agility with respect to DB and SAIL skills (IMHO).

    Avoid quick tasks.  If the user leaves, they won't ever be able to get back in, ever.

    I almost always use Quick Tasks for the first node of a Related Action (if I didn't want to use a Start Form anyway), and almost never for any other reasons, because of the things you say.  I typically set them up with long timeouts (long enough that they won't be hurt by wandering off to the bathroom or a lunch break and coming back).  But this implies no extra "locking" has taken place, other than the task assignment.  Obviously that severely complicates this issue.

    Maybe, just maybe, there's a way to set up shorter timer that doesn't kill abandoned process but reassigns task to the whole group of assignees again?

    I believe I've done this before - the approach was somewhat more complicated than the usual setup but nothing really unreasonable.  If I can remember the particulars, I'll edit this comment and include the methodology (it was an old project.)

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    This is my current approach, actually - one thing you said that might help is for the timeout to go to the subprocess that unlocks tasks and reassigns the task back to the proper group.