Error closing a Process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2013 08:27 AM
I'm using Actviti 5.11 via the REST API. Sometimes, when I close a task that triggers the end of a process, I get this error:
3-apr-2013 15.42.31 org.activiti.engine.impl.interceptor.CommandContext close
GRAVE: Error while closing command context
org.activiti.engine.ActivitiException: execution 35910 doesn't exist
at org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:52)
at org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:29)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.activiti.engine.impl.RuntimeServiceImpl.getVariables(RuntimeServiceImpl.java:99)
at org.activiti.rest.api.process.ProcessInstanceResource.addVariableList(ProcessInstanceResource.java:188)
at org.activiti.rest.api.process.ProcessInstanceResource.getProcessInstance(ProcessInstanceResource.java:80)
at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:452)
at org.restlet.resource.ServerResource.get(ServerResource.java:648)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:530)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:590)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:302)
at org.restlet.resource.ServerResource.handle(ServerResource.java:849)
at org.restlet.resource.Finder.handle(Finder.java:513)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
at org.restlet.Application.handle(Application.java:391)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
at org.restlet.Component.handle(Component.java:391)
at org.restlet.Server.handle(Server.java:491)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
3-apr-2013 15.42.31 org.restlet.engine.log.LogFilter afterHandle
INFO: 2013-04-03 15:42:31 192.168.x.y PIPPO 192.168.x.y 8099 GET /activiti-rest/service/process-instance/35910 - 200 - 0 31 http://192.168.x.y:8099 Restlet-Framework/2.0.14 -
Any hint?
Thanks in advance.
Bye
Franco
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2013 11:03 AM
Can you explain this a bit more?
I understand that you complete a task that ends the process instance.
But in the stacktrace I see that you are retrieving the process instance details of that ended process instance.
And that process instance doesn't exist anymore, so you'll get an exception.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2013 04:17 AM
Hi,
I understand that you complete a task that ends the process instance.
But in the stacktrace I see that you are retrieving the process instance details of that ended process instance.
And that process instance doesn't exist anymore, so you'll get an exception.
That's true, but I think that Activiti should not throw any exception. As a matter of fact, if I call this REST API after a while, it responds the right way, telling me that the process exists, but it is completed:
{
"processInstanceId": "35910",
"businessKey": null,
"processDefinitionId": "valutazioneParallelaRichiestaOfferta:10:29604",
"startTime": "2013-04-02T09:21:22CEST",
"startActivityId": "avvioProcesso",
"startUserId": "PIPPO",
"completed": true,
……
I think that there is a problem that arises when you close a process and, during the closing phase, you invoke the "process-instance" API.
Thanks.
Bye
Franco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2013 10:34 AM
So I don't see how that could be solved without breaking a lot of other stuff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2013 05:27 AM
Thanks
Bye
Franco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2013 07:01 AM
Are you using async steps in your process? That could explain it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2013 05:47 AM
Sorry, but I didn't understand what do you mean with "async steps".
Thank you very much.
Bye
Franco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 07:40 AM
If you have two rest calls, I find it very hard to see why it would give different results depending on the timing … UNLESS the process using an asynchronous step, which means the first rest call would return before the process is actually done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 06:30 AM
http://www.francolombardo.net/wp-content/uploads/x.png
Each of the user tasks I defined is ended by a RAST call. They lead to task "Scelta percorsi" (the red A), which executes this code:
<java>
public class SceltaPercorsi implements ActivityBehavior {
public void execute(ActivityExecution execution) throws Exception {
List<PvmTransition> paths= calculateTheRightPaths();
execution.inactivate();
execution.takeAll(paths, new ArrayList<ActivityExecution>());
}
}
</java>
Under some circumnstances my code finds that the only possible path is toward task "Mail avviso commmerciale" (the red B).
Is this an "asynchronous step"?
Thanks.
Bye
Franco

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 07:24 AM
What's the code behind the calculateTheRightPaths method call?
Best regards,
