For each user that logs in to the application you should create a task client and disconnect it when the users logs out. That will be my first option.
Reply to this message by going to Community
Start a new discussion in jBPM at Community