[Emergency] My spring boot camunda app suddenly clean up all process instance and process version after restart

It seem someone changes configurations but I couldn’t find any clue.
Any properties need to change?
Thank you

Hi @quang0804

Does your processes.xml deployment descriptor has property isDeleteUponUndeploy and it’s been set to value true?

If yes, then set it to isDeleteUponUndeploy=false like below.

<process-application
  xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process-archive name="loan-approval">
    <process-engine>default</process-engine>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>

</process-application>

isDeleteUponUndeploy : this property controls whether the undeployment of the process application should entail that the process engine deployment is deleted from the database. The default setting is false. If this property is set to true, undeployment of the process application leads to the removal of the deployment (including process instances) from the database.

Thank you @aravindhrs . It worked.