Nuclos generic implementation: generic business objects (GBO), mapping, generic rules, wrapper class, getGenericBusinessObject.

globe with meridians Language: Deutsch · English

light bulb Generic implementation

One rule for many business objects: abstract commonalities in generic business objects instead of instanceof chains.

On this page

Why a generic implementation?

The generic implementation enables rules that apply to several business objects alike – e.g. sequential numbers or net/gross totals for quote, order, delivery note and invoice. Instead of instanceof chains you abstract commonalities in a generic business object (GBO).

Previously each type had to be checked individually in a rule:

final Modifiable<?> bo = context.getBusinessObject(Modifiable.class);
if (bo instanceof Geschaeftspartner) { ... }
else if (bo instanceof Angebot)      { ... }
else if (bo instanceof Auftrag)      { ... }

Menu: Configuration → Rule sets → Generic implementation

Configuration

A BO marked as generic (checkbox in the BO wizard) is required. Then the mapping is maintained:

Mapping of the generic implementation.

Terms

TermMeaning
GenericBusinessobject (GBO)abstracts commonalities of several BOs
Wrapper classgenerated class mapping GBO attributes to a BO
Implementing BOconcrete BO mapped to a GBO
Generic rulerule that works with GBOs

Aspects

Related pages

open book Server-side rules


Server rules.

Öffnen →

puzzle piece Business object


Mark as GBO.

Öffnen →