1 2 Previous Next 20 Replies Latest reply on Sep 15, 2006 5:28 AM by antitrust1982 Go to original post
      • 15. Re: How logging me in as a user in JBPM (swimlane)
        jits_1998

        The processID is process instance id or process definition id ? process definition id has to and will be same. process instance id will be different unless you are searching for the process instance by id.

        two ways to do this:
        1) Copy task instance to a reference outside
        2) search for task instance from task mgt session.

        cheers!

        • 16. Re: How logging me in as a user in JBPM (swimlane)
          antitrust1982

          Have on my portal two same jbpm portlets. when I run the portlet I have a fonction which give me back the processId :

          System.out.println("PROCESS INSTANCE ID:"+ pi.getId());
          . Executing the both portlet in the same time I have the same ID :

          PROCESS INSTANCE ID:0

          So I think that the portlet create a specifique context which isolates the contexts. So perhaps there is a fonction which put in the data base the Id of the diverse Process and permit to have a unique ID among the portlets. and consequently have the tasks of the JBPM engine and not just of one portlet.

          In my portlet I put a jbpm librairies. Must I do a specific thing in order to have the same context between the portlet.

          I use now liferay portal. Must I copy in a specific place the jbpm files?

          Until now I work jsut on one portlet in order to understand well the functionment. I don't know all but I can do somethings.

          thank you for you help

          Antitrust1982

          • 17. Re: How logging me in as a user in JBPM (swimlane)
            jits_1998

            okay got it.

            Process instance id is generated after the process instance is stored in the db.

            So to start using the process instance id you need to use:

            Step 1: org.jbpm.JbpmContext.save(ProcessInstance)
            Step 2: org.jbpm.JbpmContext.loadProcessInstanceForUpdate(long)
            



            hope it helps..

            cheers!


            • 18. Re: How logging me in as a user in JBPM (swimlane)
              antitrust1982

              thank you I do this but at the end of my task instance execution, so it desn"t work correctly. now I put the save just after the creation and work well.

              But does it existe a methode like unfinishedtaskinstance for the process intances unfinished.. I tried to find it in the javadoc, but I don't find at this time. I try to continu to search for because there are lots of methodes for lots of things.

              thank you

              antitrust1982

              • 19. Re: How logging me in as a user in JBPM (swimlane)
                jits_1998

                You can do this just after creating the processinstance so that the process instance id is filled and hence allows you to differentiate between process instances.

                AFAIK there is no method to search for unfinished process instances. But this does/should not stop you from writing one of your own :-)

                cheers!

                • 20. Re: How logging me in as a user in JBPM (swimlane)
                  antitrust1982

                  Hi,

                  So in order to create this methode, I must to put in the jbpmsession or context i don't know for now a list of the id which are currently instanciate. But I don't know where I can put this list in order to find anywhere in all of instances of my jbpm, and how.

                  after I think to just use iterator in order to have all the process id which are instanciate.

                  1 2 Previous Next