REST Message - Workflow stuck at run script activity of calling API via Mid Server

dokhiem_nguyen
Tera Contributor

Hi @Everyone

 

I have one issue that needs the help from the community.

We built a workflow of one catalogue to call API (REST Message) via MID Server. In the workflow, there is a run script activity triggers the API handling logic (process ticket info, send request, receive response) via Script Include. In Script Include, especially for API call, we implemented the code below:

 

...

var rm = new sn_ws.RESTMessageV2(restMessage, httpMethod);
 rm.setRequestBody(request_body);
// prevent Discovery sensors running for the ECC input
rm.setEccParameter('skip_sensor', true);
var response = rm.executeAsync();
response.waitForResponse(180); // set timeout response for 180 seconds
...
 
Beside that, we also add gs.log to print the request payload before sending to API and response payload after receiving from API in the script for debug purpose

 

The problem here is that: After ticket is submitted from catalogue and approved, it comes to run script activity to call the script include to trigger API for process. However, for unknown reason, the run script activity is stuck at "Executing" state after 3 mins. When I checked in system log on the datetime of calling API, I saw that only request was printed in the system log while response was not. Additionally, as API is triggered via MID server, I also checked in ECC queue list, I noticed that the response at that datetime was come out in 'input' record normally with response time is over 30secs but less than 3 mins.

 

In community, are there anyone who has experienced the same issue? If yes, would you please let me know if there are any workaround/solution to tackle with it?

*Note: This issue happened quite intermittent on some RITM tickets.

 

Thanks!

0 REPLIES 0