Business Object Generation

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Generating Business Object in Chordiant

1) Model Criteria. Must have added plugine of Unisys .


2) Also must have plug-in which are require for chordiant .ebc file

1) To create a new Business Object Model in the rational Rose:

Create package for the new class

The package name must end with bo like com.training.bo for


instance.

Create a class diagram

Implement the class that extends the base class


CorporateBusinessClass

General :-Defines class name and export control


Attributes
AccessStrategy :- Used for Extended Persistence
JXP:- Datasource details and Locking Strategy
JXP SQL:- Persistence properties for a RDBMS
JXP MQ :- Persistence properties for WebSphere MQ

Tags for Business Object for class

JXP Tag.

DSN The data source name


Persistent Type The data store type.
The valid options are
mqseries, mqseriesxml, oracle8, and db2udb
Lock Strategy The locking mechanism for the class. The valid
options are:
• optimistic
• pessimistic
• none (default)

Note:-Rational Rose displays all tabs for JXP SQL and JXP MQ at all times, independent
of your setting for the Persistent Type. Complete only the tabs that apply for your
selected Persistent Type, as appropriate.

JXP SQL.

Table Name The name of the table in the relational database


system.
Where Prefix A conditional clause, using the table.column
notation, to specify
the conditional relating identifiers for a join
operation. For more
information on joins, refer to the “Persistence
Server” chapter of
the Chordiant Foundation Server Developer’s
Guide.

Tags for Business Object for Attributes of Class

General - attribute name, type and export control.


• JXC Properties - allows functionality to be implemented to improve
performance.
• JXP - defines whether the attribute is a lock field and the
multiplicity. For a RDBMS, multiplicity will always be 1..1, for
WebSphere MQ it could be 1..n.
• JXP SQL - defines RDBMS persistence properties including column
name, size, primary key, logical type.
• JXP MQ - defines MQ persistence properties

JXP

Lock Field The lock field is used to specify that the attribute
will serve as
the lock for an optimistic locking strategy.
Possible values are:
• True
• False (default)

Multiplicity The relationship between the attribute and the


associated
object, encoded as 1..n. For example, in the
case of the
relationship between a customer object and
associated aliases
(other names used by a customer), you might
specify 1..3 to
indicate that a customer can have as many as
three potential
aliases.

. For a RDBMS, multiplicity will always be


1..1, for
WebSphere MQ it could be 1..n.
JXP SQL

Column Name The name of the column in the table.


Note: When using the modeling tool, if the
attribute is non-persistent, you must leave the
Column Name field blank.
Size The physical size of the column.
Digits The number of digits following the decimal point,
as defined in the database.
Primary Key Specifies whether the column serves as a
primary key for the
table.
Possible values:
• true
• false
Primary Key Generation Specifies whether the system should
Type
autogenerate the primary
key.
Possible values:
• auto—Autogenerate the primary key for
the table using the
Chordiant Foundation Server GUID. (Refer
to the “Persistence
Server” chapter of the Chordiant
Foundation Server
Developer’s Guide for information on
GUIDs)
• none—Do not autogenerate the primary
key
Nullable (Default) true
Specifies whether the column can assume a null
value or not.
Possible values:
• true—Specifies that the column value can
include the null
value.
• false—Specifies that the column value cannot
have a null
value.
Logical Type The data type of the column, as defined in the
database.

Define other object relationships


Aggregations and associations

Save the model


Export the XMI
Export the model to XMI. In Rational Rose, from the File menu, select Export UML 1.1 to XMI.
When prompted, select to export your data as ASCII.

2) Generate the business Services using wizard.

After Generating XMI file from model following things needs to be done.

1) Create the Descriptor file for the Services and the name has to be
<Model>Descriptor.xml .

should look like Code Sample 5-1.


<project-descriptor>
<project-name>BO</project-name>
<title>BO</title>
<modeltype>data</modeltype>
<cmi>true</cmi>
<persistence>true</persistence>
<business-tier>true</business-tier>
<services>false</services>
<schema>true</schema>
<database>true</database>
<unit-tests>true</unit-tests>
</project-descriptor>

WIZARD BASED TOOL

Create a new project of type JX Business Components by selecting


File | New Project -> Chordiant -> Projects -> JX Business
Components then select Next>.

ASSIGN A NAME TO THE PROJECT


Enter a name for the project and click Next>.

SELECT THE REFERENCED PROJECTS


Check off those projects that contain objects that will be
referenced from the objects generated by the Wizard. Select
Next>. (generally no project is selected)

SELECTING A MODEL FILE


This window allows you to select the model. Click the top radio
button to select a model from the (default) plug-ins folder. Click
the bottom radio button to browse to any folder containing a
model.

If you select the XMI file from a different location, you select the
XMI file itself.
Click Next>.

JAVA BUILD SETTINGS


Configure build settings on these tabbed windows. These are only
required if development will be carried out in this project. Click
Finish completing the generation.

BUSINESS OBJECT GENERATION


The Business Object generation process creates the following
components:

• Standard Persistence Objects - Java source for Standard Persistence


objects (Business Objects, Business Object Criteria, Data Accessors).
• Extended Persistence Objects - Java source for Extended Persistence
objects (Business Object Behaviors, Access Strategies, Validators,
Helpers).
• Configuration files - extended persistence Behavior and Validator
configuration files.
• Meta-data files - the Chordiant Meta Information (CMI) file that
contains the mapping between Java objects and data source
persistence components.
• Database table creation scripts - SQL scripts to create the tables
associated with the objects.
• XML Schema files - schema (.xsd) files for each object.
• A copy of the model files - a copy of the Rational Rose model (.mdl),
exported XMI and Descriptor.

The generated project contains the following folders


� bin - compiled code
� output\cmi - CMI file
� output\config - configuration files
� output\db - SQL scripts
� output\lib - temporary files
� output\smi - not used by object generation
� output\xmi - temporary files
� output\xsd - XML schemas
� rosemodels - a copy of model and descriptor
� src\generated - generated Java source code

3) Now Deploying Projects .

DEPLOYING BUSINESS OBJECTS


The following steps are required to deploy the Business Objects
• Copy the java code to the development project.
• Copy the configuration files BehaviorFactoryConfiguration.xml and
ValidatorFactoryConfiguration.xml from output\config\ to
ChordiantEAR\config\chordiant\components\ in the workspace.
• Copy
ChordiantEAR\config\chordiant\components\master\BusinessObjectFa
ctoryService.xml to ChordiantEAR\config\chordiant\components\. Add
a reference to the CMI file.

• Add project to the server classpath.

You might also like