Camunda 8 Task Service with HTTP Rest connector not working

Following is BPMN model service task code
<bpmn:serviceTask id=“task4” name=“Task4” zeebe:modelerTemplate=“io.camunda.connectors.HttpJson.v1.noAuth” zeebe:modelerTemplateIcon=“data:image/svg+xml;utf8,”>
<zeebe:taskDefinition type=“io.camunda:http-json:1” />
<zeebe:input source=“http://localhost:9090/v1/task4/start” target=“url” />
<zeebe:input source="{ “name”:“name”, “activity”:“activity” }" target=“body” />
<zeebe:input source=“post” target=“method” />
<zeebe:header key=“resultVariable” value=“response” />
<zeebe:header key=“resultExpression” value="=name+" is running"" />

I have created local API at localhost:9090/v1/task4/start with Post method and I am using Camunda 8 SaaS platform to connect with operate API but Whenever process instance start it stucks at Rest service task.

Create Incident with following reason

Failed to invoke connector, received the following error: Connect to localhost:9090 [localhost/] failed: Connection refused (Connection refused)

Take a moment to think about where the REST call is running.

Since you’ve sent the work off to Zeebe SaaS, the REST call is originating on the Zeebe Cloud. Localhost is relative to where the worker is running, so it is going to try to connect to Zeebe Cloud on port 9090, which the Zeebe Team will logically block (they don’t have a service running there, so why would they allow connections)

If you want to make a call to your own REST interface, running on your own machine at port 9090, then the task worker would need to be working on your machine, or your REST interface would need to have a fully-qualified domain name and be exposed to the internet. (ie. Camunda Cloud would make a REST call to http://your.servername.example:9090 )

1 Like

You can use ngrok to put localhost on the Internet.


Yes, @GotnOGuts you are correct. But don’t you think that’s the issue as well that if I’m using Task Service as rest connector then I need to have working application (deployed on server). Have would any developer test it before that. Also in Self managed one Task service with HTTP rest connector not supported.

Yes - Connectors are not supported in Self-Managed yet.

You can test your API using ngrok, or deploy it to an Internet reachable VM in a cloud provider. Those are two popular ways to test with remote SaaS during development.


Yes I am trying with ngrok. But facing expression issue any documentation to understand http-connector expression used for response or variables

Here is the documentation for that: REST connector | Camunda Platform 8

Failed to evaluate expression ‘={ result:response.body.main}’

Any Explaination to this, I just need only body to be shown in this variable.

This really should be a different thread, with one of the above posts marked as a solution to your “unable to connect” issue.

The first question would ask on “Not able to parse response” would be: Is your response playload truly a JSON response, or is it something else?

1 Like

Yeah sure I’ll create another thread.