3 Replies Latest reply on Jul 29, 2013 1:40 AM by Maciej Swiderski

    Attach & Reterive Custom metadata with process instance

    Crasy Bpm Newbie

      Hello,

       

            We are developing 1 Document based application with jbpm5.2 ( Migerating with jbpm5.4 also) . Now we need to handle some metadata of document so is it possible to handle metadata with process instance? Below are my based requirement.

       

            1)  Store custom metadata(document name, size, creatorname etc...) with process instance.

       

            2)  Reterive metadata with process instance .

       

            Thanks in advance

       

      Regards,

      Crasybpm

        • 1. Re: Attach & Reterive Custom metadata with process instance
          Maciej Swiderski Master

          you should use process variables (aka property in bpmn2) to store any information that process instance might require. Moreover process variables might be created by the process instance itself e.g. using user task to collect input from end users like document name. Same you can access process variables from process instance as soon as you have the process instance (mainly its id).

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: Attach & Reterive Custom metadata with process instance
            Crasy Bpm Newbie

            Hello Maciej Swiderski,

             

                     Thanks for your kind reply. Which implmentation regarding metada will be more useful when perfomance is concern,

             

                     1) Store metadata into process instance and reterive when we require.

             

                      2) Use user defined entity of metadata and get by using database join table with process instance.

             

                     As we are storing object into process instance and i am affarid regarding performance issue. Please advise and thanks for help again.

             

             

            Regards,

            Crasybpm

            • 3. Re: Attach & Reterive Custom metadata with process instance
              Maciej Swiderski Master

              I would say that option one is the only one that could be used. Please note that when you use processes you should rely on the engine to do the work as needed instead of trying to use its data base as it might change and thus making your system fragile.

               

              Not sure what is your exact use case but when you store information as part of the process instance that usually means that the process will always have access to it whenever is needed and the process variables can be sent to other systems (like user interface) to interact with other entities.

               

              There is another strategy for handling data within process instance, you can only store data identifiers and provide a service that the engine can invoke whenever the data is needed. That way you make it sort of lazy loading of data as they will be collected only when needed and will not put any overhead when storing those information as they will be relatively small.

               

              HTH