4 Replies Latest reply on Oct 22, 2014 3:11 AM by zmor

    Jbpm6 - extend task

    zmor

      Hi,

      is there a way to extend task object with new fields?

      And after adding these fields, is there a way to use them as criteria for searching tasks? Or should i write my own custom search engine based on task entity, without using task service api?

       

      I  consider also to use variables for this, but I do not know how to search by variables and how efficient it is.

       

      JBPM 6.0.1 Final

        • 1. Re: Jbpm6 - extend task
          swiderski.maciej

          in general for that you should you process and task variables. If you need more advanced storage for process variables so they can be easily queried you can used so called variable persistence strategies so you store certain variables in different storage - for example put them into the search index or separate data base. See this article for details about variable persistence strategies.

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: Jbpm6 - extend task
            zmor

            Thanks for the reply.

            I read your blog already and i read this article too.

            I was trying to persist my entity variable but with no luck. Then i saw code of marhsal method of JPAPlaceholderResolverStrategy class and i realize that this method doesn't persist object in database.

            After a little digging i found JPAReadAndWriteStrategy class, which is described in JBPM6 developer guide book. Marshal method of this class persists objects in database.

             

            Anyway, is there any API method to search tasks by various fields from variable which is persisted as entity? Or should i write my own search engine?

            • 3. Re: Jbpm6 - extend task
              swiderski.maciej

              you're right that version 6.0.1 did not persist the entity as part of the marshaller strategy although it was fixed and now it does so. So you can upgrade to 6.1 or just make a copy of that fixed version into your application to make use of it.

               

              There is no direct way to query variables outside of jbpm tables so once they are stored in other location you need to provide your own way of searching that.

               

              HTH

              1 of 1 people found this helpful
              • 4. Re: Jbpm6 - extend task
                zmor

                Thanks for the answers.

                Now it's more clear for me.

                 

                Regards,

                KM