if (willow_engine != null)
{
String username = (String) env.get(WorkflowClient.SECURITY_PRINCIPAL);
String password = (String) env.get(WorkflowClient.SECURITY_CREDENTIALS);
SessionManager manager = willow_engine.getSessionManager();
RealmDatabase realmDatabase = willow_engine.getRealmDatabase();
WorkflowParticipant participant = realmDatabase.authenticate(username, password);
if (participant == null)
{
throw new WorkflowException("login workflow engine unsuccessfully.username=" + username + ",password=" + password);
}
this.session = manager.createSession();