cancel
Showing results for 
Search instead for 
Did you mean: 

Historic tracking of multiple end events reached

rgielen
Champ in-the-making
Champ in-the-making
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é
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

I think your request is valid and it's missing from the current history implementation right now.
Can you create a JIRA?

Thanks,

rgielen
Champ in-the-making
Champ in-the-making
Done:
http://jira.codehaus.org/browse/ACT-1202

Because of determinism concern filed as bug rather than improvement or feature request.

Thanks,
René

sebastian_s
Champ in-the-making
Champ in-the-making
From a BPMN 2.0 point of view René's request is valid since the BPMN 2.0 clearly states that a process can have several end events. I would also like to mention that tracking several different end events was possible in jBPM 3.2.

heymjo
Champ on-the-rise
Champ on-the-rise
Have you tried fiddling with the HistoryParseListener, history tracking is mostly constructed there i believe

https://fisheye.codehaus.org/browse/~br=root%3A/activiti/activiti/trunk/modules/activiti-engine/src/...

bernd_ruecker
Champ in-the-making
Champ in-the-making
We might now tackle a couple of missing history features / flaws for http://www.camunda.com/fox/ 6.1, this could make it into the list 😉

I agree that it is a bug.
My proposal is to add the events correctly to the ACT_HI_ACTINST, which would allow to capture all events and all end events.

But to be correct we would have to remove the PROCINST.END_ACT_ID_ which might cause a lot of users trouble, since they do not use parallelism and maybe are not even aware of the problem. So that would break backwards compatibility. But we could add a warning in the API method for the field and declare it deprecated.

WDYT?

Cheers
Bernd