As you realized:
a) one of the members of userGroup1 registers some information.
b) one of the members of userGroup2 makes a decision about that information which the decision has two options:
b-1) everything is fine and the process goes to ‘Notification’ userTask.
b-2) the member of the userGroup2 wants to edit the information registered by the member of userGroup1.
In this case, I want to assign the ‘Edit’ userTask only to the user who makes the decision to edit the information.
But I don’t know how.
I’ll be grateful if you guide me.
You could create a task listener that queries the history of the process instance for the task that was completed, this would give you the id of the user that completed the task, then you can put that into a process variable and use and expression on the assignee field to populate it.