Upload
shalini-ravi
View
10
Download
1
Embed Size (px)
Citation preview
Module 20: Creating Virtual Business Components
Section Five: Siebel Virtual Business Components
2 of 27Module 20: Creating Virtual Business Components
Module Objectives
After completing this module you will be able to: Create a virtual business component (VBC) Describe the scripting required to support a virtual business
component Incorporate a virtual business component into a Siebel eBusiness
application
Why you need to know These procedures enable you to create and use a VBC
3 of 27Module 20: Creating Virtual Business Components
Creating Virtual Business Components: Overview
Create virtual business components (VBCs) from the bottom up, just like a standard business component
User Interface Layer
Business ObjectLayer
Data Layer
VirtualBusiness
Component
BusinessObject
External(Table?)
ViewApplet
Field
List Column or Control
External(Column?)
No Data Layer definitions; the data is not in
the Siebel database
CreateBusiness
Object layer definitions
Create UserInterface
layer definitions
1
2
4 of 27Module 20: Creating Virtual Business Components
Creating a VBC: Steps
1. Define the virtual business component
2. Create fields for the VBC
3. Specify user properties for the VBC
4. Select or create a business service for the VBC
5. Add the VBC to a business object (and a link, if necessary)
6. Map an applet to the VBC
7. Compile and verify the changes
5 of 27Module 20: Creating Virtual Business Components
Create a new Business Component
1. Define the VBC
Define a virtual business component in the same way you would define a regular business component, except the table property is not specified
Pick the Class CSSBCVExtern
No Table value
Add a Name
2 3 4
1
6 of 27Module 20: Creating Virtual Business Components
2. Create Fields for the VBC
Enter the names of the fields for the VBC Either the column names in an external database, or Field names in an external delimited text file
Pick the data typeof the external data
Enter the field name
Createa field
1
2
3
No column value since there is no
table value
4
7 of 27Module 20: Creating Virtual Business Components
3. Specify User Properties for the VBC
Enter business component user properties exactly; everything must match, or the VBC will not work
Service Name (required): Enter an existing Business Service or the name of one that you will create
Remote Source (optional): Enter a data source the business service
will use
Service Parameters (optional): Enter a text string to be parsed by the
VBC's PreInvokeMethod
8 of 27Module 20: Creating Virtual Business Components
Service Name User Property
Instructs the VBC to use the specified business service This property is required, otherwise the VBC will not work
Example: Specify the business service to be XML Gateway
Here the Service Name is set toXML Gateway
9 of 27Module 20: Creating Virtual Business Components
Service Parameters User Property
Pass the transport parameters used by the business service This property is optional
Example: Service Parameters tells the XML Gateway business service to call VirtualBusCompServer.dll to access the data
Service Parameters
10 of 27Module 20: Creating Virtual Business Components
Service Parameters User Property Continued
Specifies which transport to use EAI MQSeries Server Transport EAI MQSeries Application Messaging Interface (AMI)Transport EAI MSMQ Transport EAI DLL Transport EAI File Transport EAI HTTP Transport Microsoft BizTalk 2000
ExamplesService Parameters = "Transport=EAI HTTP Transport; HTTPRequestURLTemplate=http://www.host.com/XMLGateway.asp;HTTPRequestMethod=POST"
Service Parameters = "Transport=EAI MQSeries Server Transport; MQModelQueueName=Siebel;MQPhysicalQueueName=SiebelVBC"
Parameters are name=value pairs separated by semicolons
11 of 27Module 20: Creating Virtual Business Components
Remote Source User Property
Identifies the location of the external data source; for example, the ODBC, file, or database location (optional)
The external application must support Init and Query methods Able to process XML requests from the business service and
respond in the appropriate manner
Remote Source
12 of 27Module 20: Creating Virtual Business Components
4. Select or Create a Business Service for the VBC
Methods
Event handler
Programming Language is either eScript (JS) or Siebel Visual Basic
(SBL) and is set at the parent level for the object definition in Siebel Tools
13 of 27Module 20: Creating Virtual Business Components
XML Gateway Business Service
Is a prebuilt business service that uses XML to communicate between a Siebel application and an external application
Provides the six methods a VBC requires to use external data Can be configured to use:
MQSeries transport HTTP transport
The required methods are already written
Workflow Process Manager Business Integration Manager
14 of 27Module 20: Creating Virtual Business Components
Creating a Business Service for the VBC
The business service must include the PreInvokeMethod, PreCanInvokeMethod, Init, and Query methods
Update, PreInsert, Insert, and Delete methods are optional
Add user properties to the VBC
15 of 27Module 20: Creating Virtual Business Components
Business Service PreInvoke Method
A VBC calls the PreInvokeMethod of the business service for processing support — all business service scripts use this method as a standard entry point Calls the method specified by MethodName
Such as Init, Query, Update
Outputs (property set):Returns values to
CSSBCVExtern for processing
Inputs (property set): Business service user properties and the service parameters user
property of the VBC
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
16 of 27Module 20: Creating Virtual Business Components
Business Service Init Method
When a VBC is first instantiated, the Init method reads run-time parameters and sets up any necessary information in preparation for use of other methods The Init method must have field names that the VBC supports
Inputs (property set):The Init method gets the
Parameters property from the property set and processes it
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
(No outputs)
17 of 27Module 20: Creating Virtual Business Components
Business Service Query Method
Is the only way of getting data to the VBC and refreshing the UI PreInvokeMethod MethodName = “Query” Returns values based on the specified query values
There is a child property set for each record returned
Outputs (property set):List of [field name, field value] pairs with the values of each field in the particular record
Inputs (property set):List of [field name, field value] pairs representing the query
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
18 of 27Module 20: Creating Virtual Business Components
Business Service Update Method
Is called to commit a change to a record PreInvokeMethod MethodName = “Update”
Outputs (property set):List of [field name, field value] pairs to represent any fields automatically updated as a
result of the update operation
Inputs (property set):A child property set to represent
each field; each property set has a Field Name, Field Value, and Changed – set to TRUE if
the field was updated
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
19 of 27Module 20: Creating Virtual Business Components
Business Service PreInsert Method
Is called to perform a New Record operation PreInvokeMethod MethodName = “PreInsert” Called when a new record is created PreInsert returns any default field values for the new record
Outputs (property set):List of [field name, field value] pairs representing fields that
have default values
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
(No inputs)
20 of 27Module 20: Creating Virtual Business Components
Business Service Insert Method
Is called to commit a new record PreInvokeMethod MethodName = “Insert”
Outputs (property set): List of [field name, field value] pairs for any fields
automatically updated
Inputs (property set):A child property set with a list
of [field name, field value] pairs for a new record
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
21 of 27Module 20: Creating Virtual Business Components
Business Service Delete Method
Is called to delete a record PreInvokeMethod MethodName = “Delete”
Inputs (property set):A child property set with a list
of [field name, field value] pairs for the record being
deleted
Business Service
Init
Update
PreInsert
Query
Insert
Delete
PreInvoke Method
(No outputs)
22 of 27Module 20: Creating Virtual Business Components
Developer-Defined Methods for a Business Service
Are handled in the PreInvokeMethod function Use user-defined property sets for Inputs and Outputs Are called with a Service.InvokeMethod call
Outputs (property set):User-defined
Inputs (property set):User-defined
Business Service
Custom Method
Custom Method
Custom Method
Custom Method
Custom Method
PreInvoke Method
Invoke Method
23 of 27Module 20: Creating Virtual Business Components
5. Add the VBC to a Business Object
Adding a virtual business component to a business object is the same as adding a regular business component Create a link connecting the VBC to a business component
A 1:M link specifying the parent/child business component and the source/destination field The child business component is the VBC The destination field is the VBC field that is the foreign key to the parent
Add the link to the business object
24 of 27Module 20: Creating Virtual Business Components
6. Map an Applet to the VBC
Create a new applet with the List Applet or Form Applet wizard Select a project and a virtual business component Enter the new applet's name and a display title
25 of 27Module 20: Creating Virtual Business Components
7. Compile and Verify the Changes
Compile projects that contain changes Run the application to verify the changes you made Use debug in Siebel Tools to check the scripts if necessary
Compile to the appropriate srf
Verify changes in the Siebel application and in the external application
26 of 27Module 20: Creating Virtual Business Components
Summary
This module showed you how to: Create a virtual business component (VBC) Describe the scripting required to support a virtual business
component Incorporate a virtual business component into a Siebel eBusiness
application
27 of 27Module 20: Creating Virtual Business Components
Labs
In the labs you will: Create a VBC to display contact information inside a Siebel
application Create a VBC to display external credit card information inside a
Siebel application