AnsweredAssumed Answered

Rest /repository/process-definitions returns errorMessage': 'unknown type 'processDefinition' processDefinition'

Question asked by pcolot on Nov 4, 2013
Latest reply on Feb 25, 2014 by jbarrez
Using activiti 5.14, the following REST service is not fully working:


GET with http://localhost:8080/activiti-rest/service/repository/process-definitions


The result is :

{
    "errorMessage": "unknown type 'processDefinition' processDefinition",
    "statusCode": 400
}


In the tomcat 7 log :


08:33:35,023 [http-apr-8080-exec-6] ERROR org.activiti.engine.impl.interceptor.CommandContext  - Error while closing command context
org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'processDefinition' processDefinition
        at org.activiti.engine.impl.form.FormTypes.parseFormPropertyType(FormTypes.java:55)
        at org.activiti.engine.impl.form.DefaultFormHandler.parseConfiguration(DefaultFormHandler.java:61)
        at org.activiti.engine.impl.form.DefaultStartFormHandler.parseConfiguration(DefaultStartFormHandler.java:34)
        at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.createStartFormHandlers(StartEventParseHandler.java:79)
        at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.executeParse(StartEventParseHandler.java:53)
        at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.executeParse(StartEventParseHandler.java:35)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:79)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractFlowNodeBpmnParseHandler.parse(AbstractFlowNodeBpmnParseHandler.java:27)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractActivityBpmnParseHandler.parse(AbstractActivityBpmnParseHandler.java:35)
        at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:73)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:407)
        at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.transformProcess(ProcessParseHandler.java:82)
        at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:44)
        at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:30)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:79)
        at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:73)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:367)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:190)
        at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
        at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
        at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:95)
        at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedProcessDefinitionById(DeploymentManager.java:57)
        at org.activiti.engine.impl.cmd.GetDeploymentProcessDefinitionCmd.execute(GetDeploymentProcessDefinitionCmd.java:37)
        at org.activiti.engine.impl.cmd.GetDeploymentProcessDefinitionCmd.execute(GetDeploymentProcessDefinitionCmd.java:27)
        at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
        at org.activiti.engine.impl.RepositoryServiceImpl.getProcessDefinition(RepositoryServiceImpl.java:122)
        at org.activiti.rest.service.api.RestResponseFactory.createProcessDefinitionResponse(RestResponseFactory.java:192)
        at org.activiti.rest.service.api.repository.ProcessDefinitionsPaginateList.processList(ProcessDefinitionsPaginateList.java:42)
        at org.activiti.rest.common.api.AbstractPaginateList.paginateList(AbstractPaginateList.java:75)
        at org.activiti.rest.service.api.repository.ProcessDefinitionCollectionResource.getProcessDefinitions(ProcessDefinitionCollectionResource.java:107)
        at sun.reflect.GeneratedMethodAccessor432.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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.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:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1780)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Nov 04, 2013 8:33:35 PM org.restlet.engine.log.LogFilter afterHandle
INFO: 2013-11-04        20:33:35        127.0.0.1       kermit  127.0.0.1       8080    GET     /activiti-rest/service/repository/process-definitions   -       400     -       0
        43      http://127.0.0.1:8080   Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36        -


but the following REST service is correctly working:


GET with http://localhost:8080/activiti-rest/service/repository/process-definitions/createTimersProcess:1:31


returns:


{
    "id": "createTimersProcess:1:31",
    "url": "http://localhost:8080/activiti-rest/service/repository/process-definitions/createTimersProcess%3A1%3A31",
    "key": "createTimersProcess",
    "version": 1,
    "name": "Create timers process",
    "description": "Test process to create a number of timers.",
    "deploymentId": "20",
    "deploymentUrl": "http://localhost:8080/activiti-rest/service/repository/deployments/20",
    "resource": "http://localhost:8080/activiti-rest/service/repository/deployments/20/resources/createTimersProcess.bpmn20.xml",
    "diagramResource": null,
    "category": "Examples",
    "graphicalNotationDefined": false,
    "suspended": false,
    "startFormDefined": false
}


Am I correctly using the API Rest ? Unless how to get the list of all process-definitions ?


Best regards

Pierre

Outcomes