工作灯适配器 [英] worklight adapter

查看:129
本文介绍了工作灯适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在worklight适配器中遇到问题,在下面的http适配器方法
中显示缺少必需参数'action',返回statusCode as
500 ,statusReason为内部服务器错误。我在适配器xml文件中正确地提供了所有用户凭据
,但我不知道为什么我收到此错误。

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.

代码:

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;

}


推荐答案

5.0 .5.x,invokeHttp将获取put和post路径上提供的任何参数,并将它们放在http体内,而不是让它们作为查询参数保留在路径上(正如开发人员可能想要的那样)。此行为将在即将发布的版本中更新,但目前无法强制这些行为保留为查询参数。

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.

这篇关于工作灯适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆