How to call Webscript from workflow usertask create listener

cancel
Showing results for 
Search instead for 
Did you mean: 
yash_patel_c2
Established Member

How to call Webscript from workflow usertask create listener

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