Question
Best approach to share Data between Org and Framework layer
When One creates Data on Org Layer what is the best approach when one needs to access or reference Work Objects coming from FW or Impl layers.
This is because in some situation one might need to access the FW layer work object (pyWorkPage) in the Data classes in Org Layer. For example when one displays Data Items from Org layer in the Section having Grid Layout in FW layer and invoke some Data transform then in such case, the Primary page defaults to the Data Class of the Org layer. But Org layer cannot see the Work Object Class from FW layer and has no visibility to the FW ruleset or FW layer.
I see several approaches to get this work or how its used in real life
1. Use Editable data Page to share data between 2 layers (FW and Org)
2. Use Ruleset Restriction in the Advanced setting of the Class in Data layer so as to include FW layer ruleset in the Class MyCo-Data-ClassA
( Also done in LSA exercise - although not a good practice but easier to achieve)
3. Extend Data class to FW layer . Create MyCo-FW-Data-ClassA ---(direct inheritence) --> MyCo-Data-ClassA. Once extended Data transforms can be created here (requires more work and additional classes)
4. Polymorphic pattern ( Not sure if the would work on different Ruleset)
Org Ruleset : --> Org Ruleset
MyCo-Data-ClassA
|--DataTransform needs to access pyWorkPage (MyCo-FW-Work-WorkClass ) ?
FW Layer: --> FW Ruleset
MyCo-FW-Work-WorkClass
Can someone suggest best approach to achieve this ?
Apologies because I'm not really going to answer your question, but rather question why you've decided to access a FW WO from an Org data class. If you inherited that Org data class from an app using a different FW then wouldn't that section fail to load? On first glance this seems more like a data model design issue rather than an implementation one.
If the section uses FW WO's then why don't you just apply the section within the FW?