cancel
Showing results for 
Search instead for 
Did you mean: 

Error when executing eventListener

johan_l
Champ in-the-making
Champ in-the-making
Hello I have a problem with a event listener that fails when an timer runs out.

Runs on Jboss Wildfly and Java EE (no spring)

Event listener:
    <extensionElements>
      <activiti:eventListener id="statusLyssnare" delegateExpression="${statusLyssnare}"  events="TASK_CREATED" />
    </extensionElements>


this is the timer that runs out:

<boundaryEvent id="kommuniceringstimer" name="Timer för kommuniceringsperiod" attachedToRef="kommuniceringsperiod" cancelActivity="true">
      <timerEventDefinition>
        <timeDate>${kommuniceringsperiod_i_ISO8601}</timeDate>
      </timerEventDefinition>
    </boundaryEvent>


This is the signature of the listener

@Named
public class StatusLyssnare implements ActivitiEventListener {


It works now and then but most of the time it fails…

Process does not advance to the next task since we have "isFailOnException" set to true

Logs are silent but in ACT_RU_JOBS - EXCEPTION_MSG_ it says "Exception while executing event-listener"

When debugging execution never reaches breakpoint in listener so i guess it has something with the lookup to do.

It works fine on other transitions but this one seems problematic…

Anyone that has an idea?
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I would propose to create jUnit test.
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin