[jboss-user] [JBoss jBPM] - Re: Using my own identity database

bagrehc do-not-reply at jboss.com
Fri Oct 6 15:38:26 EDT 2006


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 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976677#3976677

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976677



More information about the jboss-user mailing list