cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine reason why user task has ended

etienne
Champ in-the-making
Champ in-the-making
Hi

How can I differentiate that a user task has ended because of an interrupting timer event vs. normal user completion? If I add an execution listener ('end' event name) to the user task element (sample xml below), I cannot find a way to determine why the task has ended, i.e. interrupted vs. normal completion. The 'deleteReason' property on the ExecutionEntity has always been null.

<process id="singleTimeEventUserTaskProcess">
        <startEvent id="start"/>
        <userTask id="userTask"/>
        <endEvent id="end"/>

        <boundaryEvent id="timer" attachedToRef="userTask" cancelActivity="true" parallelMultiple="false">
            <timerEventDefinition>
                <timeDuration>PT3S</timeDuration>
            </timerEventDefinition>
        </boundaryEvent>

        <sequenceFlow sourceRef="start" targetRef="userTask"/>
        <sequenceFlow sourceRef="userTask" targetRef="end"/>
        <sequenceFlow sourceRef="timer" targetRef="end"/>
    </process>

Thanks in advance for any hints on how I can find out why a user task has ended.

Regards, Etienne
2 REPLIES 2

etienne
Champ in-the-making
Champ in-the-making
Could someone knowledgable with the insights of Activiti give me some hints on how to solve my question. I studied the sources, I did some debugging, but I just cannot figure it out…

Etienne

frederikherema1
Star Contributor
Star Contributor
You could check the history (HistoricActivityInstance, see HistoryService and createHistoricActivityQuery) to see which activity was executed. An alternative is to have 2 different end-events. This allows you to check the HistoricProcessInstance endActivityId…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.