cancel
Showing results for 
Search instead for 
Did you mean: 

Execution doesn't exist

zaiteki
Champ in-the-making
Champ in-the-making
Hello,

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(JuelExpression.java:59)
        at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:45)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)

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(BeanELResolver.java:481)

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



The exception is generated at following java code location:
<code lang="java">
  @Autowired
  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
      }       
    }
</code>

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
}
</code>
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!
5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

org.activiti.engine.ActivitiException: execution 134401 doesn't exist

Is it possible that process instances has ended between  query and get variable?

roll-back functionality

I do not know which event handler you mean.
Could you create jUnit test?

Regards
Martin

Hello,

I do not know which event handler you mean.
I meant the java code processing flow events, I called it event handler Smiley Happy e.g.
<code>
<serviceTask id="Exited" name="Exited" activiti:expression="${events.exited(entityId)}"></serviceTask>
</code>

Is it possible that process instances has ended between query and get variable?
It shouldn't, it is an user task with a timer boundary event attached. The timer moves the flow to the "Exited" state, where it tries to update some variables and fails.

Regards,

jbarrez
Star Contributor
Star Contributor
Very strange. The error is thrown when the execution indeed is not in the db … so something is moving the execution forwards.

Do tyou hava an @Transactional around your logic? Otherwise there will be two transactions for the snippet of codeyou posted.

abhishek1
Champ in-the-making
Champ in-the-making
I am getting similar error: <code>org.activiti.engine.ActivitiObjectNotFoundException: execution 447505 doesn't exist </code>.

Could anyone clarify on this?

jbarrez
Star Contributor
Star Contributor
Not with that little amount of context. I can only tell you that execution 447505 is not there, but it was expected to be there.