4 Replies Latest reply on Feb 29, 2012 12:12 AM by arunvg

    Default transaction behavior in jBPM 5.1

    egelke

      Hello,

       

      Can anybody tell me what the default transaction behaviour is when using "JPAKnowledgeService"?  Is there a new transaction per task or is there an single transaction per process?  The documentation isn't clear about this.

       

      Kind regards,

      Bryan.

        • 1. Re: Default transaction behavior in jBPM 5.1
          eaa

          When using JPAKnowledgeService, everytime you interact with the returned StatefulKnowledgeSession a new TX is created and commited.

          So, for example:

           

          ksession.startProcess() <- creates a TX, starts the process, the process runs until it reaches a wait-state or an End Event Node, the TX is commited

           

          ksession.getWorkItemManager().completeWorkItem() <- a TX is created, the work item is completed, the process runs until it reaches a wait-state or an End Event Node, the TX is commited .

           

          Best Regards,

          1 of 1 people found this helpful
          • 2. Re: Default transaction behavior in jBPM 5.1
            malabalu

            Is there any way I can override this like when to start and commit the transactions?

            • 3. Re: Default transaction behavior in jBPM 5.1
              eaa

              As far as I know, there is no way to do that without modify jbpm internals. And even so, it wouldn't be an easy task.

              What are you trying to achieve? maybe there is anohter way to do it.

               

              Best Regards,

              1 of 1 people found this helpful
              • 4. Re: Default transaction behavior in jBPM 5.1
                arunvg

                Adding to the question .

                 

                Is there a way to implement the "Transaction Sub-Process" as specified in BPMN2.0 Specification ?

                 

                So that we can specify a transaction strategy for a group of activities grouped under this transaction sub process.