Submitting a Case

I submit a case via the Web API. It returns 200 OK along with a new case id.

When I try to query the case variables, http://server/bonita/API/bpm/caseVariable?p=0&c=10&f=case_id=id, I get an error.

exception: "class org.bonitasoft.web.toolkit.client.common.exception.api.APIException" message: "Error when getting case variables" stacktrace: "[org.bonitasoft.web.rest.server.datastore.bpm.cases.CaseVariableDatastore.findByCaseId(CaseVariableDatastore.java:93), org.bonitasoft.web.rest.server.api.bpm.cases.APICaseVariable.runSearch(APICaseVariable.java:49), org.bonitasoft.web.rest.server.framework.APIServletCall.doGet(APIServletCall.java:165), org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.doGet(ToolkitHttpServlet.java:183), javax.servlet.http.HttpServlet.service(HttpServlet.java:617), org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:75), javax.servlet.http.HttpServlet.service(HttpServlet.java:723), org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:226), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206), org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206), org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235), 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.core.StandardHostValve.invoke(StandardHostValve.java:127), org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103), 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.Http11AprProcessor.process(Http11AprProcessor.java:879), org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617), org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760), java.lang.Thread.run(Unknown Source)]" api: "bpm" resource: "caseVariable"

Any clue as to why this is happening?

I figured it out. The case was being archived