Timer Boundary Event => error

Hello,

I’m facing a problem with my tmer boundary event.
When the timer is triggered, it does not start the conditional sequence and sends an error message that I can’t interpret correctly.

Here is my flow:

As an input, I receive a deadline for my action. Then a service calculate the “reminder time”…
The timer is set on the reminder date (or on the deadline date if it’s too late to send reminders anymore)
When the boundary event is fired, I either send a reminder (then go back in my process with a new reminder date) or a message stating that it’s too late.

The error comes when the boundary event is fired:

11-Apr-2016 23:10:54.710 SEVERE [pool-2-thread-1] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Activity is contained in normal flow and cannot be executed using executeActivity().
org.camunda.bpm.engine.ProcessEngineException: Activity is contained in normal flow and cannot be executed using executeActivity().
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.executeActivity(PvmExecutionImpl.java:689)
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.executeEventHandlerActivity(PvmExecutionImpl.java:555)
at org.camunda.bpm.engine.impl.jobexecutor.TimerExecuteNestedActivityJobHandler.execute(TimerExecuteNestedActivityJobHandler.java:43)
at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:124)
at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:103)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:79)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I don’t know what is wrong with my construction or what I’m missing.
Also, I don’t know what are the constraints regarding “normal flow”.

Any help is welcome :slightly_smiling:

Thanks in advance,
François

Hi,

I don’t know why you are getting this error, however I will suggest an alternate model…

You could place two boundary timer events on the user task. One is non-interrupting and just periodically sends reminders. The other is interrupting and thus abandons the task. Hence fewer loops and your user task does not need to be ‘re-entrant’.

regards

Rob

Thanks for your response…

I’ve just figured out the problem, which was in my bpmn file.
I had a transition between my “confirm” activity and the boundary event. This lead to this error.

Concerning your proposition of simplification, it would have been possible if the reminders were sent at a regular cycle (like every week) but I want to have a more adaptable way (example: if deadline is in 120 days, send a reminder 30 days before, 5 days before and 1 day before the deadline)

Anyway, thanks for your help, it is much appreciated :slightly_smiling:

François

1 Like

Hi François,

Maybe expressions in timer events would be interesting in that context.

Cheers, hope this helps,
Mat

I’m using an expression for the definition of my boundary event.

Now, if I change the value of my variable after the creation of the activity, I doubt that the timer will be reset to a new value…
That’s why I made a loop in order to recreate the activity every time with its new value.