Hi Maciej ,
UserGroupCallbackManager.getInstance().setCallback(userGroupCallback);
TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
taskService.setUserinfo(userInfo);
Both the userGroupCallback and userInfo had beed configured in code .