Hi.
I´ve intent to create a instance of process (upload and download) using rest API.
http://localhost:8080/bonita/API/bpm/case/
params: (dataType:json, contenType:application/json)
{ “processDefinitionId”: 7641499513921091240, “variables”: [“myDocumentContract”: { “filename”: “07749533.pdf”, “tempPath”: “tmp_8964658850826963659.pdf”, “contentType”: “application/pdf” }]}
But it doesn´t work
{
“exception”: “class java.lang.IllegalArgumentException”,
“message”: “Can’t parse JSon”,
“stacktrace”: [
“org.bonitasoft.web.rest.server.framework.json.JSonSimpleDeserializer._unserializeTree(JSonSimpleDeserializer.java:62)”,
“org.bonitasoft.web.toolkit.client.common.json.JSonItemReader.parseItem(JSonItemReader.java:178)”,
“org.bonitasoft.web.toolkit.client.common.json.JSonItemReader.parseItem(JSonItemReader.java:168)”,
“org.bonitasoft.web.rest.server.framework.APIServletCall.getJSonStreamAsItem(APIServletCall.java:123)”,
“org.bonitasoft.web.rest.server.framework.APIServletCall.doPost(APIServletCall.java:212)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.doPost(ToolkitHttpServlet.java:188)”,
“javax.servlet.http.HttpServlet.service(HttpServlet.java:650)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:75)”,
“javax.servlet.http.HttpServlet.service(HttpServlet.java:731)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:226)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)”,
“org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)”,
“org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)”,
“org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)”,
“org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)”,
“org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)”,
“org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)”,
“org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)”,
“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:116)”,
“org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)”,
“org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)”,
“org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)”,
“org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)”,
“java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)”,
“java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)”,
“org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)”,
“java.lang.Thread.run(Thread.java:745)”
],
“cause”: {
“exception”: “class org.json.simple.parser.ParseException”,
“message”: “”,
“stacktrace”: [
“org.json.simple.parser.JSONParser.parse(Unknown Source)”,
“org.json.simple.parser.JSONParser.parse(Unknown Source)”,
“org.json.simple.parser.JSONParser.parse(Unknown Source)”,
“org.bonitasoft.web.rest.server.framework.json.JSonSimpleDeserializer._unserializeTree(JSonSimpleDeserializer.java:60)”,
“org.bonitasoft.web.toolkit.client.common.json.JSonItemReader.parseItem(JSonItemReader.java:178)”,
“org.bonitasoft.web.toolkit.client.common.json.JSonItemReader.parseItem(JSonItemReader.java:168)”,
“org.bonitasoft.web.rest.server.framework.APIServletCall.getJSonStreamAsItem(APIServletCall.java:123)”,
“org.bonitasoft.web.rest.server.framework.APIServletCall.doPost(APIServletCall.java:212)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.doPost(ToolkitHttpServlet.java:188)”,
“javax.servlet.http.HttpServlet.service(HttpServlet.java:650)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:75)”,
“javax.servlet.http.HttpServlet.service(HttpServlet.java:731)”,
“org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:226)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)”,
“org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)”,
“org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)”,
“org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)”,
“org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)”,
“org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)”,
“org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60)”,
“org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)”,
“org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)”,
“org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)”,
“org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)”,
“org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)”,
“org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)”,
“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:116)”,
“org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)”,
“org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)”,
“org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)”,
“org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)”,
“java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)”,
“java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)”,
“org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)”,
“java.lang.Thread.run(Thread.java:745)”
]
}
}
Thanks for your help !