How to convert an http-connector service task to an external task

Hi ,
I have process instance created with service tasks (using connector) but I did not see any property by which I could set a timeout for the camunda connector.So am planning to have a call to the microservices as an external task.

<serviceTask id="step2" name="Task One">
        <camunda:inputParameter name="url">http://localhost:8080/test</camunda:inputParameter>
        <camunda:inputParameter name="method">POST</camunda:inputParameter>
        <camunda:inputParameter name="headers">
            <camunda:entry key="Accept">application/json</camunda:entry>
        <camunda:inputParameter name="payload">
          <camunda:script scriptFormat="Javascript">"--Input Java Script--</camunda:inputParameter>
        <camunda:outputParameter name="Result">
          <camunda:script scriptFormat="Javascript">S(response,'application/json').prop('key').value()</camunda:script>

Can anyone please advice me how to make the above connector configuration to that of an external task or Any possibility to wait for the connector task’s response and throw time out if there is no response for a particular period of time.

Note: I need to carry forward the response from the service task to the next service task(next microservice).

Thanks and Regards,

Connectors and request timeout have been covered a little bit: Set timeout for http-connector service task

If you want to replace it by an external task, just implement the external task from scratch (with your favourite library for HTTP requests) and remove the connector. The external task APIs allow retrieving variables when fetching a task and submitting variables when completing a task. That way you can share responses between tasks.

1 Like

@Albin_Chandy here is a example of replacing the http-connector: Replacing Http-Connector with Jsoup usage

1 Like