Question
Accenture
CN
Last activity: 14 Mar 2022 8:30 EDT
Can I get results after run activity from JS
Hi every friends,
I have an issue for JS. When I use JS run an activity. How can I get any results from activity?
For Example Activity have any error and set in some property. JS can get this results and change some logic in JS.
In this code as below. Sometimes in activity has error. So JS want know this and do some alternate action.
var suURL = SafeURL_createFromURL(pega.u.d.url); suURL.put("pyActivity", activityName); suURL.put("pyClassName", className); suURL.put('ApplicationName', applicationName); var formEle = document.createElement('form'); formEle.id = "download_file"; formEle.method = "POST"; formEle.action = suURL.toURL(); if(pega.env.ua.webkit)formEle.target = ""; document.body.appendChild(formEle); formEle.submit(); document.body.removeChild(formEle);
Can you give me some suggestion for this. Thank you very much.
***Edited by Moderator Marije to add Capability tags***