为什么调用camunda rest api时出现404错误

时间:2019-01-14 16:01:39

标签: spring-boot camunda

在调用camunda的rest引擎api时不使用此url

获取http://localhost:8081/orchestrator/engine-rest/process-definition/finance-process:1:73c2ea9d-15f7-11e9-9484-00155d076c61

我要404。请问您能找到我所缺少的吗?

与相同: http://localhost:8081/orchestrator/rest/engine/process-definition/finance-process:1:73c2ea9d-15f7-11e9-9484-00155d076c61

我已经将剩余的api依赖项添加到了pom

<dependency>
    <groupId>org.camunda.bpm.springboot</groupId>
    <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>

当直接调用引擎时,我得到资源:

http://localhost:8081/orchestrator/api/engine/engine/default/process-definition/finance-process:1:73c2ea9d-15f7-11e9-9484-00155d076c61

当使用Spring Boot执行器检查映射的URL时,我找不到/ engine-rest,因此请确保我在配置中缺少某些内容。

呼叫http://localhost:8081/orchestrator/rest/engine 返回

[
    {
        "name": "default"
    }
]

感谢您的帮助

1 个答案:

答案 0 :(得分:1)

我刚刚在网址中错过了引擎名称{default}:

添加它解决了我的错误:

http://localhost:8081/orchestrator/rest/engine/default/process-definition/finance-process:1:73c2ea9d-15f7-11e9-9484-00155d076c61/xml