Hi folks,
I’m having occasionally this exception thrown:
org.bonitasoft.connectors.scripting.GroovyConnector - Exception : Exception while evaluating expression
I set up a Groovy script connector to retrieve user details using the code as below:
import org.ow2.bonita.util.AccessorUtil;
AccessorUtil.getIdentityAPI().getUser(createdBy).getEmail();
where “createdBy” is a global variable in text as workflow starts.
I’m launching simultaneously several workflow at a time (5 started over 30 sec.) for testing. Only one got exception thrown. Each time the global variable “createdBy” has the same valid value.
This is what I got as cause of error:
java.lang.IllegalStateException: RESTUser has not been set up using setUser(String user)!Problem may be:
- you did not inform the REST user in the jass file (e.g. adding de option: restUser=“restuser”)
at org.ow2.bonita.identity.auth.RESTUserOwner.getUser(SourceFile:49)
at org.ow2.bonita.facade.interceptor.ClientRemoteAPIInterceptor.invoke(SourceFile:69)
What does that mean? How can the exception get thrown with the same scenario? Can I improve my code? Any idea is welcome.
Thanks by advance.