3 Replies Latest reply on Jan 22, 2014 7:50 AM by swiderski.maciej

    Disable audit log in jBPM6.0

    manmanlai

      Follow the 6.0 user guide,Chapter 8. Persistence and Transactions, it states "To log process history information in a database like this, you need to register the logger on your session"

      Actually, I don't need to register logger for that, it seems automatically write log information to the database even I remove the three log items from persistence.xml.

      My session is constructed as another thread  mentioned described, please check there Is PerRequestRuntimeManager helpful?

       

      Is there any component/lib will automatically register logger for my session? if yes, how to disable it?

      by the way, I use schema to create database, so there is always log tables despite whether it is configured in persistence.xml

       

      here is the dependencies in the maven project

      <properties>

        <jbpm.version>6.0.1.Final</jbpm.version>

        </properties>

        <dependencies>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-bpmn2</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-persistence-jpa</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-human-task-core</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-human-task-workitems</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-shared-services</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.jbpm</groupId>

        <artifactId>jbpm-runtime-manager</artifactId>

        <version>${jbpm.version}</version>

        </dependency>

        <dependency>

        <groupId>org.hibernate</groupId>

        <artifactId>hibernate-entitymanager</artifactId>

        <version>4.2.0.SP1</version>

        </dependency>

        <dependency>

        <groupId>org.hibernate</groupId>

        <artifactId>hibernate-core</artifactId>

        <version>4.2.0.SP1</version>

        </dependency>

        <dependency>

        <groupId>org.hibernate.javax.persistence</groupId>

        <artifactId>hibernate-jpa-2.0-api</artifactId>

        <version>1.0.1.Final</version>

        </dependency>

        <dependency>

        <groupId>org.codehaus.btm</groupId>

        <artifactId>btm</artifactId>

        <version>2.1.4</version>

        </dependency>

        <dependency>

        <groupId>com.oracle</groupId>

        <artifactId>ojdbc6</artifactId>

        <version>11.2.0.3</version>

        </dependency>

        </dependencies>

      /Xiang

        • 1. Re: Disable audit log in jBPM6.0
          swiderski.maciej

          it is registered by the DefaultRegisterableItemsFactory, so if you would like to disable it then you need to extend/provide your own implementation of RegisterableItemsFactory and use it on your builder while creating RuntimeEnvironment.

           

          HTH

          • 2. Re: Disable audit log in jBPM6.0
            manmanlai

            aha, it is a bit long story, I use RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder() and the default environment will actually register jpa logger for me.

            It would be better to state clearly in the default environment for this builder, so we can make correct use of the default one.

             

            If you can add some instructions how to construct the kiesession without the usage of RuntimeManager, it will be handy. For example, how to extend/provide own implementation of RegisterableItemsFactory. This will definitely shorten the learning curve of jBPM6.

             

            Thank you for your quick response as usual as other threads.

             

            /Xiang

            • 3. Re: Disable audit log in jBPM6.0
              swiderski.maciej

              Xiang Lai wrote:

               

              aha, it is a bit long story, I use RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder() and the default environment will actually register jpa logger for me.

              It would be better to state clearly in the default environment for this builder, so we can make correct use of the default one.

               

              actually this is described on javadocs what builder uses - in case of default one it's DefaultRuntimeEnvironment which then tells you that it uses DefaultRegisterableItemsFactory and that factory says exactly what it registers. Althoug we could mane include that in the docs as well, feel free to drop jira for documentation.

               

              Xiang Lai wrote:

               

              If you can add some instructions how to construct the kiesession without the usage of RuntimeManager, it will be handy. For example, how to extend/provide own implementation of RegisterableItemsFactory. This will definitely shorten the learning curve of jBPM6.

               

              in docs there is section about RegisterableItemsFactory and available implementation that can be extended. To provide your own it's just to implement what is needed and set it on the environment.

              When it comes to using ksession without the manager, it's same as it used to be in jbpm 5.x

               

              Xiang Lai wrote:

               

              Thank you for your quick response as usual as other threads.

               

              glad I could help, that's why we are here, the community

               

              HTH