cancel
Showing results for 
Search instead for 
Did you mean: 

delegate usertasks at users absence

fellowtom
Champ in-the-making
Champ in-the-making
Hi all,

I have a question about task delegation. It's more about the way to do it, if ppl are on holidays or get ill. The last topic I found here about that problem was more than 1 year ago, but I think there is no API to handle it comfortable implement yet, isnt it?
So what should be the best way to solve this problem?

A )  I could create a HolidaysUserTask at the beginning of every process to define a representative user to which the tasks get delegated, if the date is reached. But I think this is pretty annoying.

B )  Currently there is no database of all users where holidays and illnesses are stored. Additionally the representative could be set here for each user. To interact with such a database should be the best way though.

C )  Add a lot of Users and Usergroups (not the best option for sensitive usertasks), which are also allowed to complete it

D )  Auto-delegate teh task at timerboundary events

If you have any additional ideas how to deal with that topic the best way, please share them with me Smiley Wink

With kind regards…
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
You could use, for example, a process that allows you to fill in who is replacing you when you're on holiday. and what time you're leaving and what time you'll be back. The process has intermediate timer-events and some service-tasks. The timers fire when the start-date is reached, querying all tasks assigned to user X and "delegating" or setting assignee to user Y. Same for end-time, where the assignee is reset.

The above will cover existing processes. For new processes, you'll have to use a slightly modified "assignment" model (use an expression ${assigneeBean.getAssigneeOrReplacement()} or use an assignmentListener on the task that checks if the chosen employee is currently available. If not, assign it to it's replacement (which is stored in another system/db possibly). By using a BPMNParseHandler, you can add that special "assignment" task-listener to all processes deployed in the engine without having to define the listener in all of your BPMN XML's.

fellowtom
Champ in-the-making
Champ in-the-making
Thanks for your quick and helpful reply. I think its a pretty good solution to define a new process which deals with the whole delgation instead of a task on every process. I neglected that solution somehow…So if a user logs in, he can start that new holidayprocess and everything will be handled for him. And if somebody gets ill its good to have that task listener to check in db if he is available. I will adopt your advices.

Thank you very much.

Greetings,
Tom

fellowtom
Champ in-the-making
Champ in-the-making
Hi again,

I came to one problem which I cant explain myself. I added candidateUsers to my Usertask in the bpmn.-file and want to check them in a UserTaskListener-Implementation with delegateTask.getCandidates(). But it is always empty. If I use delegateTask.addCandidateUser("Worker1"); before, it contains that 1 element. It just dont work by defining it in the process definition.

Any suggestions what I'm doing wrong?


[SOLVED]

I was using the Listener with assign event, instead of create.

Greetings,
Tom
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.