Hello Mohamed,
I understand what you want, what i dont understand when this action will be triggered.
How i said you could use a behavior this could check when task change to a specific status, for example wait to pending and in that moment the action will check if the person assignee to the task is in holiday and it will transfer task to the manager or supervisor, that is really easy with an action macro.
Regards,
Yonatan Sosa