Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Getting Ajax call fail error when running Activity or DT

SA-43283

Summary



Getting Ajax call fail error when running Activity or Data transform on a Button click from iOS Custom mobile application built on Pega 7.2.1.

On click of a button user's calling a Data Transform (DT) which has when rules and set-values.

Requirement is to hide and show a section on caseworker portal on click of a button. User is trying to set a property value to true or false on click and based on which the section will be shown or hidden.


Error Messages



"Configuration for Ajax request to call pzRunActionWrapper activity is not supported in offline"


Steps to Reproduce



1. Setup a user with offline enabled in access group and point to pyCaseWorker portal.
2. On pyCaseWorker portal, place a button on work list grid and configure Run Activity or Run Data Transform on click event.
3. Build iOS Custom mobile application by enabling offline capabilities.
4. Install ipa file and login to the application in online and click on the button configured.


Root Cause



Offline capability is to support purely offline applications that could periodically synchronize their data to Pega app server.

And calling an activity from a click event is not supported in an offline enabled app (despite being currently online) in Pega 7.2.1.
In Pega 7.2.1 the “Run DT” on button-click is also not supported.

So, neither the When rules inside DT nor the set-values doesn’t matter when the DT itself is not supported in offline.

In Pega 7.2.2 the support for “Run DT” has started.


Resolution



Here’s the explanation for the reported behavior:

Offline capability is to support purely offline applications that could periodically sync their data to Pega app server.

And calling an activity from a click event is not supported in an offline enabled app (despite being currently online) in Pega 7.2.1.

In Pega 7.2.1 the “Run DT” on button-click is also not supported. So, neither the When rules inside DT nor the set-values doesn’t matter when the DT itself is not supported in offline. In Pega 7.2.2 the support for “Run DT” has started.

Set-Value action on button click helps to set a property. For it to work in online/offline/browser/mobile the referred property should be present in DOM and so it must be referred somewhere on the screen.

or

1. Set RunScript on-click of a button
2. And call suppose “Test” function. Define your test function something like below:
function test()
{
var handle = pega.ui.clientcache.find(“pagename where the property is in”);
handle.put(“prop name”, “value”);
/*console.log(handle.get(“prop name”).getValue()); */
}

The function could probably be defined at the Harness level or Userworkform.

If at all users need to update properties pre- and post- of flowactions, then they could use preJS and postJS functions instead of DT’s. Define “preFlowAction$flowActionName” and “postFlowAction$flowActionName” in scripts and these could be referred at Harness level. In the ‘scripts and styles’ tab of Harness.

Most of the functionalities have alternatives/server proxies when in Offline.

And for PegaOffline related doubts, these pages in help could be helpful:

http://​​​​​​​ http://portName/prhelp/mobile/concepts/mob-offline-supported-actions-con.htm


Published December 6, 2017 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us