The Numerators settings are provided by the Services Model. The figure below represents the layers of the Services Model.
The first layer contains all nodes obtained by the NodeGenerators.
The second layer is generated based on the code of the application's referenced modules. The values of this layer are the default values for the Services Model. The application project's .xafml file and the Model.User.xafml file do not participate in the generation of the second layer.
The third layer is loaded from the DB. The values of this layer are edited by the application administrator. Use Xafari Application Support to edit this layer.
Thus, there are two ways to design and configure Numerators:
- Use Model Editor (recommended for developers).
- Use Xafari Application Support (recommended for administrators).
Standard and Custom Behavior
The classical behavior of Numerator is provided by the Xafari.BC.Numerators.NumeratorBase class. The index is based on a numerical sequence, then you can decorate it with various features. See Getting Started and Learn More topics.
In addition, you can implement custom Numerator and define the unique algorithm of index creation. In this scenario, you need to inherit from the Xafari.BC.Numerators.CustomNumerator class. It exposes CustomApply event which occurs before the Numerator Service sets the property of the business object. Subscribe this event, in event's argument, set "Handled" parameter to "true", and implement custom logic to obtain Numerator's value.