-
1. Re: How to get JBPM identities in ESB?
sebastian.s Oct 27, 2009 3:06 PM (in response to xibalban)I don't know what you are trying to achieve. So please clarify. If you want to access jbpm's user management you would need to obtain a reference of the identity service:
http://docs.jboss.com/jbpm/v4/javadocs/org/jbpm/api/IdentityService.html
Afterwards you could use findUserById() or whatever.
HTH -
2. Re: How to get JBPM identities in ESB?
xibalban Oct 28, 2009 2:40 AM (in response to xibalban)I guess that identities listed with http://localhost:8080/jbpm-console/app/identities.jsf?view=users are stored in JBPM database of some sort? I would like to access that from a ESB process to get a user's email address.
-
3. Re: How to get JBPM identities in ESB?
sebastian.s Oct 28, 2009 2:58 AM (in response to xibalban)Are you talking about jBPM 3.x? I am using 4.x and I don't have a console url like this. And yes: The console of course uses/shows the jBPM users stored in database. Exception: You configured jBPM to use an alternative kind of source.
P.S.: If you want further assistance you need to be much clearer. You did not say a lot more than in your original post. -
4. Re: How to get JBPM identities in ESB?
xibalban Nov 2, 2009 1:02 AM (in response to xibalban)I'm sorry I wasn't clear enough. I'm new to this and couldn't describe it as well as I would have liked to. I solved it though. I'm using 3.x so I couldn't use identity service so I just did this:
private String getUserEmail(String userid) { JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(); JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); Session hbSession = jbpmContext.getSession(); Query query = hbSession.createSQLQuery("SELECT EMAIL_ FROM JBPM_ID_USER WHERE NAME_='" + userid + "'"); String emailAddress = (String) query.list().get(0); jbpmContext.close(); return emailAddress; }