部署flowable遇到问题:curl: (26) couldn’t open file “holiday-request.bpmn20.xml”
部署过程中遇到问题1: 解决办法:添加holiday-request.bpmn20.xml的完整路径或者把该文件复制到当前cUrl执行的路径 问题2:
curl: (3) Port number ended with 'h'
curl: (6) Could not resolve host: variables
curl: (3) [globbing] bad range specification in column 2
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: value
curl: (6) Could not resolve host: John Doe
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (3) [globbing] unmatched brace in column 1
curl: (3) Port number ended with 'n'
curl: (6) Could not resolve host: 7
curl: (3) [globbing] unmatched close brace/bracket in column 1
{"timestamp":"2021-10-29T03:37:02.496+00:00","status":404,"error":"Not Found","path":"/flowable-rest/service/runtime/process-instance"}
背景: 在学习 flowable 工作流的官方文档时, https://tkjohn.github.io/flowable-userguide/ 2.4.3. 启动流程实例 复制文档的
curl --user rest-admin:test -H "Content-Type: application/json" -X POST -d '{ "processDefinitionKey":"holidayRequest", "variables": \[ { "name":"employee", "value": "John Doe" }, { "name":"nrOfHolidays", "value": 7 }\]}' http://localhost:8080/flowable-rest/service/runtime/process-instances
解决方案: cURL命令后不工作在Windows命令提示符,因为使用单引号,
把单引号改成双引号,把类似 { “name”:“nrOfHolidays”, “value”: 7 } 中的双引号使用 ‘’ 转义一下.即可. 修改后完整版如下:
curl --user rest-admin:test -H "Content-Type: application/json" -X POST -d "{ \"processDefinitionKey\":\"holidayRequest\", \"variables\": [ { \"name\":\"employee\", \"value\": \"John Doe\" }, { \"name\" :\"nrOfHolidays\", \"value\": \"7\" }]}" http://localhost:8080/flowable-rest/service/runtime/process-instances
参考博客:flowable部署时遇到的问题:curl: (26) couldn‘t open file “holiday-request.bpmn20.xml“ 使用flowable 6.1.2 REST API 运行请假审批流程 cURL命令后不工作在Windows命令提示符,因为使用单引号
|