在 camunda-cloud lib 中无法成功启动流程实例
时间:2024-03-23
浏览:141
作者:佚名
在使用 camunda-cloud 1.0.1 版客户端库访问 Zeebe 时,创建流程实例时出现 "rpc error: code = Unimplemented desc = Method not found: gateway_protocol.Gateway/CreateProcessInstance" 错误。
我开发了与 zeebe 交互的小程序。我使用golang版本1.16和这个库github.com/zeebe-io/zeebe/clients/go来访问brooker。
我引导 zeebe 客户端,然后使用以下代码创建已部署建模流程的流程实例:
brokeraddr := os.getenv("zeebe_broker_address")
zbclient, err := zbc.newclient(&zbc.clientconfig{
gatewayaddress: brokeraddr,
useplaintextconnection: true,
keepalive: 1 * time.second,
})
if err != nil {
panic(err)
}
request, err :=zbclient.newcreateinstancecommand().bpmnprocessid(triggerdataconfig.processid).latestversion().variablesfromobject(variables)
if err != nil {
panic(err)
}else
{
result, err := zeeberequest.send(context.background())
}
然后我切换到新的客户端库 1.0.1,还移动到另一个存储库github.com/camunda-cloud/zeebe/clients/go,现在当我尝试时出现此错误发送请求zeeberequest.send(context.background())
rpc error: code = Unimplemented desc = Method not found: gateway_protocol.Gateway/CreateProcessInstance
更新
由于否决,我详细阐述了这个问题,正确答案如下。只需将代理也更新到 1.0.1 版本即可
正确答案
如果您更新客户端,您还需要更新代理。您似乎仍在使用旧版本的代理。
您现在使用的 go 客户端(已移至 camunda-cloud 组织)版本为 1.0,仅与代理版本 1.0+ 兼容。
grpc gateway_protocol.Gateway/CreateProcessInstance 仅存在于 1.0+ 中,以前称为 CreateWorkflowInstance。工作流术语的使用已被流程所取代,在代码库中随处可见。
您可以在发布公告 https://camunda.com/blog/2021/05/camunda-cloud-10-released/ 中了解更多相关信息
到这里,我们也就讲完了《在 camunda-cloud lib 中无法成功启动流程实例》的内容了。个人认为,基础知识的学习和巩固,是为了更好的将其运用到项目中,欢迎关注golang学习网公众号,带你了解更多关于的知识点!
本文内容来源于互联网,如有侵权请联系删除。
近期热门
站内热门
最新文章
热门专题
