AnsweredAssumed Answered

Historic tracking of multiple end events reached

Question asked by rgielen on May 2, 2012
Latest reply on Jul 20, 2012 by bernd.ruecker
Hi,

as far as I'm concerned there is a problem in the historic data model that keeps us from tracking historic process state correctly. Assumed that following process definition is completely legal in BPMN 2.0 (and we do have similar patterns in our process definitions):

[img]https://img.skitch.com/20120502-eu6kdkuhqmitueumcaadmpkr4.jpg[/img]

<?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: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/test">
  <process id="process1" name="process1">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="Handle Something"></userTask>
    <boundaryEvent id="boundarytimer3" name="" cancelActivity="false" attachedToRef="usertask1">
      <timerEventDefinition>
        <timeDuration>P5D</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <serviceTask id="mailtask1" name="Notify Handling overdue" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to" expression="supervisor@company.com"></activiti:field>
        <activiti:field name="from" expression="engine@company.com"></activiti:field>
        <activiti:field name="subject" expression="Handling overdue"></activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="flow2" name="" sourceRef="boundarytimer3" targetRef="mailtask1"></sequenceFlow>
    <serviceTask id="servicetask1" name="Process Something" activiti:expression="${doBean.handleSomething}"></serviceTask>
    <sequenceFlow id="flow3" name="" sourceRef="usertask1" targetRef="servicetask1"></sequenceFlow>
    <endEvent id="endevent1" name="Something handled"></endEvent>
    <sequenceFlow id="flow4" name="" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
    <endEvent id="endevent2" name="Notfication sent"></endEvent>
    <sequenceFlow id="flow5" name="" sourceRef="mailtask1" targetRef="endevent2"></sequenceFlow>
  </process>
</definitions>

Basically this is a monitoring workflow, without the monitoring event being triggered having influence on the main process flow at all. Similar issues we have with forking executions through a parallel gateway without the need to join again later.

The process runs correctly, both end events will be reached (validated by a listener). Nevertheless, only one end event will be tracked in ACT_HI_PROCINST. Basically it seems like we are missing an entity like ACT_HI_EXECUTIONS, thus at least being able to track n end events for 1 process instance.

For our use case it is crucial to investigate and visualize state of running and completed processes correctly. In current state of the data model, it seems to be undeterministic which end event gets tracked.

My questions:
- is there something I'm missing here?
- if not, do you agree that this is a valid request?
- if yes, should I file a feature request (or even a bug) in JIRA?

Thanks in advance,
René

Outcomes