I am using JBPM 7.59, I have made a headless process on JBPM and running it through Rest API Calls. I have a scenario here in which I got stuck in GET Rest Api Call and eventually got Read Timeout.
So, my process run smoothly and I reached to that particular point in which my JBPM process call a REST API (implemented in JAVA) to execute particular business and in that business I want some details of that running process instance, so I call below Rest service of JBPM,
GET
/server/admin/containers/{containerId}/processes/instances/{processInstanceId}/nodes
Returns all nodes in a specified process instance.
which obviously means it will return all nodes of specified process instance, but when I call this above service it got stuck and eventually my Rest Client throw Read time out Exception. I have set 30 seconds for Timeout but this service normally not took more than 35ms in actual case but in this scenario it got stuck, I can understand if this is the scenario for PUT or POST calls but I cannot understand why it is happening in GET call.
Can anyone please help me on this issue?
TIA
Edited:
Below is the scenario of my JBPM process, where my process stuck. So when I complete this cas Signing Confirmation Task from API call, so my next node execute which is Signing Confirmation this is basically a Custom REST API call which eventually call to a Java method.
So in that Java method I'm calling below API
GET /server/admin/containers/{containerId}/processes/instances/{processInstanceId}/nodes
Returns all nodes in a specified process instance
which eventually got stuck and didn't give me any response.
Below is the java code which I'm using to call above API with (okHttp)
public static final OkHttpClient client = new OkHttpClient.Builder().connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS).readTimeout(60, TimeUnit.SECONDS).build();
Request req = new Request.Builder().url("http://localhost:8090/kie-server/services/rest/server/admin/containers/Signing_1.0.0-SNAPSHOT/processes/instances/213/nodes")
.addHeader(HttpHeaders.AUTHORIZATION, "Basic d2JhZG1pbjp3YmFkbWlu")
.addHeader(HttpHeaders.ACCEPT, "application/json")
.addHeader(HttpHeaders.CONTENT_TYPE, "application/json")
.addHeader(HttpHeaders.ACCEPT_ENCODING, "gzip, deflate, br");
String response = null;
try (Response res = client.newCall(req).execute()) {
String responseBody = res.body().string();
if (res.isSuccessful()) {
response = responseBody;
} else {
int responseCode = res.code();
}
} catch (IOException e) {
throw new JBPMClientException(JBPMClientException.COMMUNICATION_ERROR, e);
}
return response;
Got stuck on this line
Response res = client.newCall(req).execute()