We have opened data instance in UI and all the data is present in pyDisplayHarness page in clipboard. We didn’t click on save button so data is not stored in database table. Now user clicks on create button and now the context is in the work class object so we want to pass few property values and pagelists from data instance to work class object context. Is there any way??
You can Declare pyDisplayHarness in page and classes of the pyDefault DT of case you are creating , then you can set the values in pyDefault DT of whatever values you would like to pass to Case context.
Have a Data Page (preferred - thread, Object Type of the data page should be Work Class- the case you’re trying to create) created. Source for that Data page should be a data transform. In that Data transform Map Properties from pyDisplayHarness to the properties in work class.
On the screen where you have Create typically it would have a Menu or just trigger creating a Work Class case instance. Before triggering that Create Work, run another place holder data transform in which you would just reference something like below:
.pyLabel = D_ABCPage.pyLabel
the above reference makes sure to trigger the Data page and do all the internal work.
Now while creating case there will be a default flow called pyStartCase on the case rule pyDefault. On the flow on Process tab under Case Creation Settings there will be a default data transform configured ‘pyDefault’ there you can map the properties from data page to Work page / pyWorkPage.
Not really the reason for that is the context switching. As soon as we go from dashboard where create button present to Create work it changes the Harness rule.
Typically we will have the harness rule configured on portal by default for which page context is Data-Portal, but when we switch it would be the Work- class context on top of Perform harness. For that purpose, it creates a new pyDisplayHarness in context of the current thread we are on which is Work class.
So just the reference of pyDisplayHarness page won’t help us here because it’s a different thread altogether.