Examples of business object customizations
The following examples demonstrate how to create a business object for the Name_Note table and exercise the business object with a query change, as well as how to edit a display property on the Campaign object:
Adding a new business object
This example creates a business object for the Name_Note table and exercises the business object with a query.
- Go to RiSE > Business Object Designer.
- Select New > Design Business Definition. The New Object window is displayed.
- Enter Name_Note as the Name for this example.
- Click Create Object.
- (Database tab) Click Add. A window listing all the iMIS database tables is displayed:
- Select the Name_Note table and click OK. The Name_Note table is added to the Tables field, and its columns are added to the Available Columns field.
- In the Available Columns field, select all the columns except Name_Note.TIME_STAMP.
- Click Add as Properties.
- Click Save.
- (Properties tab > Definition sub-tab) Examine the automatically generated entries on the Description, Type, Display, and Value tabs. For the following properties, verify the Available to Query Builder and Automatically Include in Queries options are selected:
- ID
- NOTE
- NOTE_NUM
- PURPOSE
- Click Save and then Close.
- Click Publish.
- Click OK and then Close.
- Create a new query in a working folder:
- Go to RiSE > Intelligent Query Architect.
- Select the folder Scratch.
- Select New > Query.
- Enter a Name for this query.
- (Define tab > Sources sub-tab) Click Add Source.
- In the Document browser, go to $/Common/Business Objects.
- Select Name_Note. Click OK to add it to the Query Sources list.
- (Define tab > Display sub-tab) The four columns in the display set are selected.
- Click Save As. On the Document Saver window, enter Name_Note query as the name for this query.
- Click OK.
- Click Run to see the sample output.
- Generate extended results:
- (Define tab > Sources sub-tab) Click Add Source.
- In the Document browser, go to $/Common/Business Objects.
- Select Name_Note. Click OK to add it to the Query Sources list.
- Add the Name table to the business object, display FULL_NAME in the query results, and republish.
- In Business Object designer, Edit the Name_Note business object. Select Database, and add the Name table to the Tables list. Add Name_Note.ID=Name.ID to the Joins list by selecting the columns from the left and right drop-down lists.
- Select Columns, select Name.FULL_NAME, and add a property for the column.
- (Properties tab > Display sub-tab) Add FullName to the Display Set.
- Select Save, Close, Build, and Publish.
- In IQA, open the query for this business object.
- (Sources tab) Click the Remove icon to remove the existing source.
- Click Add Source and re-add Name_Note.
- (Display tab) Change the order to have Id and Full Name first. Use the Refresh button as you go to confirm the order. Save the query.
- Select Run to see the query results.
- (Summary tab) See the SQL for the query.
Note: Business object changes are not automatically reflected in queries that use the business objects.
Editing an existing business object
The following example changes a display property on the Campaign object and shows the change from the application.
- Go to Marketing > Campaigns > Define campaigns.
- Select a campaign. Note the values for Name and Campaign Code. These values come from the business object.
- Go to RiSE > Business Object Designer.
- Select the Campaign object.
- Click Edit.
- (Properties tab) Select the Name property.
- (Display sub-tab) Change the Prompt for field entry to The Campaign Name.
- Change the Description to The Campaign Description.
- Click Save As to save the edited business object, and then click Close.
- Click Publish.
- Click OK, and then Close.