History level configuration

I have edited my application.properties file to configure history level to none but its showing the following error:
historyLevel mismatch: configuration says HistoryLevelNone(name=none, id=0) and database says HistoryLevelFull(name=full, id=3)

How do i fix this?Can anyone please help…

Hi @mlvka,

you have to update the history Level in the ACT_GE_PROPERTY table manually with a SQL statement.

Hope this helps, Ingo

1 Like

should we always need to update the database manually?

Hi @mlvka,

no, only if you change the history level. This is the only setting that is saved in the configuration file and in the database on the first startup.

Hope this help, Ingo

1 Like

so inorder to set the history level to desired option we have to update in database ? Then what is the purpose of configuring the bpm-platform.xml file?

Hi @mlvka,

if you select the desired history level on the first startup, everything is smooth.

Only if you want to change the level afterwards, you have to adjust both settings, configuration file and database. But it is a rare operation.

This behavior is there from the very first version, it was already there in activiti, when the fork of the Camunda Platform happened. I can’t explain the reasoning of the decision.

Hope this helps, Ingo

1 Like

I am getting an error like this. Please help!

Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03003 Inserting an entity with Id ‘historyLevel’ and type ‘class org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity’ which is already marked with state ‘PERSISTENT’
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.alreadyMarkedEntityInEntityCacheException(EnginePersistenceLogger.java:113) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.db.entitymanager.cache.DbEntityCache.putInternal(DbEntityCache.java:217) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.db.entitymanager.cache.DbEntityCache.putTransient(DbEntityCache.java:157) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.insert(DbEntityManager.java:530) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.dbCreateHistoryLevel(HistoryLevelSetupCommand.java:72) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:56) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:34) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:71) ~[camunda-engine-spring-7.18.3-ee.jar:7.18.3-ee]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.22.jar:5.3.22]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:71) ~[camunda-engine-spring-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.execute(ExceptionCodeInterceptor.java:55) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:148) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.ProcessEngineImpl.(ProcessEngineImpl.java:110) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:1101) ~[camunda-engine-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.spring.SpringTransactionsProcessEngineConfiguration.buildProcessEngine(SpringTransactionsProcessEngineConfiguration.java:67) ~[camunda-engine-spring-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:55) ~[camunda-engine-spring-7.18.3-ee.jar:7.18.3-ee]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:34) ~[camunda-engine-spring-7.18.3-ee.jar:7.18.3-ee]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169) ~[spring-beans-5.3.22.jar:5.3.22]
… 31 common frames omitted

Hi @mlvka,

it seems to me that you set the history level in the database twice.

Could you please share what you are doing here and how the process engine is configured?

To change the history level, you have to

  1. stop the engine
  2. execute the SQL statement to update the history level
  3. change the configuration
  4. start the process engine

Hope this helps, Ingo

2 Likes

Thankyou it is working now. Can you please tell me the difference between the audit level and activity level .what is the difference between full and activity level.

Hi @mlvka,

It’s the amount of data.

  • Full writes everything, including interactions with Cockpit. This is safe for external auditing.
  • Audit just saves the current state of the process instances and updates the variables in the history.
  • Activity doesn’t save any variables values, only process instances and activities.

You can find more details here: History and Audit Event Log | docs.camunda.org

Hope this helps, Ingo

2 Likes

does that mean the form field values will be visible in audit level but not in activity level

Hi @mlvka, yes.

1 Like

Thank you very much… the doubts are cleared!

Hi…i have set my history level to audit level…can i view the executed decision instance in audit level and activity level?