One moment please...
 
 
Exact Synergy Enterprise   
 

Inheritance & Extensibility in the Repository

 

On this page

1. Introduction
2. About
2.1 Inheritance
2.2 Extensibility
3. Changes
4. Conclusion


1. Introduction

Currently we have introduced some advanced functionality. Now it is possible for business components to inherit or extend other business components and make use of its property and data components. The functionality will be handy for the SDK because it is possible to simply add a field to for example a resource component. This document describes the changes that have been made and how it should work.

2. About

2.1 Inheritance


What is inheritance?

When you are inheriting another business component you are actually saying that you want to add the properties and business logic from that business component to your own.

 

Example

You would like to create a new business component named “BankTransaction”. This works the same as the “GLTransaction” business component only with some additional validations, defaults and properties. The “BankTransaction” business component should inherit the “GLTransaction” business component and add its specific functionality.

 

1. Create the business component

 

2. Add a relation with the type “Inherits” to the other business component

 

3. When testing the component you will see it will exactly behave like “GLTransaction” but with the extra property

2.2 Extensibility


What is extensibility?

This feature is mostly used by the SDK when you would like to extend a business component with extra properties and business logic without changing the business component itself.

 

Example

You would like to add the insurance number to an account card using the SDK and without changing the “Contact” business component. To do this you should create a new business component named “Patient” and add the insurance property to the business component. Now you will extend the “Contact” business component with the “Patient” business component and the property insurance is available for the “Contact” business component.

 

1. Create the business component

 

2. Add a relation with the type “Extends” to the other business component

 

3. The extra property “Insurance” is added to the “Contact” business component

3. Changes

In order to make this functionality work some changes to the system have been made. The following targets are adjusted:

-         ERBusinesssComponentObjects.aspx: An extra tab shows the relation between the business component and another business component. It is also possible to add new relation (A business component can only inherit or extend on other business component).

-         ERComponentRelation.aspx: The maintenance application for the relation between components is changed that it supports the “inherits” and “extends” relation types. The options, parameter and enabled query properties are disabled because they don’t apply for the relation.

-         Er.sql: A change is made in the repository database script. The “ebcReadRepository” store procedure is adjusted to retrieve also the other data from the extended or inherited business component. The changes will be come available in the next Batch to Batch script.

-         Repository.xml: The repository definition xml contains the new component relation types; Inherits and Extends.

-         Repository.System.xml: Two browsers (ERProperty & ERSourceRelation) are adjusted so it is also possible to select the data components and properties from the extended or inherited component(s).

Like you see there is no need to update the repository because the store procedure is already adding the extra components and properties.

4. Conclusion

Happy coding ;-)


Applies to

  • Exact Synergy Enterprise 
  • Exact Online

     
 Main Category: Support Product Know How  Document Type: Online help main
 Category: SDK  Security  level: All - 0
 Sub category: General  Document ID: 13.681.301
 Assortment:  Date: 19-05-2018
 Release:  Attachment:
 Disclaimer