This content has been marked as final.
Show 2 replies
-
1. Re: Using my own identity database
lfelser Oct 6, 2006 12:08 AM (in response to bagrehc)I have a similar question to this one.
The starters documentation (which is great, by the way) says "JBoss jBPM has an identity module that has the concepts of users, groups, and memberships. This information is stored in the database that JBoss jBPM uses by default, but you can change it to use LDAP or a 3rd party identity solution."
I want to get user info from a module that talks to our Active Directory, but I'm unclear on how to do this, where to hook it in, etc.
Thanks for any help.
Larry -
2. Re: Using my own identity database
bagrehc Oct 6, 2006 3:38 PM (in response to bagrehc)Hi Larry,
after search a lot, I found something to solve our problem, but I think it's missing something else.
well I discover that you have to create an ExpressionAssignmentHandler subclass, and override the "getExpressionSession()" method as following:public class MyEAHandler extends ExpressionAssignmentHandler{ protected ExpressionSession getExpressionSession() { JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext(); if (jbpmContext==null) { throw new RuntimeException("no active JbpmContext for resolving assignment expression'"+expression+"'"); } //HERE IS WHAT YOU HAVE TO CHANGE return new IdentitySession(jbpmContext.getSession()); } }
So in the place where i commented in the code, above, you have to return your own object that implements ExpressionSession. ( up to here ok, :))
But these are the methods that you have to implement:public Group getGroupByName(String groupName); public User getUserByName(String userName);
Thus, here is the point, the "Group" and "User" are entities of the default Identity component and I don't know what to do.
Maybe I have to make my own "User" and "Group" entities extend the classes above, but I think it isn't a good way and may have another way to do that.
I you (Larry) or someone else find something new that could help us, please post here.
thanx