-
1. Re: JBPM IDentity
mailinator Jul 24, 2007 10:56 AM (in response to mailinator)Hi,
don't you understand my question ?
if so, feel free to ask for pointers or more informations.
Regards,
O.M. -
2. Re: JBPM IDentity
cheets Jul 25, 2007 2:25 AM (in response to mailinator)Hi O.M,
Could you please clarify whether you wish to use JBPM identity component ( ie, ur user-role information is stored in jbpm tables) to control ur user permissions and roles, or a separate system which has the user-role data? -
3. Re: JBPM IDentity
mailinator Jul 25, 2007 11:46 AM (in response to mailinator)Hi,
thanks for your reply.
I'm using the jbpm tables.
Regards,
O.M. -
4. Re: JBPM IDentity
cheets Jul 27, 2007 12:29 AM (in response to mailinator)Sorry OM, i myself dont know how to add users to existing jbpm tables for identity component,
had it been using ur custom tables, i could have helped you out ;)
goodluck! -
5. Re: JBPM IDentity
cheets Jul 27, 2007 3:09 AM (in response to mailinator)I just noticed at http://wiki.jboss.org/wiki/Wiki.jsp?page=JbpmGettingStarted towards the end, a new user is added by executing SQL on the DB itself. So my guess is that the user creation has to be implemented using a self-created application. I might be wrong, i hope somebody who knows more about it can elaborate on this!
-
6. Re: JBPM IDentity
mailinator Jul 27, 2007 9:29 AM (in response to mailinator)Hi cheets,
thanks for your help.
Can you elaborate about your solution (table, db, logic ...)?
in fact i can choose another way of doing it if its easier (using the jbpm identity module is not mandatory in my app).
Regards,
O.M. -
7. Re: JBPM IDentity
msandoz Jul 29, 2007 5:18 PM (in response to mailinator)in the jbpm4jsf project theres an example of how to use the identity component
jbpm.3/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action
also in the test code of the identity component there's more:
jbpm.3/identity/src/test/java/org/jbpm/identity/hibernate -
8. Re: JBPM IDentity
cheets Jul 31, 2007 2:07 AM (in response to mailinator)hi OM,
in order to use ur own tables for user mgmnt,
u need to implement AssignmentHandler urself, and use it as:<task-node name="TASK1"> <task name="TASK1"> <assignment class="a.b.c.d.TaskAssignmentHandler"/> </task> <transition name="" to="NEXT_NODE"></transition> </task-node>
the class itself would be something like this:public class TaskAssignmentHandler implements AssignmentHandler{ private static final long serialVersionUID = 1L; public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception { String taskName = executionContext.getTaskInstance().getTask().getName(); long id = executionContext.getProcessInstance().getId(); //GET POOLED ACTORS AS STRING[] HERE AND ASSIGN. String pooledActors = util.getPooledActorsForTask(taskName); //util is a class i have created to //interact with my tables, and return the pooled actors for the given taskname. //it contains a mapping for taskname-user role, and based on user role, //it returns a comma-separated string of all users in that role. if( pooledActors != null ){ log.debug(" Assigning task ="+taskName+" to group ="+pooledActors); assignable.setPooledActors(pooledActors.split(",")); } else{ System.out.println("COULD NOT ASSIGN POOL TO TASK"); } //u can also set the actorId here explicitly, i am doing it in another class as: /*TaskInstance task = jbpmContext.getTaskInstanceForUpdate (taskId.longValue()); task.setActorId(actorId); jbpmContext.save(task); */ } }
that's it, u r ready to use ur user tables with jbpm now! :)
(at least, this works for me ;) )
HTH..
:) -
9. Re: JBPM IDentity
mailinator Jul 31, 2007 3:11 AM (in response to mailinator)Hi,
okay
thanks A LOT for your help.
Best thoughts,
O.M. -
10. Re: JBPM IDentity
kukeltje Jul 31, 2007 4:13 AM (in response to mailinator)Guys.... lots of examples on these topics are in the source... just look at the testcases....
Reminder: source is part of the 'docs'... -
11. Re: JBPM IDentity
mailinator Jul 31, 2007 4:18 AM (in response to mailinator)Hi ronald,
thanks for your advice.
Look at my other post about commits problems.
If you know where in the docs i can find the solution feel free to point :)
Regards,
O.M.