Get all groups of a task ID's actor


I'm trying to find a way in groovy through which, I can get all the groups that are allowed to execute a task. I am trying to write a script at the "connector in" of a station that gets me this data. Even the actor's API takes processDefinitionId as an argument, and not taskId/activityId. I want the actors with respect to that instance, could you help me out?


Assign Task to Specific User

Hello, im trying to assign specific task on specific user accordingly. I already set actor in each lane of the diagram. But whenever i start the process, the tasks don't apply in every user that i've set previously in the lane. Which means user can run task from another user that doesn't belongs to. I followed every steps given in the documentation regarding to assigning task to user but the problem remains same here is the link (https://documentation.bonitasoft.com/bonita/7.9/define-who-can-do-what).