AnsweredAssumed Answered

Boundary timer event on script task

Question asked by mathiasd on Sep 22, 2011
Latest reply on Oct 5, 2011 by mathiasd

Does the boundary timer event work when attached to a script task ? I would like to ensure that a script task doesn't run more than 1 second, so i put the following boundary event :

<boundaryEvent attachedToRef="telnetScript" cancelActivity="true" id="timer">
         <timerEventDefinition id="_theTimer">
            <timeDuration id="_theTimerDuration" xsi:type="tFormalExpression">PT1S</timeDuration>

The telnetScript sends a telnet request to a fake server. This server answers after 5 seconds, so the timer should normally fires before the server answer, but it fires after ! oO
Moreover, when it fires, the process instance is over (because the telnet answer has been received), so I got a NullPointerException…

It seems that the timer can't fire when the script is executing a blocking instruction. Is it a bug ?
If I put a "while(true);" in the script task, the timer never fires.