部署flowable遇到问题:curl: (26) couldn‘t open file “holiday-request.bpmn20.xml“

在部署Flowable时遇到curl错误(26),无法打开'holiday-request.bpmn20.xml'文件。解决方法包括提供文件的完整路径或将文件复制到cUrl执行的目录。此外,Windows环境下cURL命令中的单引号和JSON字符串的双引号也可能导致问题,需适当转义。

部署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命令提示符,因为使用单引号

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值