One approach could be to copy SyncWSHumanTaskHandler (Jboss source) class and adding our logic to handle auto delegation. In this class method(executeWorkItem()) you are given with taskId, actorId, groupId details using which we can write the delegation logic.