Unable to create new process use run_process_with_result in pyzeebe module

I can connect it using Pyzeebe. But I can use the run_process function to create the new process but when I use the run_process_with_result, the error appear.

status = StatusCode.DEADLINE_EXCEEDED
details = “Time out between gateway and broker: Request ProtocolRequest{id=2240122, subject=command-api-2, sender=zeebe-0.zeebe-broker-service.bc2782ab-d0ae-4f73-a9d9-6751e28698de-zeebe.svc.cluster.local:26502, payload=byte{length=184, hash=-135082988}} to zeebe-1.zeebe-broker-service.bc2782ab-d0ae-4f73-a9d9-6751e28698de-zeebe.svc.cluster.local:26501 timed out in PT15S”
debug_error_string = “UNKNOWN:Error received from peer ipv4:34.149.253.152:443 {created_time:“2023-02-09T15:36:10.049999+11:00”, grpc_status:4, grpc_message:“Time out between gateway and broker: Request ProtocolRequest{id=2240122, subject=command-api-2, sender=zeebe-0.zeebe-broker-service.bc2782ab-d0ae-4f73-a9d9-6751e28698de-zeebe.svc.cluster.local:26502, payload=byte{length=184, hash=-135082988}} to zeebe-1.zeebe-broker-service.bc2782ab-d0ae-4f73-a9d9-6751e28698de-zeebe.svc.cluster.local:26501 timed out in PT15S”}”

pyzeebe.errors.process_errors.ProcessTimeoutError: Timeout while waiting for process Process_b0c9fbc0-9f98-418a-a703-728068dbae18 to complete.

I don’t know how to fix this… I think the application posts the information to camunda engine and gets the result after bpmn process. But I don’t know how to get the result when I don’t use run_process_with_result. (run_process_with_result meet error).

Hello @Yinshen_Tao ,

as explained in the docs, the CreateProcessInstanceWithResult command stays open until the process instance is completed OR the client times our OR loses connection.

This endpoint is made for very short-running processes (complete within seconds) where you require an instant result.

If you have long-running tasks, user tasks or catching events in the process, it will probably not be short enough to be run through this endpoint.

If you require process instance results, you could for example use a message end event and write back the results from the corresponding job worker.

I hope this helps

Jonathan

But the question is when I use run_process_with_result, it cannot pass the service task while the run_process function can pass it. I try to set the time_out parameter to run_process_with_result, but it cannot execute any service task.

Okay, I may know the error… I think I need to remove the await when I use run process with result (pyzeebe module).

1 Like