4 Replies Latest reply on Jun 7, 2006 8:13 AM by wrschneider99

    setup for jbpm logging

    wrschneider99

      My jbpm_log table is empty for some reason.

      I have the set up in jbpm.cfg.xml.

      My process definition is super-simple copied from the hello-world example in the docs.

      Any ideas what I'm doing wrong?

        • 1. Re: setup for jbpm logging
          wrschneider99

           

          "wrschneider99" wrote:
          I have the <service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' /> set up in jbpm.cfg.xml.


          whoops, forgot code tags. I have this in my jbpm.cfg.xml:

          <service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' />
          



          • 2. Re: setup for jbpm logging
            wrschneider99

            I seem to have answered my own question.
            If I call context.save(processInstance) explicitly, the logs get saved.
            Otherwise, everything else seems to work but the logs don't get written.

            Wonder why this is?

            • 3. Re: setup for jbpm logging
              kukeltje

              this behaviour is as designed. If you look at alll the examples how to uyse the api, you'll see an explicit 'save'

              • 4. Re: setup for jbpm logging
                wrschneider99

                 

                "kukeltje" wrote:
                this behaviour is as designed. If you look at alll the examples how to uyse the api, you'll see an explicit 'save'



                So I wonder why everything else worked without the save call?

                Perhaps it's because I'm managing my own transactions, and the commit forced a flush for all the modified Token/ProcessInstance objects--but the ProcessLog objects were newly-created and never associated with a Session at all so they didn't get saved.