Conditional gateway on assignee

Is there a way to have a gateway condition based on the assignee which completes the task ?

Example :
HumanTask 1 completed by User X → HumanTask X
or
HumanTask 1 completed by User Y → HumanTask Y
or
HumanTask 1 completed by others than X or Y → end of process

Yes, this is possible. See --> Get assignee value after task is completed

You can use exclusive gateway for this scenario