我开发了一个小程序来与Zeebe交互。我使用golang版本1.16和这个库github.com/zeebe/zeebe/client/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版本即可。
发布于 2021-06-30 06:29:09
如果更新客户端,还需要更新代理。看来你还在使用老版本的经纪人。
您现在使用的go客户端(已经移动到camunda org)在1.0版上,并且只与代理版本1.0+兼容。
grpc gateway_protocol.Gateway/CreateProcessInstance只存在于1.0+中,以前称为CreateWorkflowInstance。工作流术语的使用已经被代码库中的任何地方的流程所取代。
您可以在发布公告https://camunda.com/blog/2021/05/camunda-cloud-10-released/中读到更多有关这方面的内容。
https://stackoverflow.com/questions/68179311
复制相似问题