-1

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

我引导 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.背景())

rpc error: code = Unimplemented desc = Method not found: gateway_protocol.Gateway/CreateProcessInstance

更新

由于downvote,我详细说明了这个问题,正确答案如下。只需将代理也更新到 1.0.1 版本

4

1 回答 1

2

如果更新客户端,还需要更新代理。看来您仍在使用旧版本的代理。

您现在使用的 go 客户端(已移至 camunda-cloud org)的版本为 1.0,并且仅与代理版本 1.0+ 兼容。

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

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

于 2021-06-30T06:29:09.167 回答