AnsweredAssumed Answered

Execution doesn't exist

Question asked by zaiteki on Jun 23, 2014
Latest reply on Jun 24, 2014 by zaiteki

I rarely get following exception when running the activiti flow:

SEVERE: exception during timer execution
org.activiti.engine.ActivitiException: Error while evalutaing expression
        at org.activiti.engine.impl.el.JuelExpression.getValue(
        at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(

Caused by: org.activiti.engine.impl.javax.el.ELException: org.activiti.engine.ActivitiException: execution 134401 doesn't exist
        at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(

Caused by: org.activiti.engine.ActivitiException: execution 134401 doesn't exist
        at org.activiti.engine.impl.cmd.GetExecutionVariableCmd.execute(
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(

The exception is generated at following java code location:
<code lang="java">
  private ProcessEngine engine;

List<ProcessInstance> processInstances = engine.getRuntimeService().createProcessInstanceQuery().list();
    for (ProcessInstance process : processInstances) {
      EntityIdentifier entityIdentifier = (EntityIdentifier) engine.getRuntimeService().getVariable(process.getId(), ENTITY_ID); //exception

Generally the code and flow works perfectly but sometimes this error is thrown. It puzzles me since I expect query to return only active processes *unknw*

One more question regarding the roll-back functionality, considering following event handler method:
<code lang="java">
public void event(EntityIdentifier ei){
    db update statement with flush and all that stuff;
    activiti workflow variables update; //exception
Will the DB updates be rolled-back?

I've spent lots of time looking around and analyzing this issue *cray2* running out of ideas already.
Any kind of help will be highly appreciated!