This example shows how to delete a role from the organization.
Deleting a role does not delete the users who have that role. However, if the actor assignment for a process uses a role that is deleted, the users who had the role will no longer be able to perform tasks.
final IdentityAPI identityAPI = TenantAPIAccessor.getIdentityAPI(apiSession);
identityAPI.deleteRole(roleId);
identityAPI.deleteRole(roleId);