Using the Webhook connector Synchronously

Hi,

Is it possible to use the Webhook connector Synchronously?

As in, instruct it to wait until the End Event, or a named configured Task, before sending a response to the client?

As right now it’s behaviour, for me at least, is purely Asynchronous, as in:

  • The client sends a Request to the Webhook connector.
  • The Webhook connector sends a message back to the client, close the connection, and then starts the Workflow.

Ideally what I want is:

  • The client sends a Request to the Webhook connector.
  • The Webhook connector waits (until the End Event, a named Task be completed or a timeout) before sending the Response to the client.
  • The Webhook connector sends the Response to a client, which might include a Process Variable populated during the run of the Workflow.
  • The Webhook connector closes the connection to the client.

So, in sum, while I can use it perfectly Asynchronously, I don’t seem to be able to use it Synchronously, so, is it possible to use the Webhook connector Synchronously, and if so, how, please?

Thanks a million in advance,

Rove.

Hi @rovemonteuxelkov, welcome to the forums! Zeebe is an asynchronous process engine, so that is not natively supported. If you search the forums for Camunda 8 topics with the keyword “synchronous”, you will find lots of different ways to implement something resembling synchronous behaviors.

There are two popular ways I’ve seen to do this:

  1. Before the process ends, have one final task that sends a response back to your servers;
  2. Have an application that sits between your application and Camunda that manages the communication, and also polls Camunda for updates. This is how some of the community contributed REST API’s work, such as GitHub - jwulf/zeebe-rest-api: How do I access Zeebe over REST? Some ideas.
2 Likes

Hi @nathan.loding, thanks very much for this! Understood, I have drawn the two options and will give it a go, thanks very much for this again, immensely appreciated.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.