By mapping the business objects (BOs) to different physical data sources (persistence), the developer creates an object-oriented black-box envelope for easy integration with the respective system environment. Each BO can have multiple/different mappings.
In this way, using the BOs, the Jabatix Workbench provides a powerful tool for a highly flexible adaptation of the Jabatix application to the various existing system environments.
A business object (BO) has four key functions:
- Provide a mapping container linking to an inbound data source (diverse formats are supported)
- Hold the list of BO records subject to processing operations (aggregation, reformatting, calculations)
- Transform the data held in the BO for down-stream processing (into a report, or for use by receiving applications)
- Provide a mapping container for outbound data containers, from tables, to files, to reports, to data streams
One BO can represent multiple such functions accessed via a separate map for each.
Following an example to visualize how a BO is used for mapping input and output data, and transforming extracted data:
Creating and population a Business Object
View 1 - Model Design → Edit Business Objects
From the Model Design perspective, BOs are accessible form the Project Explorer by double-clicking on an existing BO, or creating a new one from the Context Menu → New → Business Object. Select a name that represents its content and role.
View 2 - Model Design → Edit Business objects → Business Object Management
In the Edit Business Object tab, BOs are created, deleted, the order changed, and the mappings to data sources defined. A BO can have multiple maps (one for extracting data from a source container - Excel spreadsheet, database table, flat file ... - , for example), and another for loading the results of any transformation to a destination data container).
Unless the reverse-engineer functionality is used, a manual mapping is required. In the field mapping editor, you can create or edit the mapping between Business Object and Database Table. Similar nomenclatures in the BO Mapping and database table can be mapped automatically using the Auto Mapping Tool.
Note that, when first referring to imported projects, some of the mapping details will likely require updating:
The Table View shows the relationship between BO fields and destination fields - for a particular map, of course:
A one-for-one match is not required. In fact, BOs and their associated field maps are logical interfaces between incoming data (extracted from various data sources) and outgoing data (load), which has usually been the subject to value-adding transformation. In this process, the outgoing data structures may well differ from incoming data structures - by switching maps in a script, this redirection can be automated.
Cantor script for extracting data from one source into a BO using one map and loading it into a destination from the same BO, using another map:
View 3 - Model Design → Edit Business Objects → Business Object Management - Business Object Details
In the editor pane Edit Business Objects we create or edit the Business Objects that "wrap" our project. From here, we specify the record fields in the BO(s), much as we would specify a database table.
View 4 - Model Design → Edit Business Objects → Business Object Management - Business Object Details → Fields
With the fields completed, we can then create associate maps via Edit/View Mapping or Reverse-engineer in order to connect data sources and destinations via BOs as object-based intermediary structures.
On this view, there is an option to associate a script and script type to a field. current and current_field_name are special variables to refer to the script and to its return variable, respectively.
View 5 - Edit/View Mapping | Reverse-engineer | Preview Data