8 Replies Latest reply on Nov 27, 2009 4:21 AM by dejanmr

    JBPM 4.2 - Manage JBPM users - recommended way? How to use c

      We have custom user/role management for our applications. We are currently considering usage of JBPM4.2.

      What is the best practice on this? Or, at least, recommended way of handling JBPM users?

      Should we remap JBPM hibernate configurations, or our JPA mappings? Or, is it better to customize some classes?

      There is also simplest, but solution I would like to avoid - keep current user management unchanged, and update redundant JBPM tables on every change on our application.

        • 1. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u
          kukeltje

          Try searching for 'identity service' and things like
          'custom'. Creating your own identity service is the best way to approach this. No need to replicate data then.

          1 of 1 people found this helpful
          • 2. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u

            Thanks for the hint kukeltje,

            But, I could not make it work. I have EAR application, on jboss 5.1,a and JBPM service installed with provided ant. I have deployed my custom process, and custom jbpm.cfg.xml, and I can see on database they are stored in (what I believe are) proper blobs. When I start process, it all seem to be fine. But, it seems like my custom class is being ignored (

            taskService.findGroupTasks
            returns empty set, although it shouldn't), and debugging this I see my custom class is never been called, or even created.

            1) When I put dummy class name, I got error on process deployment, so it looks like my change is being processed in some way.

            2) When I try to change jbpm.cfg.xml within \jbpm\jbpm-service.sar\ I got error, obviously because this deployment can not see my custom class, which is in another ear.

            3) When I move jbpm-service.sar to my ear, and include it in application.xml, I got cast exception with JuelScriptEngine and javax class. There was jira issue regarding this, but in another context and it is resolved.

            What am I doing wrong? What would be correct way of doing this.

            Note: My custom class is dependent on lots of stuff, and can not be easy moved to lib or another folder where jbpm-service.sar can see it.

            Thanks.

            • 3. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u
              kukeltje

              You say you have you configured your identity service in the jbpm configuration. The class needs to be available on java the classpath somewhere, whether in an ear, a war or in a lib folder.

              Could also be that the specific config us not picked up contrary to what you expect. By making a big 'typo' in it, you can see if it is or not.

              1 of 1 people found this helpful
              • 4. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u

                Thanks for the answer kukeltje,

                "kukeltje" wrote:
                By making a big 'typo' in it, you can see if it is or not.


                This is exactly what I tried with:

                1) When I put dummy class name, I got error on process deployment, so it looks like my change is being processed in some way.


                When I got my class deployed successfully, I guess they is is processed somehow.


                Could also be that the specific config us not picked up contrary to what you expect


                How can I know it?
                1) I have custom jbpm.cfg.xml on classpath in my ear, and the same one is in database (blob field) which got there on depoy, so I guess this means it seems t be "picked up".

                2) This is not the same jbpm.cfg.xml which is within \jbpm\jbpm-service.sar\! Why? If I put custom jbpm.cfg.xml, my custom class could not be located.

                Is this proper way of doing it, and if it is not can you give me a hint how to fix it?



                • 5. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u
                  kukeltje

                  well, according to you reply (sorry that I missed the you making a deliberate typo), it seems your config is picked up. Where did you put your identity class? In the sar? In the lib dir? It should be either, since code from a sar cannot look into another war/ear/sar and it will not load from a process archive either.

                  A solutiuon would be not to use the sar but package jBPM inside your war/ear

                  • 6. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u

                    Hi kukeltje, thanks again

                    I did try to use jbpm within my ear, but I have tried to do it so by coping sar to my ear, and including it in application.xml (as mentioned in inital post). But, on startup I got class cast exception with JuelScriptEngine and javax class.

                    I guess just coping sar is not correct way of including JBPM in my application? What would be correct way? Just copy over JBPM lib? Would it be sufficient?

                    Thanks.

                    • 7. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u
                      kukeltje

                      Yep just the libs (see http://docs.jboss.com/jbpm/v4/devguide/html_single/#d0e62) and maybe some other libs that are not present on the classpath already

                      • 8. Re: JBPM 4.2 - Manage JBPM users - recommended way? How to u

                        Thanks kukeltje,

                        I got it working.

                        I have even got jbpm-service.sar working within my ear, with couple of library changes.