Hi,
I’m trying to turn off history inside the standalone.xml by changing the <history-level>full</history-level> to <history-level>none</history-level>. But i keep getting this error.
ERROR [org.camunda.bpm.engine.context] (ServerService Thread Pool -- 62) ENGINE-16004 Exception while closing command context: historyLevel mismatch: configuration says HistoryLevelNone(name=none, id=0) and database says HistoryLevelFull(name=full, id=3): org.camunda.bpm.engine.ProcessEngineException: historyLevel mismatch: configuration says HistoryLevelNone(name=none, id=0) and database says HistoryLevelFull(name=full, id=3)
at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.checkHistoryLevel(SchemaOperationsProcessEngineBuild.java:109)
at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:62)
at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:35)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:126)
at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
Can someone point me to the right direction for turning off the history in camunda.
FYI- i’m currently using camunda-bpm-ee-wildfly10-7.6.0-ee.
Note that when using the default history backend, the history level is stored in the database and cannot be changed later.
What has hapened is on startup when the DB schema was created, the history level in the DB was set to the configured value. To change this you need to update the value stored in the DB.
From memory, there is a table ACT_GE_PROPERTY. This is a table of name value pairs. Query the table and there should be an entry for history level. You need to change the value to the history level you desire.
NOTE: I have done this in test and dev environments. I would seek Camunda advice before performing this hack in a prod environment.
Hi Rob,
Thanks for your suggestion. I have made changes to the act_ge_property table inside the DB i.e I’ve changed the history level from 3 to 0 and restarted the Camunda server but still getting a similar error. ERROR [org.camunda.bpm.engine.context] (ServerService Thread Pool -- 63) ENGINE-16004 Exception while closing command context: historyLevel mismatch: configuration says HistoryLevelNone(name=none, id=0) and database says HistoryLevelFull(name=full, id=3): org.camunda.bpm.engine.ProcessEngineException: historyLevel mismatch: configuration says HistoryLevelNone(name=none, id=0) and database says HistoryLevelFull(name=full, id=3) at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.checkHistoryLevel(SchemaOperationsProcessEngineBuild.java:109) at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:62) at org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:35) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:126) at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98) at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:650)
Is there any other property that needs to be changed inside the DB?
If this is local, is it important to you to preserve the current table contents? If not, wipe the database schema, configure Camunda with history level none and you’re good to go!
Strictly speaking, you can’t. There is no Camunda feature that allows you to do so once you have data in the Camunda tables. The hints @aakhmerov and @Webcyberrob are how you can hack this at your own risk. If this does not work out for you, I suggest you try to debug the Camunda code and understand what the history level check is based on and why it still fails.
Just a thought, but you have to modify both the database entry AND whatever configuration file entry controls that. In WildFly, you must set the tag to “none”, “audit”, “full”, etc. You must also set the corresponding value in the database table as mentioned above.
I saw this because I was going to ask if this is supported or not and I guess I’ll have to ask “formally”.
I was trying the same & getting exception. May be this will help someone those all getting these exceptions. As suggested you have to change in both database & the configuration file that controls that.
Example :
ProcessEngineConfiguration.setHistory(“none”); //This can be “none”, “audit”, “full”, etc as suggested by mppfor_manu
and also db you have to set “historyLevel” = 0 on ACT_GE_PROPERTY table.