11 Replies Latest reply on Jul 31, 2007 4:18 AM by mailinator

    JBPM IDentity

    mailinator Novice

      my question today is about jbpm identity.

      What i want to knwo is : when are we using that jbpm identity.
      I means in what im working for, the users identify themselvers with an SSO system.
      After that they can make demands and those demands will activate tasks.

      Those tasks appears in tasklist of people on the organisation.
      My question : how can i control identity of those people working on the tasks with jbpm identity ? I have the 3 tables (user group and membership) in my DB but i cant see the relation with my wondering.

      Does someone know more about it ?

      Best thoughts,


        • 1. Re: JBPM IDentity
          mailinator Novice


          don't you understand my question ?

          if so, feel free to ask for pointers or more informations.



          • 2. Re: JBPM IDentity
            Sheetal Gupta Newbie

            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 Novice

              thanks for your reply.
              I'm using the jbpm tables.



              • 4. Re: JBPM IDentity
                Sheetal Gupta Newbie

                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 ;)

                • 5. Re: JBPM IDentity
                  Sheetal Gupta Newbie

                  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 Novice

                    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).



                    • 7. Re: JBPM IDentity
                      Matthew Sandoz Newbie

                      in the jbpm4jsf project theres an example of how to use the identity component

                      also in the test code of the identity component there's more:


                      • 8. Re: JBPM IDentity
                        Sheetal Gupta Newbie

                        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"/>
                        <transition name="" to="NEXT_NODE"></transition>

                        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);
                        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
                         jbpmContext.save(task); */

                        that's it, u r ready to use ur user tables with jbpm now! :)
                        (at least, this works for me ;) )

                        • 9. Re: JBPM IDentity
                          mailinator Novice



                          thanks A LOT for your help.

                          Best thoughts,


                          • 10. Re: JBPM IDentity
                            Ronald van Kuijk Master

                            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 Novice

                              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 :)