AnsweredAssumed Answered

How to call Webscript from workflow usertask create listener

Question asked by yash.patel.c2 on Jul 16, 2019

Hello everyone,

 

I am trying to call webscript from usertask's create listener. I tried following ways but getting error.

Alfresco.util.Ajax.jsonGet(
{
url: Alfresco.constants.PROXY_URI + "/datalist/getEmployeeValues",
successCallback:
{
fn: function(response, config)
{
var obj = eval('(' + response.serverResponse.responseText + ')');
logger.error("------Obj-------"+obj);
logger.error("-----Obj Length-----"+obj.length);

}
}
});

Above way is giving error that Alfresco is not defined.

 

var connector = remote.connect("alfresco");

var peopleJSONString = connector.get("/datalist/getEmployeeValues");
var data = jsonUtils.toObject(peopleJSONString);

Above is giving error that remote is not defined.

 

Can you please help me to solve this issue.

 

Thanks,

Yash

Outcomes