Support Article
Error while invoking activity using Ajax in function
SA-104389
Summary
Pega Platform 8.2.5 is used with Pega Mobile Client 7.
On performing an Ajax call to invoke an activity and enabling the oAuth2 for the mobile application, the response is returned as unauthenticated. However, the same code works correctly from Pega Designer Studio and the Case Worker portal.
Error Messages
Unauthenticated operator ID
Steps to Reproduce
- Create an oAuth2 Service Package for the Pega mobile application.
- Log in to the mobile application.
- Invoke the function that calls a JQuery AJax Request to retrieve data from the activity.
Root Cause
A defect in Pegasystems’ code or rules.
oAuth2 Access token was missing when the activity was invoked using JQuery.
Resolution
Perform the following local-change to invoke the activity:
Use the Pega out-of-the-box oSafeURl.put method AJAX function instead of JQuery.
Published April 15, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.