Using API REST 5.9.1 to execute deleteAllProcessInstances with a process instance uuid that exists in history, I received this:
Bonita Error: bai_RAPII_5
Can't find a process with uuid COS_Post_Production--1.1--788
org.ow2.bonita.facade.impl.RuntimeAPIImpl.deleteAllProcessInstances(RuntimeAPIImpl.java:358)
org.ow2.bonita.facade.impl.RuntimeAPIImpl.deleteAllProcessInstances(RuntimeAPIImpl.java:347)
sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.ow2.bonita.facade.APIInterceptor$APIInterceptorCommand.execute(APIInterceptor.java:115)
org.ow2.bonita.facade.APIInterceptor.invoke(APIInterceptor.java:183)
$Proxy26.deleteAllProcessInstances(Unknown Source)
sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.ow2.bonita.facade.rest.RESTServerAPIInterceptorCommand.doInvocation(RESTServerAPIInterceptorCommand.java:119)
org.ow2.bonita.facade.rest.RESTServerAPIInterceptorCommand.execute(RESTServerAPIInterceptorCommand.java:97)
org.ow2.bonita.services.impl.DefaultCommandService.execute(DefaultCommandService.java:44)
org.ow2.bonita.runtime.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:45)
org.ow2.bonita.services.impl.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
org.ow2.bonita.services.impl.RetryInterceptor.execute(RetryInterceptor.java:59)
org.ow2.bonita.facade.rest.RESTServerAPIInterceptor.invoke(RESTServerAPIInterceptor.java:53)
$Proxy26.deleteAllProcessInstances(Unknown Source)
org.ow2.bonita.facade.rest.RESTRemoteRuntimeAPIImpl.deleteAllProcessInstances(RESTRemoteRuntimeAPIImpl.java:63)
sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:124)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:212)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:202)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:441)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:722)
COS_Post_Production--1.1--788