0
votes

I am getting a problem in worklight adapter , In the following http adapter method ,it is showing The mandatory parameter 'action' is missing, returning statusCode as 500 and statusReason as "Internal Server Error". I had given all the user credentials correctly in adapter xml file, but I don't know why I'm getting this error.

Code:

function actionOnProcessInstance()
{

var param = "/rest/bpm/bfm/v1/process/_PI:9003013d.4387342e.1efe573f.7c20307?action=resume";

var input = 
{
  method : 'put',
  returnedContentType : 'json',
  path : param,
};

var response = WL.Server.invokeHttp(input);

return response;

}
1
Can you see what's actually making it to your backend? Sounds like your action parm is being chomped along the way.rooftop

1 Answers

2
votes

In 5.0.5.x, invokeHttp will take any params provided on the path for put and post and place them inside the http body instead of having them remain on the path as query params (as the developer probably intended). This behavior will be updated in an upcoming version but for now there's no way to force these to stay as query params.