* @return created role instance
* @throws ObjectNotFoundException
* - if model or role template with given id wasn't found
*/
public IRoleInstanceMetaInfo createRoleInstance(String modelId, String roleTemplateId) throws ObjectNotFoundException {
IRoleMetaInfo roleMetaInfo = roleService.getRole(modelId, roleTemplateId);
if (roleMetaInfo == null) {
throw new ObjectNotFoundException(MessageFormat.format("Can''t find role template with id {0} in the model {1}.", roleTemplateId, modelId), roleTemplateId); //$NON-NLS-1$
}
return createRoleInstance(roleMetaInfo);
}