Processes are batch operations that execute business logic, generate reports, or perform data transformations. They’re the backbone of automated workflows in iDempiere.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/idempiere/idempiere/llms.txt
Use this file to discover all available pages before exploring further.
What Are Processes?
A process in iDempiere is a Java class that:- Executes business logic (imports, calculations, document generation)
- Generates reports (Jasper, PDFs)
- Runs scheduled tasks
- Performs database operations
- Generate invoices from shipments
- Import data from external systems
- Calculate commissions
- Run accounting processes
- Generate reports and exports
Process Types
iDempiere supports several process types:| Type | Description | Base Class |
|---|---|---|
| Server Process | Runs on server, no UI | SvrProcess |
| Client Process | Can run on client side | Implements ClientProcess |
| Java Process | Standard Java process | Implements ProcessCall |
| Report | Generates Jasper report | SvrProcess |
Creating a Process
Process Class Structure
All processes extendSvrProcess and implement two key methods:
Real Example: Cache Reset Process
Fromorg.compiere.process.CacheReset in the iDempiere source:
org.compiere.process.CacheReset (~/workspace/source/org.adempiere.base.process/)
@org.adempiere.base.annotation.Process- Auto-discovery annotation- Implements
ClientProcess- Can run on client or server - Simple, focused logic
Real Example: Invoice Generation
Fromorg.compiere.process.InvoiceGenerate:
org.compiere.process.InvoiceGenerate (excerpt)
Process Parameters
Defining Parameters
Extract parameters in theprepare() method:
Parameter Helper Methods
Context and Logging
Accessing Context
Logging
Database Operations
Using Model Classes
Direct SQL
Update/Delete Operations
Transaction Management
Error Handling
Registering a Process
Step 1: Create Process in Dictionary
Step 2: Add Parameters
Step 3: Add to Menu
Process Annotation
The@org.adempiere.base.annotation.Process annotation enables automatic discovery:
AD_Process.Classname, use the full class name:
Client vs Server Processes
Server Process (default)
Runs only on server:Client Process
Can run on client or server:ClientProcess when:
- Process needs to access client-side resources
- Process shows UI dialogs
- Process is quick and doesn’t need server resources
Best Practices
Use saveEx() instead of save()
Use saveEx() instead of save()
saveEx() throws an exception on failure, ensuring errors aren’t silently ignored:Always use transactions
Always use transactions
Pass
get_TrxName() to all model operations:Log progress for long processes
Log progress for long processes
Use meaningful return messages
Use meaningful return messages
@ symbols reference translatable messages.Handle interruption
Handle interruption
Next Steps
Model Validators
Handle document and model events
Model-Driven Architecture
Understand the Application Dictionary