Using the instance keyword, you can define instances of component objects that become part of your software component. You can only define instances of object classes that are either directly or indirectly derived from COOSYSTEM@1.1:ComponentObject.
The instance keyword must be followed by the object class of which an instance should be created, and by the reference of the new instance. You can use generic assignment statements inside the instance block to assign values to the properties of the instance.
Syntax |
instance objectclass reference { |
For maintaining a well-organized project structure, it is recommended that you create a separate .ducx-om file for defining instances of component objects although – from a syntactic point of view – you could define all object model-related elements within a single .ducx-om file.
Cloud profile note: Only component objects can be instantiated.
Example |
objmodel APPDUCXSAMPLE@200.200 // Definition and initialization of a document category // Definition and initialization of an active report |
Syntax |
extend instance <reference> { |
Using the extend instance keywords, it is possible to extend an existing component object.
The extend instance keywords must be followed by the reference of the component object to be extended. You can use generic assignment statements inside the extend instance block to assign values to the properties of the instance. The values are added to the current values of the extended object.
Cloud profile note: For instance extensions several restrictions apply. For a detailed overview, please refer to chapter “Object Model Language”.
Example |
objmodel APPDUCXSAMPLE@200.200 // Exclude order and invoice objects from the list of objects allowed |
Syntax |
update instance <reference> { |
Using the update instance keywords, it is possible to update selected properties of an existing component object.
The update instance keywords must be followed by the reference or the object address of the component object to be updated. You can use generic assignment statements inside the update instance block to assign values to properties of the instance. The values of the referenced properties are replaced by the values inside the block.
Cloud profile note: For instance update several restrictions apply. For a detailed overview, please refer to chapter “Object Model Language”.
Example |
objmodel APPDUCXSAMPLE@200.200 // Exclude exclusively order and invoice objects from the list of objects allowed |