Escolar Documentos
Profissional Documentos
Cultura Documentos
Distribution
*
Job Title
Ownership
Lesson Overview
This walk through describes how to define a new Business Object, starting with the creation of
the Business Entity Java class and then defining a simple Maintenance Object, along with the
infrastructure to add new objects of this type.
Lesson Objectives
Note that many of the names of definitions used in these exercises contain ZZ (e.g.
CM_ZZ_). The instructor may advise you to use your initials, or some other unique
identifier, in place of ZZ to prevent conflicts with the definitions of other students.
Overview
In this walk through, you will create the Employee Business Entity Java classes.
Tasks
It is VERY IMPORTANT that you always work in the java folder in this project, and NOT the gen folder.
The gen folder is reserved for the Artifact Generator. If you accidentally create files in the gen folder,
they will be erased when you next run the Artifact Generator.
and select the _Generate Artifacts run configuration (the name will be prefixed with the
name of your project, Training in the example below)
Verify that the following Java files were generated in the gen folder
Click on the Training project and hit F5 to refresh (and compile) the project. This should
generate the binary code for the newly created java files.
The Business Entity for Employee should now be created and there should be no errors
in the project
You have now created your first business entity. In the next walk through you will create an
entity page maintenance that uses this new business entity.
Overview
In this walk through, you will create the Employee Entity Page Maintenance Java classes.
Tasks
1. Create the Employee Entity Page Maintenance Java file and generate the service XML. As
with the creation of the Business Entity in the previous walk through, select the
com.splwg.cm.domain.hr package so that it is highlighted and click the New button. On
the New dialog, select the Page Service wizard and click Next
Populate the fields as shown here and click the Edit DataElement button
Monitor the Console view and when it is finished, click on the Training project and hit F5
to refresh (and compile) the project.
Verify that the following Java files were generated in the gen folder.
2. Build and deploy the cm.jar containing your new custom programs to the web application
server.
and select the _Deploy CM run configuration (the name will be prefixed with the name
of your project, Training in the example below)
Monitor the Console view. It should take no more than a few seconds and should look
similar to the screenshot below when completed.
Restart the Web application server. Again, ask the instructor for assistance if required.
Overview
In this walk through, you will define the Employee Maintenance Object and its Service
Metadata. Practices 1 and 2 above must have been successfully completed before this
exercise can be done.
Tasks
1. Launch the application using the URL and user Id and password provided by the instructor
E.g. http://localhost:4410/spl/cis.jsp
Open the Service Program page in add mode (Admin menu) and supply the following
Open the Application Service page in add mode (Admin menu) and supply the
following
Access Mode
Add
Change
Delete
Inquire
Set the expiration date to 1/1/2100. Add the following access modes.
Add
Change
Delete
Inquire
Flush all caches and refresh your application page to ensure the new security settings
are available. For example
http://localhost:4410/spl/flushAll.jsp
Open the Maintenance Object page in add mode (Admin menu) and supply the
following
Overview
In this walk through, you will create the Employee Business Object that includes two fields
mapped to XML fields.
Tasks
1. Create two additional fields that will be mapped to XML columns in the CLOB.
Open the Field page in add mode (it's on the Admin menu) and add the following field
definitions:
Open the Business Object page in add mode (it's on the Admin menu) and set the
following data on the Main tab:
Add two additional fields, inside a group element named employeeDetail, mapped to
the CM_ZZ_EMP_DATA_AREA field.
Like this:
Look for the version element. Add the attribute suppress=true after
mapField=VERSION. This will ensure that no text box will be generated on the UI
this field should not be editable on a UI.
Overview
In this walk through, you'll create the maintenance (input) UI map for your employee business
object, along with a BPA script that will allow you to add an employee.
Tasks
Open the UI Map page in add mode (it's on the Admin menu) and set the following data
on the Main tab:
UI Map: CM_ZZ_EmployeeMaint
Map Type: Complete HTML Document
Description: ZZs Employee Maintenance UI Map
In the Schema Editor tab, update the schema to include your BO:
<schema>
<includeBO name="CM_ZZ_EmployeeBO"/>
</schema>
In the Dashboard, locate the Generate HTML zone, and click the Input Map button.
Click OK if prompted by Confirm: Overwrite existing information? The HTML Editor
zone will be populated with a UI map definition.
Click the Test UI Map link to see what your UI map looks like.
Open the Script page in add mode (it's on the Admin menu) and set the following data
on the Main tab:
Select the Data Area tab and add your UI Map object:
Schema Type: UI Map
Object: CM_ZZ_EmployeeMaint
In the Returned Values area, add a row for a Returned Value of CANCEL, which
should be the default, and Next Script Step = 99.
Execute your BPA script. Find the Favorite Scripts zone in the Dashboard. Click the
Search link.
Search for your BPA script, named CM ZZ Add Employee. Click it to execute.
Your UI map should be displayed in the page area. Enter values for employee ID,
name fields, etc. and click the Save button. If the BPA goes away, your Employee data
has been saved. If not, the UI map should be redisplayed with error information.
Correct the problem and submit again.