Setting history level in model xml doesn't work

Hello,
We have flowable engine 6.6.0 embedded in our project. Default history level is “FULL” set with SpringProcessEngineConfiguration and it works fine.
But changing history level inside process definition doesn’t work at all. I see that flowable modeler adds extension element to schema:

    <extensionElements>
      <flowable:historyLevel xmlns:flowable="http://flowable.org/bpmn"><![CDATA[none]]></flowable:historyLevel>
    </extensionElements>

But engine doesn’t react to it, history level for process instance is still FULL. I can see process instance, tasks and all variable updates in history tables after finishing my process.
Here’s process definition example:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://bpmn.io/schema/bpmn">
  <process id="test_variables_flow_2" name="Тест историчности переменных 2" isExecutable="true">
    <documentation>-</documentation>
    <extensionElements>
      <flowable:historyLevel xmlns:flowable="http://flowable.org/bpmn"><![CDATA[none]]></flowable:historyLevel>
    </extensionElements>
    <startEvent id="StartEvent_1" flowable:formFieldValidation="true"></startEvent>
    <scriptTask id="Activity_1y1vfvm" scriptFormat="groovy" flowable:autoStoreVariables="false">
      <script><![CDATA[execution.setVariable('test', 'value1');]]></script>
    </scriptTask>
    <sequenceFlow id="Flow_0eviplv" sourceRef="StartEvent_1" targetRef="Activity_1y1vfvm"></sequenceFlow>
    <sequenceFlow id="Flow_1hz2yjt" sourceRef="Activity_1y1vfvm" targetRef="Activity_17s67kt"></sequenceFlow>
    <userTask id="Activity_17s67kt" name="Тестовая задача 1" flowable:formFieldValidation="true"></userTask>
    <scriptTask id="Activity_0aiy10z" scriptFormat="groovy" flowable:autoStoreVariables="false">
      <script><![CDATA[execution.setVariable('test', 'value2');]]></script>
    </scriptTask>
    <sequenceFlow id="Flow_1xmsr59" sourceRef="Activity_17s67kt" targetRef="Activity_0aiy10z"></sequenceFlow>
    <sequenceFlow id="Flow_1dz5zf5" sourceRef="Activity_0aiy10z" targetRef="Activity_0aqmz8l"></sequenceFlow>
    <userTask id="Activity_0aqmz8l" name="Тестовая задача 2" flowable:formFieldValidation="true"></userTask>
    <endEvent id="Event_0i3asiz"></endEvent>
    <sequenceFlow id="Flow_1p59uen" sourceRef="Activity_0aqmz8l" targetRef="Event_0i3asiz"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_test_variables_flow_2">
    <bpmndi:BPMNPlane bpmnElement="test_variables_flow_2" id="BPMNPlane_test_variables_flow_2">
      <bpmndi:BPMNShape bpmnElement="StartEvent_1" id="BPMNShape_StartEvent_1">
        <omgdc:Bounds height="30.0" width="30.0" x="592.0" y="212.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Activity_1y1vfvm" id="BPMNShape_Activity_1y1vfvm">
        <omgdc:Bounds height="80.0" width="100.0" x="670.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Activity_17s67kt" id="BPMNShape_Activity_17s67kt">
        <omgdc:Bounds height="80.0" width="100.0" x="820.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Activity_0aiy10z" id="BPMNShape_Activity_0aiy10z">
        <omgdc:Bounds height="80.0" width="100.0" x="970.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Activity_0aqmz8l" id="BPMNShape_Activity_0aqmz8l">
        <omgdc:Bounds height="80.0" width="100.0" x="1120.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Event_0i3asiz" id="BPMNShape_Event_0i3asiz">
        <omgdc:Bounds height="28.0" width="28.0" x="1272.0" y="212.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="Flow_1p59uen" id="BPMNEdge_Flow_1p59uen">
        <omgdi:waypoint x="1219.95" y="228.27586206896547"></omgdi:waypoint>
        <omgdi:waypoint x="1272.0081558540617" y="226.48075426729054"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="Flow_1dz5zf5" id="BPMNEdge_Flow_1dz5zf5">
        <omgdi:waypoint x="1069.95" y="230.0"></omgdi:waypoint>
        <omgdi:waypoint x="1120.0" y="230.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="Flow_1xmsr59" id="BPMNEdge_Flow_1xmsr59">
        <omgdi:waypoint x="919.9499999999999" y="230.0"></omgdi:waypoint>
        <omgdi:waypoint x="970.0" y="230.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="Flow_0eviplv" id="BPMNEdge_Flow_0eviplv">
        <omgdi:waypoint x="621.9446682809963" y="227.39676604540443"></omgdi:waypoint>
        <omgdi:waypoint x="670.0" y="228.67256637168143"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="Flow_1hz2yjt" id="BPMNEdge_Flow_1hz2yjt">
        <omgdi:waypoint x="769.9499999999999" y="230.0"></omgdi:waypoint>
        <omgdi:waypoint x="820.0" y="230.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
1 Like

Did you set enableProcessDefinitionHistoryLevel on the process engine configuration to true?

No, I didn’t :slight_smile:
Thanks a lot, it works fine now.