移动到 camunda-cloud lib 后无法创建流程实例

Cannot create process instance after moving to camunda-cloud lib

我开发小程序与 Zeebe 交互。我使用 golang 版本 1.16 和这个库 github.com/zeebe-io/zeebe/clients/go 来访问 brooker.

我 bootstrap 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,也移动到另一个 repo 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 org)是 1.0 版本,仅与代理版本 1.0+ 兼容。

grpc gateway_protocol.Gateway/CreateProcessInstance 仅存在于 1.0+ 中,以前称为 CreateWorkflowInstance。工作流术语的使用已被流程取代,在代码库中无处不在。

您可以在发布公告中阅读更多相关信息 https://camunda.com/blog/2021/05/camunda-cloud-10-released/