Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 2 Nächste Version anzeigen »

globe with meridians Language: Deutsch · English

open book Class generation and rule compilation

How Nuclos generates BOs, state models and more as Java classes – types, JAR order and timing.

REFERENZ APPLICATION DEVELOPER UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X

On this page

Why generated classes?

For rule programming Nuclos provides business objects, state models and other units objectified as Java classes. This keeps access from rules simple and type-safe. After a successful save, changes are immediately available in the classloader.

Naming convention

The package name matches the nuclet's (otherwise a default, e.g. org.nuclet.businessentity). Special characters, spaces or leading digits are replaced to be Java-compliant – class/method names may therefore differ from the metadata.

Generated class types

TypeSuffixPurpose
Business objectobjectified BO with getters/setters and query constants; QueryProvider.
State modelSMstates as constants State_<n> for the StatemodelProvider.
Work stepGENtype-safe generation class for the GenerationProvider.
Report datasourceDSobjectified data source for the DatasourceProvider.
ReportREreport with output formats for the report/printout (PDF only).
Printout (form)POform with output formats for the PrintoutProvider (PDF only).
Import structure definitionISDstructure definition for the ImportProvider.
System/nuclet parameterparameter constants for the ParameterProvider.

Example of a business object incl. query constants:

public class Adresse extends AbstractBusinessObject implements Modifiable {

	// Konstanten für den QueryProvider
	public static final Attribute<Boolean> Standard = 
		new Attribute<Boolean>("Standard", "org.nuclet.basis", "Adresse", new Long(40005905), "standard", new Long(40006275), Boolean.class );

	public static final StringAttribute<String> Postfach = 
  		new StringAttribute<String>("Postfach", "org.nuclet.basis", "Adresse", new Long(40005905), "postfach", new Long(40006271), String.class );

	public java.lang.Boolean getStandard() {
		return getField("standard", java.lang.Boolean.class); 
	}

	public void setStandard(java.lang.Boolean pStandard) {
		setField("standard", pStandard); 
	}

	public java.lang.String getPostfach() {
		return getField("postfach", java.lang.String.class); 
	}

	public void setPostfach(java.lang.String pPostfach) {
		setField("postfach", pPostfach); 
	}
}

Example of a state model class:

public class AuftragSM{
	public static State State_10 = 
   		new StateImpl(IdUtils.toLongId(40006496), "Entwurf", "Geplant", 10, IdUtils.toLongId(40006477));
	public static State State_90 = 
 	   	new StateImpl(IdUtils.toLongId(40006497), "Abgeschlossen", "Abgeschlossen", 90, IdUtils.toLongId(40006477));
	public static State State_50 = 
	    new StateImpl(IdUtils.toLongId(40006498), "Offen", "Offen", 50, IdUtils.toLongId(40006477));
	public static State State_99 = 
	    new StateImpl(IdUtils.toLongId(40006499), "Storniert", "Storniert", 99, IdUtils.toLongId(40006477));
}

Compilation & order

The classes are compiled grouped by type into separate JARs in the CodeGenerator directory and added to the classloader:

TypeJAROrder
Business objectsBOEntities.jarfirst – only access BO metadata.
State model classesstatemodels.jarindependent.
Report datasource classesReportDSEntities.jarindependent.
Report classesReportEntities.jarindependent.
Printout classesPrintoutEntities.jarindependent.
Import structure definitionImportStructDefsEntities.jarindependent.
ParametersParameter.jarindependent.
Work step classesGeneration.jarafter the business objects (source/target objects).
Rules & librariesNuclet.jarlast – uses all other classes; fails on errors or invalid references.

When generation happens

  • System start: all classes are rebuilt (directory is cleared); on errors the server still starts.
  • Nuclet import: all classes are deleted and regenerated.
  • Runtime: on changes to BO/state model/report/work step, affected classes and the Nuclet.jar are rebuilt.

Keep references consistent

If, say, a status numeral changes (40 → 50), a rule still addressing status 40 no longer finds it – the Nuclet.jar then cannot be built. All references must be updated manually.

Related pages

gear Rule sets


Rules.

Öffnen →

electric plug Supporting classes


Providers.

Öffnen →

package Nuclet


Building block.

Öffnen →

  • Keine Stichwörter