· Apr 25

Possible to export a class without specific members?

Is there a way to exclude specific members from a class when exporting to an XML or UDL file? Bonus question: is there a way to import from that file without overwriting those members that were excluded?

The use case is to export an interoperability production class without the ProductionDefinition XDATA. We plan to source control the production items through the Ensemble Deployment Manager, but we still need to export any custom code in the class definition itself.

Product version: IRIS 2023.1
$ZV: IRIS for Windows (x86-64) 2023.1.3 (Build 517U) Wed Jan 10 2024 13:35:31 EST
Discussion (3)1
Log in or sign up to continue

Hi Pravin,

afaik this is not possible.

I would suggest revisiting the design. If you need custom code to be able to extend your production, then include code hooks that will be called if implemented.


In your production class include code during processing that checks for classes inheriting froma specific abstract class you also defined and call the respective method. Now any customisation can be done by inheriting from the abstract class and overwriting the respective methods.

We found a way to do the second part, importing the class from a file without overwriting a specific member. The trick is:

  • open the old class definition with ##class(%Dictionary.ClassDefinition).%OpenId("class name")
  • create a clone with %ConstructClone()
  • load the class from the file without compiling it
  • open the new class definition
  • copy the member you want (in this case production definition XDATA) from the clone to the new class definition, and save the new class definition
  • finally, compile the class.