AnsweredAssumed Answered

Context lost after 30 minutes inactivity

Question asked by quirino.brizi on Sep 6, 2016
Latest reply on Sep 9, 2016 by quirino.brizi
Hi All,

We are facing an odd issue when running Activiti version 5.20, the issue is that using a simple BPMN with an Intemediate Catching Event Timer and a Service Task which uses expression we are getting PropertyUnresolvedException after about 30 minutes of inactivity on Activiti.
If the BPMN is triggered at intervals that are less than 30 minutes all works fine.
We have noticed as well that when the job is retried, using the default FailedJobCommandFactory, the execution of the service task is successful.

Our set-up is as following:

We are using Activiti 5.20 integrated with Spring Boot version 1.3.5-RELEASE.

The BPMN we are using is as below:

<code>
<?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:activiti="http://activiti.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://www.activiti.org/processdef">
  <process id="activitiTimerIssue" name="Activi Timer Issue" isExecutable="true">
    <sequenceFlow id="sid-604F4F58-7E3E-4500-99F2-AFB13BE170BF" sourceRef="sid-B502AE80-0F09-4630-9461-6DA743C5CE0C" targetRef="sid-3F59B8FB-4EBD-45E5-8922-37F352B0DC43"></sequenceFlow>
    <endEvent id="sid-3F59B8FB-4EBD-45E5-8922-37F352B0DC43"></endEvent>
    <serviceTask id="sid-B502AE80-0F09-4630-9461-6DA743C5CE0C" name="get resource info" activiti:expression="#{resources.getInfo(&quot;site&quot;, inputs.enterpriseId)}" activiti:resultVariableName="resourceProperties"></serviceTask>
    <intermediateCatchEvent id="timer2" name="Intermediate Timer">
      <timerEventDefinition>
        <timeDuration>PT10S</timeDuration>
      </timerEventDefinition>
    </intermediateCatchEvent>
    <sequenceFlow id="sid-14F9F523-8C64-42AA-833F-178292E06717" sourceRef="timer2" targetRef="sid-B502AE80-0F09-4630-9461-6DA743C5CE0C"></sequenceFlow>
    <startEvent id="start1" name="Start"></startEvent>
    <sequenceFlow id="sid-8D2B8BFF-DD94-4594-8206-973CD112CE4B" sourceRef="start1" targetRef="timer2"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_activitiTimerIssue">
    <bpmndi:BPMNPlane bpmnElement="activitiTimerIssue" id="BPMNPlane_activitiTimerIssue">
      <bpmndi:BPMNShape bpmnElement="sid-3F59B8FB-4EBD-45E5-8922-37F352B0DC43" id="BPMNShape_sid-3F59B8FB-4EBD-45E5-8922-37F352B0DC43">
        <omgdc:Bounds height="28.0" width="28.0" x="510.0" y="226.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-B502AE80-0F09-4630-9461-6DA743C5CE0C" id="BPMNShape_sid-B502AE80-0F09-4630-9461-6DA743C5CE0C">
        <omgdc:Bounds height="80.0" width="100.0" x="285.0" y="200.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="timer2" id="BPMNShape_timer2">
        <omgdc:Bounds height="31.0" width="31.0" x="195.0" y="120.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="start1" id="BPMNShape_start1">
        <omgdc:Bounds height="30.0" width="30.0" x="102.0" y="120.5"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-8D2B8BFF-DD94-4594-8206-973CD112CE4B" id="BPMNEdge_sid-8D2B8BFF-DD94-4594-8206-973CD112CE4B">
        <omgdi:waypoint x="132.0" y="135.5"></omgdi:waypoint>
        <omgdi:waypoint x="195.0" y="135.5"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-14F9F523-8C64-42AA-833F-178292E06717" id="BPMNEdge_sid-14F9F523-8C64-42AA-833F-178292E06717">
        <omgdi:waypoint x="223.25906469001268" y="146.28179619162353"></omgdi:waypoint>
        <omgdi:waypoint x="287.3076923076923" y="200.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-604F4F58-7E3E-4500-99F2-AFB13BE170BF" id="BPMNEdge_sid-604F4F58-7E3E-4500-99F2-AFB13BE170BF">
        <omgdi:waypoint x="385.0" y="240.0"></omgdi:waypoint>
        <omgdi:waypoint x="510.0" y="240.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
<code>

Thanks in advance for your help,

~Q

Outcomes