N NezamDocumentation

Business Language#

Business Language is the domain language used by Nezam ERP modules. It models data shape, configurable policy, executable behavior, user interfaces, integration surfaces, deployment resources, and user-facing failures in a single package.

File roles#

File suffixPurpose
.fields.blReusable field types and scalar constraints
.tables.blPersistent entities and configuration tables
.functions.blQueries, commands, validations, and orchestration
.services.blService-facing operations and integration boundaries
.messages.blDeclared message catalog for user-facing failures
.validations.blValidation rules when separated from command logic

Grammar-backed areas#

The language grammar currently covers these authoring areas:

AreaStart here
Packages and modulesModules and namespaces
Syntax basicsSyntax basics
DeclarationsDeclarations
Data declarationsData modeling
Table schemasTable schema reference
Types and literalsTypes and literals
ExpressionsExpressions
StatementsStatements and control flow
SQL-like operationsQueries and DML
Function declarationsFunction declarations
Function and service patternsFunctions and services
Classes and interfacesClasses and interfaces
Rules, tests, and errorsRules, tests, and errors
Validation declarationsValidation rule blocks
Test declarationsTest declarations
Test coverage patternsTesting language behavior
Lifecycle subscriptionsLifecycle subscriptions
Services and HTTP APIsServices and APIs
Forms and app UIApps, forms, and controls
Source UI layoutsSource UI layouts
Infrastructure declarationsResources and deployments
AnnotationsAnnotations
Configuration declarationsConfiguration declarations
Configuration tablesConfiguration tables
Configuration resolver patternsConfiguration resolver patterns
Messages and errorsMessages and errors
Grammar assetsGrammar reference

Minimal module#

bl
field VendorId: string {
  max_length: 40;
  key: true;
}

table Vendor {
    field vendor_id: VendorId key origin;
    field company_code: CompanyCode key;
    field vendor_name: string max_length(120);
    field active: bool default(true);
}

public function get_vendor(vendor_id_param: VendorId): Vendor? {
  select var vendor: Vendor
    where Vendor.vendor_id = vendor_id_param;
  return vendor;
}

Core rule#

If behavior can vary by company, tenant, country, process, or date, represent it as configuration data and resolve it explicitly. Do not hide missing configuration behind defaults.

Source: packages/business/language/index.md