Create Incident with Http-Connector

In our company we have web-services and use the camunda-workflow engine for orchestration.
So each “script-task” can only call web-services and I have only the modeler to configure it.

Now my problem is, that I can’t find a working way to evaluate the response status code and create in case of a status code != 200 || statusCode != 201 an incident.

The generate script task is configured Asynchronouse Before == true

How can I Archive that in case of an response-statuscode != 200 || response-statusCode != 201 an Incident is recreated?:

grafik

I suggest you take a look at this example project which explains the various ways you can make a rest call from Camunda.
It includes some important information on how to decide the best method to use based on your criteria.

2 Likes