Query the Assignee/responsible for a previous task

Hi, Im trying to get the historic user tasks assignee but I can not do it. Im using the following method to list all the activities in a specific process:

historyService.createHistoricActivityInstanceQuery()

but when I get the ‘getAssignee’ method it comes null or void.

Is there any way to do that?

    HistoryService historyService = processEngine.getHistoryService();

    List<HistoricActivityInstance> activities =
            historyService
                    .createHistoricActivityInstanceQuery()
                    .processInstanceId(processId)
                    .orderByHistoricActivityInstanceStartTime()
                    .asc()
                    .list();

    for (HistoricActivityInstance activity : activities) {
    	
        	Actividad oActividad = new Actividad();
        	oActividad.setId(activity.getAssignee());
        	oActividad.setNombre(activity.getActivityName());

}

Thanks.

Does anybody have this same problem?

Looking in the database ACT_HI_TASKINST table, I realize the column Assignee is null in every row.

I’d appreciate any help.

If you’ve set an assignee on the task, that shouldn’t be the case. I tested it with a simple task + assignee here and the assignee is stored in the database and can be queried through the API. Can you add your process model?