I have to get user metadata for an application im building, how can you get it?
I found some answers, but they involver User.getMetadata() which doesnt seem to exist in Bonita 6.1
I have to get user metadata for an application im building, how can you get it?
I found some answers, but they involver User.getMetadata() which doesnt seem to exist in Bonita 6.1
Hi Alonso,
It depends exactly what informaion you want about a user. You can use getUserWithProffessionalDetails to get contact infrmation such as the email address. Otheriwise, you need to use getUser.
HTH,
Chris
Here is an extract of what I do (I have just one metadata).
Hope this helps.
Fred
import org.ow2.bonita.facade.identity.impl.ProfileMetadataImpl;
// Get metadata of user
Map<ProfileMetadataImpl, String> userMetadata = userInfo.getMetadata();
userMetadataByName = [:]
userMetadata.each{ key, value -> userMetadataByName.put(key.getName(), value) }
if (userMetadataByName.get(the_name_of_the_metadata_your_are_looking_for))
return "what_you_want_when_found";
return "what_you_want_when_not_found";
Hi/Hola Alonso,
In this answer you have the way to do it / Aquí encontraras la respuesta
http://community.bonitasoft.com//answers/crear-nueva-variable-de-metadatos-de-usuarios
Cheers