this is a simple approach to handle holiday replacement using as many camunda ready-to-use utility as possible. Please see my blogpost for further details.
In this project you find a spring boot application. You can run it with
gradle bootRun from command line.
- go to camunda tasklist (user: demo | pw: demo) and start an instance of process Holiday Replacement. The default assignee will be user jack. Refresh tasklist. There should be a brand new task called Coordinator jack. You can also call
http://localhost:8081/tasklist?user=jackto receive this task in browser.
- open camunda cockpit and find the instance you started. Note that the assignee of the task is left empty, since only a candiate group was assigned.
- open camunda admin and go to Groups. There should be a group group_jack_coordinator in wich jack is the only member.
- Do another call (in browser)
http://localhost:8081/add?substitute=john&forUserId=jack&forRole=coordinatorand check the groups again in camunda admin. There still is group group_jack_coordinator now containing two users. User John was created on the fly meaning that John can now work on all of jacks task with this one configuration call. check
- Complete the task in cockpit. For simplification use user demo, claim the task and complete.
- Return back to camunda admin. Group and users are gone, since no more task is assigned to either of them.
Feel free to play around and comment on the post.