Language: Deutsch · English
Java business rules on the server: bound to events, with access to business objects, providers and the full Nuclos API.
REFERENZ DEVELOPER UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
On this page
The Nuclos API enables Java-based business rules that read and write content on certain events. When the other low-code means are not enough, implement complex validations, calculations, web service calls or automatic data changes here.
API
The full API is documented at api.nuclos.de.
Menu: Configuration → Rule sets → Server-side rules
| Event | Rule interface(s) | Example |
|---|---|---|
| Create | InsertRule, InsertFinalRule | new record (e.g. invoice) |
| Update | UpdateRule, UpdateFinalRule | existing record (e.g. order) |
| Delete | DeleteRule, DeleteFinalRule | existing record |
| Status change | StateChangeRule, StateChangeFinalRule | e.g. open → reminder |
| Object generator | GenerateRule, GenerateFinalRule | e.g. delivery note from order |
| Button | CustomRule | user action in the layout |
| Job | JobRule | scheduled, recurring |
The rule editor is the central tool for editing rules. For convenient development/debugging there is also the IntelliJ integration.
Automatic compilation
The automatic compilation toggle temporarily disables compiling on save (useful for interdependent, not-yet-compilable rules). Note: uncompiled rules are not visible in the rule manager.
The „automatic compilation“ toggle in the rule editor.
Nuclos automatically generates representing objects for business objects, status models, data sources and reports (with getters/setters). If this metadata changes, dependent rules no longer compile – a direct hint at what to adjust.
BigDecimal
Decimal attributes are mapped to java.math.BigDecimal. Use BigDecimal.valueOf(double) instead of new BigDecimal(double) and always .divide(BigDecimal, RoundingMode) for division.
Providers offer functions to change content from rules: QueryProvider, StatemodelProvider, GenerationProvider, DatasourceProvider, BusinessObjectProvider, MailProvider, PrintoutProvider, ReportProvider, FileProvider.
delete() on dependent objects counts as a change.save() is needed to change other objects – this triggers their update/update-final rules.Endless loops
A save() on the context object in an UpdateFinalRule can cause an endless loop – consider disabling rule execution or SaveFlags.