IAttributeMetaInfo am = perm2.getAttribute("uid");
param.setAttributeName(am.getId());
pm.addPermissionParameter(param);
IRoleInstanceMetaInfo rm = roleInstService.getRoleInstanceImpl("com.jresearchsoft.flexess.examples.orders");
rm.setName("customer");
rm.setRoleId("customer_role");
rm = roleInstService.saveRoleInstance(rm);
id2 = rm.getId();
pm.setRoleInstance(rm);
pm = permissionService.savePermissionInstance(pm);
}