Skip to main content

JDito System Modules and System Variables

This chapter serves as a reference for two closely related topics in JDito:

  • the built-in system modules that provide platform functionality, and
  • the system variables through which ADITO exposes context-specific state to JDito processes.

When to use this chapter

Use this chapter mainly as a reference when

  • you need to identify the correct system module for a technical task,
  • you need to understand the scope or lifetime of a system variable, or
  • you want to inspect variables that are available in a specific process context.

System Modules

In JDito, all functionality beyond core JavaScript is provided through system modules. Each module groups methods and constants for a specific topic or technical domain.

Purpose and Use of Modules

A module typically contains all methods and constants related to its domain. For example, system.calendar contains functions for calendar entries, while system.db provides interfaces for database operations.

Constants act as readable aliases for cryptic values to improve code clarity. For example, instead of using the numeric value 7 to identify Apache Derby as a database type, JDito provides the constant db.DBTYPE_DERBY10 for better readability.

Methods allow developers to control ADITO behavior, for example by querying a database or updating a UI component. These methods are not the same as JDito functions written by developers in processes. JDito methods are implemented by the interpreter and expose core ADITO functionality.

To use any module, it must be imported at the beginning of the JDito process.

warning

The import statements must always appear at the very top of a process. If placed elsewhere, an error will occur.

Import Example

import { result } from "@aditosoftware/jdito-types";

// Code begins here
result.string("My result");

Available System Modules

A complete JDito API documentation is available.

JDito provides a range of system modules. Each module must be imported explicitly and provide access to a specific part of the ADITO platform.

Here is a list of the most important system modules:

System ModuleDescription
varsMethods for reading and setting variable values (component, field, system, local, image).
resultMethods for returning values to the ADITO core (used in value or display processes and server-processes).
utilUtility functions such as BASE64 encoding/decoding and UUID generation via getNewUUID().
textMethods for working with multi-string encoding/decoding, text formatting, parsing, and hashing.
loggingProvides logging functionality.
dbProvides methods and constants for interacting with databases: SELECT, UPDATE, DELETE, etc.
toolsDespite its name, this module handles user and role management.
translateProvides access to the ADITO translation subsystem.
datetimeIncludes methods and constants for handling dates, timestamps, and time zones.
fileIOMethods and constants for server-side file input/output operations.
eMathOffers safe arithmetic operations (add, subtract, multiply, divide, round) on String-based numbers. Supports both integer and decimal operations, along with rounding constants.
calendarsGroups all methods and constants for working with calendars and calendar entries.
mailMethods and constants for sending emails and handling email objects.
ctiContains methods and constants for integrating with telephone systems.
indexsearchContains methods and constants for indexing and searching with Solr.
netAllows REST/SOAP web service calls, URL validation, and retrieval of URL contents.
neonMethods and constants for controlling the Neon web client.
notificationMethods and constants for working with the ADITO notification system.
projectMethods and constants for accessing deployed project models, such as getAlias(), getDatamodel(), getInstanceConfigValue().
processProvides methods and constants for executing JDito processes immediately or on schedule.
reportInterfaces with the ADITO reporting engine.
packMethods and constants for ZIP archive operations.
pluginEnables calling ADITO plugins on the server side.

System Variables

System variables contain values provided by the ADITO core or assigned within JDito code. They always use the $ prefix and are accessed through system.vars via vars.get() and vars.set().

See Entity Model → System Variables for more information about system variables in the Entity Model environment.