27
Module 20: Creating Virtual Business Components Section Five: Siebel Virtual Business Components

20EAI_CreatingVirtualBusinessComponents

Embed Size (px)

Citation preview

Page 1: 20EAI_CreatingVirtualBusinessComponents

Module 20: Creating Virtual Business Components

Section Five: Siebel Virtual Business Components

Page 2: 20EAI_CreatingVirtualBusinessComponents

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

Page 3: 20EAI_CreatingVirtualBusinessComponents

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

Page 4: 20EAI_CreatingVirtualBusinessComponents

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

Page 5: 20EAI_CreatingVirtualBusinessComponents

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

Page 6: 20EAI_CreatingVirtualBusinessComponents

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

Page 7: 20EAI_CreatingVirtualBusinessComponents

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

Page 8: 20EAI_CreatingVirtualBusinessComponents

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

Page 9: 20EAI_CreatingVirtualBusinessComponents

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

Page 10: 20EAI_CreatingVirtualBusinessComponents

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

Page 11: 20EAI_CreatingVirtualBusinessComponents

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

Page 12: 20EAI_CreatingVirtualBusinessComponents

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

Page 13: 20EAI_CreatingVirtualBusinessComponents

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

Page 14: 20EAI_CreatingVirtualBusinessComponents

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

Page 15: 20EAI_CreatingVirtualBusinessComponents

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

Page 16: 20EAI_CreatingVirtualBusinessComponents

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)

Page 17: 20EAI_CreatingVirtualBusinessComponents

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

Page 18: 20EAI_CreatingVirtualBusinessComponents

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

Page 19: 20EAI_CreatingVirtualBusinessComponents

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)

Page 20: 20EAI_CreatingVirtualBusinessComponents

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

Page 21: 20EAI_CreatingVirtualBusinessComponents

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)

Page 22: 20EAI_CreatingVirtualBusinessComponents

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

Page 23: 20EAI_CreatingVirtualBusinessComponents

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

Page 24: 20EAI_CreatingVirtualBusinessComponents

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

Page 25: 20EAI_CreatingVirtualBusinessComponents

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

Page 26: 20EAI_CreatingVirtualBusinessComponents

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

Page 27: 20EAI_CreatingVirtualBusinessComponents

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