Support Article

runDataTransform() runs in context of incorrect page on Mobile

SA-36985

Summary



A data transform is called from the pre-js function of a Question shape when the case is opened from worklist.

The user is calling pega.offline.runDataTransformjavascript API and passing the pageName parameter as null because they want to use the primary page context.

When they open the work object from the worklist, the data transform attempts to run in the context of pyDisplayHarness instead of pyWorkPage.


Error Messages



Not Applicable

Steps to Reproduce



1) Create a new single value property in the Work class.
2) Create a data transform that sets that property with some value.
3) Add that data transform to the offline 'Whitelist'.
4) Call that data transform from the pre- javascript function configured on the smart question shape, using the: pega.offline.runDataTransform("myDataTransFormName","myDataTransformClass",null).
5) At runtime, use Chrome USB debugging with Mobile device.
6) Open the work object from the worklist and arrive at the question shape in the flow, check the browser console to verify if the data transform Api ran and the page context in which it ran.


Root Cause



Data transform called from the pre-javascript of the question shape is executing in the context of pyDisplayHarness instead of pyWorkPage when pageName parameter is sent as null.

The page context is not set to pyWorkPage in displayHarness method of open assignment and onHaveWorkObject method.

Resolution



Apply HFix-33931.

Published April 24, 2017 - Updated May 10, 2017

Have a question? Get answers now.

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