I have found that not all HTTP error codes are handled as a technical error for camunda… i.e a 404. Would the javascript below be an accurate approach to handle these codes so that if a 404 Camunda will create an incident ?
var statusCode = connector.getVariable(“statusCode”);
var headers = connector.getVariable(“headers”);
This is a workaround for handling the Service Task with HTTP Connector with JavaScript no response.
Try to change the endpoint of service to force the error handling. test-service.bpmn (11.3 KB)
I am facing the same issues. It seems none of the error codes are handled for http-connector. This should be mention in the documentation. Isn’t there any proper way to do so apart from workaround?
This is not working. We have tested this process and its giving error - HTCL-02007 Unable to execute HTTP request. Do you have any other method/approach/process for reference.
This does work for when you have a HTTP response (404, 400…) but when the server is unresponsive (failed connection) you get “HTCL-02007 Unable to execute HTTP request”.
Is there a way to overcome the non-response situation?
We have replaced connector activity with java delegate and invoked interface using camunda httpConnector. We had put try and catch block to raise exception.
@GChester1 Is absolutely right, we’ve never really prioritized fundamentally fixing the connectors. they do have a lot of draw back.
But I can tell you that at the moment we are in fact spending some time looking through all the issues and trying to work out how to move forward with Connectors. It’s pretty early still but we understand the frustration this feature can cause so there is going to something done to try to alleviate the problems somehow.
If you are already using Java Delegates it might be a better idea to implement the REST call as well within a Java Delegate instead of using the Connector.