Hello,
I have run into issue that REST API call on Postman success, but in IBM Process Designer fails. IBAW version 21.0.3
any idea where could be a problem? On postman I do have exact same call and no issue at all.
this is the call:
var request = new BPMRESTRequest();
request.externalServiceName = "CSS Query_2";
request.operationName = "graphql";
request.httpMethod = "POST";
request.httpHeaders = {
"Jwt-Assertion": tw.local.authToken.accessToken,
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json",
"Cache-Control": "no-cache"
};
var requestBody = {
"query": "query getInvolvedPartyByGcn {\r\n technicalInvolvedPartiesByGcns(gcns:[\"00332640370005\"]) {\r\n involvedPartyId\r\n partySites\r\n {id\r\n createdAt\r\n siteCode\r\n activeFlag\r\n instanceId\r\n sebisId\r\n originType\r\n glIpType\r\n}\r\n}\r\n}"
}
request.parameters = {
requestBody: requestBody,
};
request.endpointAddress = "https://api.dev.sebank.se/internal/css-query/v1/graphql";
request.requestTimeout = 2000;
request.responseTimeout = 7200;
log.info("POSTKurreREQUEST" +JSON.stringify(request));
try {
var response = tw.system.invokeREST(request);
if(response.httpStatusCode !== 200){
throw response.httpStatusMessage + " " + response.httpStatusCode + " " + response.content;
} else {
}
} catch (e){
throw new Error(e);
}
Error message:
CWTBG0019E: Unexpected exception during execution. Exception information: 'com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: An exception occurred in activity "Script Task" of "Service Flow" with name "Get Kurre Data API 2". Task instance id "Task.887488". Details: "com.lombardisoftware.core.TeamWorksRuntimeException [TeamworksException name='Script Evaluation: Component.Script.c59e76bb-f949-44fb-a70b-92293e49ca70', message='Internal Script error: Error: Not Found 404 {"message":"no Route matched with those values"}', line=37, pos=-1 nested=<none>]".'.</none>------------------------------
Donata Mielaikaite
------------------------------