how to do To get Users Manager Name using groovy script and can we access the API in community edition??

am trying to do particular task am define some contract and designed the UI.I want to get API values into Form .
so am used below coding in groovy script

${import org.ow2.bonita.facade.IdentityAPI;
import org.ow2.bonita.facade.identity.User;
IdentityAPI api = apiAccessor.getIdentityAPI();
User user = api.findUserByUserName(processInstance.getStartedBy());
User manager1 = api.getUserByUUID(user.getManagerUUID());

return manager1.username;
}
→ am not getting the value into UI Form.

Am using that code in bussiness variable groovy script and 7.3 vertion.

Where are you putting this code? What version of bonitasoft are you using?