The bpmn file used for Spring broker is not working in zeebe broker. its giving condition expression error


#1

I am using some condition expression in my BPMN file for conditioning. it works fine in Spring Broker and also while deploying it was successful and works fine in workers too. but while deploying in Zeebe broker it’s giving some error

here is my expression

$.status != "WORK_IN_PROGRESS"

here is my code for deployement

    deploymentEvent = client.newDeployCommand()
    						.addResourceFromClasspath(resourceFileName).send().join();

here is errors from zeebe broker:

17:11:02.973 [io.zeebe.gateway.impl.broker.BrokerRequestManager] [gateway-zb-actors-0] ERROR io.zeebe.gateway - Error handling gRPC request
io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Command rejected with code 'CREATE': Expected to deploy new resources, but encountered the following validation errors:
'DemoProcess.bpmn': - Element: SequenceFlow_0pq1wk2 > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: Message_09a1wzl > extensionElements > subscription
    - ERROR: JSON path query is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_18z4aok > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_1ujntpf > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_0bqhk0r > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: maxQuantityIsCancelled > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_0sm3vdx > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_11bnmbf > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_1nsr9u9 > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: SequenceFlow_11ue6tf > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT
- Element: statusisCancelled > conditionExpression
    - ERROR: Condition expression is invalid: Unexpected json-path token ROOT_OBJECT

        at io.grpc.Status.asRuntimeException(Status.java:523) ~[grpc-core-1.19.0.jar:1.19.0]
        at io.zeebe.gateway.EndpointManager.convertThrowable(EndpointManager.java:257) ~[zeebe-gateway-0.17.0.jar:0.17.0]
        at io.zeebe.gateway.EndpointManager.lambda$sendRequest$2(EndpointManager.java:235) ~[zeebe-gateway-0.17.0.jar:0.17.0]
        at io.zeebe.gateway.impl.broker.BrokerRequestManager.lambda$sendRequest$1(BrokerRequestManager.java:90) ~[zeebe-gateway-0.17.0.jar:0.17.0]
        at io.zeebe.gateway.impl.broker.BrokerRequestManager.lambda$sendRequest$3(BrokerRequestManager.java:109) ~[zeebe-gateway-0.17.0.jar:0.17.0]
        at io.zeebe.gateway.impl.broker.BrokerRequestManager.lambda$sendRequestInternal$6(BrokerRequestManager.java:191) ~[zeebe-gateway-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.future.FutureContinuationRunnable.run(FutureContinuationRunnable.java:35) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorJob.invoke(ActorJob.java:90) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorJob.execute(ActorJob.java:53) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorTask.execute(ActorTask.java:189) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorThread.executeCurrentTask(ActorThread.java:154) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorThread.doWork(ActorThread.java:135) [zeebe-util-0.17.0.jar:0.17.0]
        at io.zeebe.util.sched.ActorThread.run(ActorThread.java:112) [zeebe-util-0.17.0.jar:0.17.0]

#2

Hi @regojoyson, @zelldon will be around a bit later and confirm or deny this - but I think this Zeebe Spring Broker example is deprecated. The last commit was in December 2018, and references Zeebe 0.13.

Between Zeebe 0.16 -> 0.17 the way payloads are handled changed. The error you see is because the BPMN diagram uses the older format - JSON Path - which extracts a variable from a JSON Payload.

Payloads are now distinct variables, rather than a single JSON document. So the expression for Zeebe 0.17 should be:

status != "WORK_IN_PROGRESS"

#3

Thanks @jwulf . its worked for me.

what about spring-zeebe-starter, Is this still thing or deprecated?

@jwulf @Zelldon @jangalinski


#4

One way to get a sense of the health of a project on GitHub is to check the number and dates of commits and issues. And compare that with the other repos in the project.

Some projects achieve stability and have low churn. Others are abandoned. Typically, if the number of open issues is increasing over time out of proportion to commits, it’s a signal that it is not under active development.

Actually, @menski is the main committer from the Zeebe team. And it looks like nothing has really happened this year.

Meanwhile in the Zeebe broker:


#5

The broker-starter is “only” a configurable wrapper around the zeebe-broker itself. So its quite natural that is has way less commits. Consider it “feature-complete” in a way, as long as no major API or configuration changes occur.

With zeebe 0.17.0 such an API change happened, and the ticket to fix this is still pending.

Help is appreciated.


#6

I create a PR for the Zeebe 0.17 upgrade https://github.com/zeebe-io/spring-zeebe/pull/55