Im trying to get FirstName, LastName and Password from a current user. Im using LoggedUserId.value to get his ID. but only worked one time. In Bonita Engine Log appers this:
“depends on loggedUserId is neither defined in the script nor in dependencies.”
or sometimes appears:.
“groovy.lang.MissingPropertyException: No such property: loggedUserId for class: Script1”.
import org.bonitasoft.engine.api.IdentityAPI;
import org.bonitasoft.engine.identity.User;
String firstName = apiAccessor.getIdentityAPI().getUser(loggedUserId.value).getFirstName();
String lastName = apiAccessor.getIdentityAPI().getUser(loggedUserId.value).getLastName();
String tia = apiAccessor.getIdentityAPI().getUser(loggedUserId.value).getPassword();
stuSubs.add(firstName+" “+lastName+”, TIA:"+tia);
//stuSubs its a java.util.List
How to use loggedUserId , stopping these errors?