This document is your Guide to using Business Logic. There are numerous references to the Tutorial, an important resource in mastering Business Logic.
Installation and Configuration
Please see Downloads for information on how to download, install and verify Automated Business Logic. Consult the Configuration Guide for information on configuring your project for Automated Business Logic.
Organizing and Managing Business Logic Projects
The challenges and skills in managing a project are no different with Business Logic Projects. In addition, we suggest these additional considerations for Managing Business Logic Projects.
Business Logic and your Project's Life Cycle
The sub-sections below describe how Automated Business Logic can be leveraged at various stages in your project's Life Cycle.
Use your existing methodology to uncover Business Processes and Use Cases. Automated Business Logic can enhance this process as described in the sub-sections below.
Logicdoc provides a mechanism to capture the Use Case Requirements, with traceability to the Business Logic that implements them. This information is published through Javadoc (like this), with special services to enable Business Users to read the relevant business-oriented sections (like here).
Alert: excessive design
Be aware that Automated Business Logic services eliminate many key elements of design, such as delineating the individual Use Cases for adjustment. Extension services (such as allocation) introduce concepts that can significantly increase the level of abstraction in team communications.
In particular, watch out for extended pseudocode which simply expands on Business Logic automation services.
Logic Design Patterns
There are several key Logic Design Patterns when utilizing logic. These are reinforced with the Tutorial, a set of samples fully solved and delivered for your investigation.
It is critically important that each team member be conversant in these.
The basic Design Goal is to utilize logic rather than code. To enable you to maximize your use of logic, Automated Business Logic is designed to be extensible, so that you can build logic services that provide re-use over multiple systems - in a word, extended rules. See Extensibility.
Database Design Considerations
Business Logic Components
These are declarative, in that the method logic is invoked, ordered, re-used and optimized automatically - on initial specification, and on subsequent change. System-supplied instance variables (e.g.,
purchaseorder as shown below) provide access to the Domain Object current / old values.
They typically consist of an annotation, or a short spreadsheet-like method as illustrated below.
The following section identifies the types of Logic Methods.
Logic Declaration: Core Rules
The basis of Business Logic Development is the Core Rules. You create Business Logic Components that contain Business Logic Methods to specify the rules summarized below.
||Derive attribute value using other attributes in that class, or parent class (changes are propagated)
Lineitem.Amount = Lineitem.PartPrice * Lineitem.QtyOrdered
| Parent Copy
||Derive child attribute value from parent attribute value (changes are not propagated)
Lineitem.PartPrice = @ParentCopy(Part.price)
||Derive parent attribute value by summing designated child attribute, with optional Child Qualification Condition
@Sum("purchaseorders.amountUnPaid where isReady = true")
|Derive parent attribute value by counting designated child rows, with optional Child Qualification Condition
Purchaseorder.itemCount = @Count(lineitems)
||Multi-attribute expression of class/parent attributes that must be met for a transaction to succeed (else exception is thrown); can execute as transaction rows are processed, or at commit time after all rows are processed.
Customer.balance < Customer.creditLimit
||Invoke Java/Groovy action (typically from a library of extended rules); can execute during or after row processing
) // auditing
The Business Logic Engine invokes your rules automatically during transaction processing, ordered by their dependencies
Formulas, Constraints and Actions can reference not only attribute values, but old attribute values, enabling you to specify state transition logic
Provides access to runtime services and state, such as
Most requirements can be met using these patterns which leverage Forward Chaining; see the Tutorial.
Rules can invoke Java/Groovy methods, enabling you to meet requirements not solved by Core Rules. Judicious design can result in reusable logic, as illustrated by the pre-supplied
BusinessLogic services for allocation and copy.
Automated Business Logic includes extensive services for Logic Debugging, including Console logging for each executed rules, and integration with your IDEs debugger.