REST API via Self Serviced no output result

Hello everyone ,

While testing the capabilities of a simple REST API call https://catfact.ninja/fact based on the attached bpmn diagram and the REST template above, there is a problem with the output result/
Despite the fact that I can see the input data displayed correctly,

I admit that the problem may be in the diagram or the attached template, the output is on the screen below.

Also, based on the specifics of version 8, I have launched a JAR HHTP worker. using the java -jar zeebe-http-worker-1.2.0.jar command , on the screen below is attached the process of launching it,

but when I check the “http://localhost:8080/actuator/health” I get the following: {“status”:“DOWN”}

Could you please advise if the reason is due to a non working Worker in DOWN status how can this be fixed , or is there any additional configurations that I am missing.

I will be very grateful for your timely reply. Thank you

REST_TEST.bpmn (4.2 KB)

JSON MAIN TEMPLANE below:

{
  "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
  "name": "REST connector",
  "id": "io.camunda.connectors.HttpJson.v2",
  "version": 1,
  "description": "Invoke REST API",
  "icon": {
    "contents": "data:image/svg+xml;utf8,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M17.0335%208.99997C17.0335%2013.4475%2013.4281%2017.0529%208.98065%2017.0529C4.53316%2017.0529%200.927765%2013.4475%200.927765%208.99997C0.927765%204.55248%204.53316%200.947083%208.98065%200.947083C13.4281%200.947083%2017.0335%204.55248%2017.0335%208.99997Z%22%20fill%3D%22%23505562%22%2F%3E%0A%3Cpath%20d%3D%22M4.93126%2014.1571L6.78106%203.71471H10.1375C11.1917%203.71471%2011.9824%203.98323%2012.5095%204.52027C13.0465%205.04736%2013.315%205.73358%2013.315%206.57892C13.315%207.44414%2013.0714%208.15522%2012.5841%208.71215C12.1067%209.25913%2011.4553%209.63705%2010.6298%209.8459L12.0619%2014.1571H10.3315L9.03364%2010.0249H7.24351L6.51254%2014.1571H4.93126ZM7.49711%208.59281H9.24248C9.99832%208.59281%2010.5901%208.42374%2011.0177%208.08561C11.4553%207.73753%2011.6741%207.26513%2011.6741%206.66842C11.6741%206.19106%2011.5249%205.81811%2011.2265%205.54959C10.9282%205.27113%2010.4558%205.1319%209.80936%205.1319H8.10874L7.49711%208.59281Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E%0A"
  },
  "documentationRef": "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/rest/",
  "category": {
    "id": "connectors",
    "name": "Connectors"
  },
  "appliesTo": [
    "bpmn:Task"
  ],
  "elementType": {
    "value": "bpmn:ServiceTask"
  },
  "groups": [
    {
      "id": "authentication",
      "label": "Authentication"
    },
    {
      "id": "endpoint",
      "label": "HTTP endpoint"
    },
    {
      "id": "input",
      "label": "Payload"
    },
    {
      "id": "timeout",
      "label": "Connect timeout"
    },
    {
      "id": "output",
      "label": "Response mapping"
    },
    {
      "id": "errors",
      "label": "Error handling"
    }
  ],
  "properties": [
    {
      "type": "Hidden",
      "value": "io.camunda:http-json:1",
      "binding": {
        "type": "zeebe:taskDefinition:type"
      }
    },
    {
      "label": "Type",
      "id": "authenticationType",
      "group": "authentication",
      "description": "Choose the authentication type. Select 'None' if no authentication is necessary",
      "value": "noAuth",
      "type": "Dropdown",
      "choices": [
        {
          "name": "None",
          "value": "noAuth"
        },
        {
          "name": "Basic",
          "value": "basic"
        },
        {
          "name": "Bearer token",
          "value": "bearer"
        },
        {
          "name": "OAuth 2.0",
          "value": "oauth-client-credentials-flow"
        }
      ],
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.type"
      }
    },
    {
      "id": "method",
      "label": "Method",
      "group": "endpoint",
      "type": "Dropdown",
      "value": "get",
      "choices": [
        {
          "name": "GET",
          "value": "get"
        },
        {
          "name": "POST",
          "value": "post"
        },
        {
          "name": "PATCH",
          "value": "patch"
        },
        {
          "name": "PUT",
          "value": "put"
        },
        {
          "name": "DELETE",
          "value": "delete"
        }
      ],
      "binding": {
        "type": "zeebe:input",
        "name": "method"
      }
    },
    {
      "label": "URL",
      "group": "endpoint",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "url"
      },
      "constraints": {
        "notEmpty": true,
        "pattern": {
          "value": "^(=|http://|https://|secrets).*$",
          "message": "Must be a http(s) URL."
        }
      }
    },
    {
      "label": "Query parameters",
      "description": "Map of query parameters to add to the request URL",
      "group": "endpoint",
      "type": "Text",
      "feel": "required",
      "binding": {
        "type": "zeebe:input",
        "name": "queryParameters"
      },
      "optional": true
    },
    {
      "label": "HTTP headers",
      "description": "Map of HTTP headers to add to the request",
      "group": "endpoint",
      "type": "Text",
      "feel": "required",
      "binding": {
        "type": "zeebe:input",
        "name": "headers"
      },
      "optional": true
    },
    {
      "label": "Bearer token",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.token"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "bearer"
      }
    },
    {
      "label": "OAuth token endpoint",
      "description": "The OAuth token endpoint",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.oauthTokenEndpoint"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Client ID",
      "description": "Your application's client ID from the OAuth client",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.clientId"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Client secret",
      "description": "Your application's client secret from the OAuth client",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.clientSecret"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Scopes",
      "description": "The scopes which you want to request authorization for (e.g.read:contacts)",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "optional": true,
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.scopes"
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Audience",
      "description": "The unique identifier of the target API you want to access",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "optional": true,
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.audience"
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Client authentication",
      "id": "authenticationType",
      "group": "authentication",
      "description": "Send client ID and client secret as Basic Auth request in the header, or as client credentials in the request body",
      "value": "basicAuthHeader",
      "type": "Dropdown",
      "choices": [
        {
          "name": "Send client credentials in body",
          "value": "credentialsBody"
        },
        {
          "name": "Send as Basic Auth header",
          "value": "basicAuthHeader"
        }
      ],
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.clientAuthentication"
      },
      "condition": {
        "property": "authenticationType",
        "equals": "oauth-client-credentials-flow"
      }
    },
    {
      "label": "Username",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.username"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "basic"
      }
    },
    {
      "label": "Password",
      "group": "authentication",
      "type": "String",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "authentication.password"
      },
      "constraints": {
        "notEmpty": true
      },
      "condition": {
        "property": "authenticationType",
        "equals": "basic"
      }
    },
    {
      "label": "Connection timeout",
      "description": "Sets the timeout in seconds to establish a connection or 0 for an infinite timeout",
      "group": "timeout",
      "type": "String",
      "value": "20",
      "binding": {
        "type": "zeebe:input",
        "name": "connectionTimeoutInSeconds"
      },
      "optional": true,
      "feel": "optional",
      "constraints": {
        "notEmpty": false,
        "pattern": {
          "value": "^(=.+|[0-9]+|secrets\\..+)$",
          "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression"
        }
      }
    },
    {
      "label": "Request body",
      "description": "Payload to send with the request",
      "group": "input",
      "type": "Text",
      "feel": "optional",
      "binding": {
        "type": "zeebe:input",
        "name": "body"
      },
      "condition": {
        "property": "method",
        "oneOf": [
          "post",
          "put",
          "patch",
          "delete"
        ]
      },
      "optional": true
    },
    {
      "label": "Result variable",
      "description": "Name of variable to store the response in. Details in the <a href=\"https://docs.camunda.io/docs/components/connectors/use-connectors/#result-variable\" target=\"_blank\">documentation</a>",
      "group": "output",
      "type": "String",
      "binding": {
        "type": "zeebe:taskHeader",
        "key": "resultVariable"
      }
    },
    {
      "label": "Result expression",
      "description": "Expression to map the response into process variables. Details in the <a href=\"https://docs.camunda.io/docs/components/connectors/use-connectors/#result-expression\" target=\"_blank\">documentation</a>",
      "group": "output",
      "type": "Text",
      "feel": "required",
      "binding": {
        "type": "zeebe:taskHeader",
        "key": "resultExpression"
      }
    },
    {
      "label": "Error expression",
      "description": "Expression to handle errors. Details in the <a href=\"https://docs.camunda.io/docs/components/connectors/use-connectors/#bpmn-errors\" target=\"_blank\">documentation</a>",
      "group": "errors",
      "type": "Text",
      "feel": "required",
      "binding": {
        "type": "zeebe:taskHeader",
        "key": "errorExpression"
      }
    }
  ]
}

Hi @adcim5d_bnym - can you share a bit more about how you’re running the process. Are you using the Cloud/SaaS offering, or are you running a self-hosted instance of C8 (either locally or deployed)? I tested the process you shared in Play Mode in Web Modeler and it worked as expected (retrieved a cat fact and stored it in the variable fact), so I suspect the issue has to do with the environment.

Hi, @nathan.loding yep, I have tested my case in web Modeler too and can see “fact” variable. So I deploy my diagram on the cloud according to a small instruction with the corresponding values and run it there,

There I also see the status of the worked process.

I don’t fully understand the correlation between the local setting of the HHTP worker and the running of my process on the cloud. Also could the reason be the down status for my worker?
Although shouldn’t zeebe and including basic wokers be running on the cloud by default?

Thank you in advance for your reply

First, I want to clarify some terminology. When I said “Camunda 8 Cloud” I meant Camunda’s cloud service. In this case, you are deploying to a self-managed instance, you just happen to have it deployed to a cloud environment :grin:

Because you are using a self-managed instance, you need to have the Connector Runtime running, and then you need to ensure the REST Connector is running as well (I am fairly certain it is included in our Docker images out of the box). The Connector Runtime is the glue that connects the the Connector Function to the process engine, and I suspect that might be the missing piece.