Hello
I’m testing the http-connector as per the manual https://docs.camunda.org/manual/latest/reference/connect/http-connector/
However, I receive this error : No matching task with id 35e29aca-a82c-11e7-b2e7-dfb3d7c72917
Clearly it’s caused by : getConnector(HttpConnector.ID);
I have a service task with a java class definition referring to this .java file
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.connect.Connectors;
import org.camunda.connect.httpclient.HttpConnector;
import org.camunda.connect.httpclient.HttpResponse;
public class Test_ConnectorHttp_01_Camunda_01 implements JavaDelegate {
public void execute(DelegateExecution execution) throws Exception {
String vUrl = "http://localhost:28083/engine-rest/engine/";
HttpConnector http = Connectors.getConnector(HttpConnector.ID);
HttpResponse response = http.createRequest()
.get()
.url(vUrl)
.execute();
Integer responseCode = response.getStatusCode();
String responseBody = response.getResponse();
response.close();
System.out.println(responseCode + " : " + responseBody);
}
}
Update
I’m not making any progress on this.
I’ve tried HttpConnector http = Connectors.getConnector(“http-connector”);
but it is giving me the same No matching task with id … error
Am I using HttpConnector correctly?
As per the manual : https://docs.camunda.org/manual/7.4/user-guide/process-engine/connectors/#configure-the-process-engine-plugin I presume I do not have to configure it other than having added these dependencies to my pom
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-connect</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.connect</groupId>
<artifactId>camunda-connect-http-client</artifactId>
</dependency>