9 Replies Latest reply on Dec 16, 2008 4:01 PM by kukeltje

    Storing process instance creator

    trouby

      Hey,

      As apart of the identity, I think it is valuable to allow the option to store the creator of a process (in case a process was started by a person) and add functionality like retrieving all processes that were started of a certain person,


      It is common to retrieve processes via the creator in order to track process instance status,


      Currently I store the creator as a variable and perform queries in order to load processes by a certain variable value,

      I guess this is the only way to do it right now, correct?



      Thanks,

      Asaf.

        • 1. Re: Storing process instance creator
          kukeltje

          Yes and no.... If you have a start-task, assign a swimlane to it and give it a name (e.g. creator). If you set the actor id on the jbpm context if you start a process, it is automatically assigned to that swimlane.

          Whether it is common to retrieve processes based on this to track progress I'm not sure. I've never done it but that might be me. I want to keep track of tasks that are overdue or soon will be. It does not matter much in the 'real-time' monitoring who started it. For analysis purposes it does since the creator might be the one that provided to little information for other tasks to be carried out quickly

          • 2. Re: Storing process instance creator
            trouby

            Thanks for the tip,

            Well, it depends on the requirements I guess,
            I have a system where the requester want to track what's happening with their processes and understand where a process stuck, why, etc...

            So I have somehow to display the requester only the relevant processes,



            Thanks,


            Asaf.

            • 3. Re: Storing process instance creator
              kukeltje

              Correct...it's often the case that things depend on the requester. Now I come to think of it... did it once to, but that was between two parties and each had to be able to see what task was assigned to him OR the other party...

              It is an option to e.g. use a compound businesskey like:
              <requester-id>:<real-businesskey>

              Retrieving processes by businesskey is more efficient. But if you also want all tasks with it, it is more efficient to write a custom query

              • 4. Re: Storing process instance creator
                kukeltje

                 


                Correct...it's often the case that things depend on the requester.


                Should have said requirement or usecase


                • 5. Re: Storing process instance creator
                  olivier_debels

                  There are other options.

                  You can f.e. create a separate table for requester's and link it to process instances.

                  requester table is then a link table between process instances and your (or the jbpm's) identity tables.

                  • 6. Re: Storing process instance creator
                    kukeltje

                    Olivier,

                    That table is in your domain model then. I would not relate it to the identity tables

                    • 7. Re: Storing process instance creator
                      kukeltje

                      Nor to the processinstances... use the businesskey for that....

                      • 8. Re: Storing process instance creator
                        olivier_debels

                        No,

                        requester is part of the "workflow" tables.

                        These contain jbpm and some extra tables.

                        • 9. Re: Storing process instance creator
                          kukeltje

                          I never advise to extend the jbpm schema with extra tables.... Keep them separated and I store the initial actor (and often all actors participating in a process) in my domainmodel