Integration Platform Technologies: Siebel Enterprise Application Integration > Siebel Virtual Business Components > Custom Business Service Methods >

Business Services Methods and Their Property Sets


The following examples display each method's input and output property sets for a VBC Contact that displays simple contact information for a given account. These examples are based on the example in the Custom Business Service Examples.

The output property set of the Insert and Update methods for VBC does not affect the data in the business component, unlike the Query method, which uses the output property set to populate the business component. The output property set for Insert and Update is used to indicate that what fields or record has been changed.

NOTE:  All the optional parameters have been omitted from these examples to simplify them.

Delete Method

The Delete method is called when a record is deleted. Figure 36 illustrates the property set for the Delete input.

Figure 36. Delete Input Property Set

The following is the XML representation of the property set shown in Figure 36:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact">

<PropertySet

AccountId="1-6"

Name="Max Adams"

Phone="(408)234-1029"

Location="San Jose"

AccessId="146" />

</PropertySet>

Figure 37 illustrates the property set for the Delete output.

Figure 37. Delete Output Property Set

The following is the XML representation of the property set shown in Figure 37:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet />

Error Return Method

Figure 38 illustrates the property set for the Error Return, when an error is detected.

Figure 38. Error Return Property Set

The following is the XML representation of the property set shown in Figure 38:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet>

<Status Status="4"

Error_spcField="Name"

Error_spcText="Name must not be empty"/>

</PropertySet>

Init Method

The Init method is called when the VBC is first instantiated. It initializes the VBC. It expects to receive the list of fields supported by the external system.

NOTE:  When a field is not initialized in the Init method of the VBC, the Update method is not fired when the field gets updated.

Figure 39 illustrates the property set for the Init input.

Figure 39. Init Input Property Set

The following is the XML representation of the property set shown in Figure 39:

<?xml version="1.0" encoding="UTF-8"?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact"/>

Figure 40 illustrates the property set for the Init output.

Figure 40. Init Output Property Set

The following is the XML representation of the property set shown in Figure 40:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

AccountId=""

Name=""

Phone=""

Location=""

AccessId="" />

Insert Method

The Insert method is called when a New Record is committed. Figure 41 illustrates the property set for the Insert input.

Figure 41. Insert Input Property Set

The following is the XML representation of the property set shown in Figure 41:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact">

<PropertySet

AccountId="1-6"

Name="Max Adams"

Phone="(398)765-1290"

Location="Troy"

AccessId="" />

</PropertySet>

Figure 42 illustrates the property set for the Insert output.

NOTE:  The property set for the Insert output does not affect the data in the business component. The output property set for Insert is used to indicate what fields or records were changed.

Figure 42. Insert Output Property Set

The following is the XML representation of the property set shown in Figure 42:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

<PropertySet

AccountId="1-6"

Name="Max Adams"

Phone="(398)765-1290"

Location="Troy"

AccessId="146" />

</PropertySet>

PreInsert Method

The PreInsert method is called when a New Record operation is performed. It supplies default values. Figure 43 illustrates the property set for the PreInsert input.

Figure 43. PreInsert Input Property Set

The following is the XML representation of the property set shown in Figure 43:

<?xml version="1.0" encoding="UTF-8"?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact"/>

Figure 44 illustrates the property set for the PreInsert output.

Figure 44. PreInsert Output Property Set

The following is the XML representation of the property set shown in Figure 44:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet>

<PropertySet Location="San Jose" />

</PropertySet>

Query Method

The Query method is called when a search is performed. The Query method must be supported by every VBC. Each record that matches the query is represented as a property set. For example, if 5 records match the query, then there will be 5 child property sets. Each property set contains a list of field names; that is, field value pairs representing the values of each field for that particular record. Figure 45 illustrates the property set for the Query input and is followed by its XML representation.

Figure 45. Query Input Property Set

The following is the XML representation of the property set shown in Figure 45:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

max-rows="6"

search-string="([Phone] IS NOT NULL) AND ([AccountId] = "1-6")"

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact">

<PropertySet AccountId="1-6" />

<search-spec>

  <node node-type="Binary Operator">AND

  <node node-type="Unary Operator">IS NOT NULL

  <node node-type="Identifier">Phone</node>

    </node>

    <node node-type="Binary Operator">=

    <node node-type="Identifier">AccountId</node>

    <node value-type="TEXT" node-type="Constant">1-6</node>

    </node>

  </node>

</search-spec>

<sort-spec>

  <sort field="Location">ASCENDING</sort>

  <sort field="Name">DESCENDING</sort>

</sort-spec>

</PropertySet>

Figure 46 illustrates the property set for the Query output.

Figure 46. Query Output Property Set

The following is the XML representation of the property set shown in Figure 46:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet>

<PropertySet

AccountId="1-6"

Name="Sara Chen"

Phone="(415)298-7890"

Location="San Francisco"

AccessId="128" />

<PropertySet

AccountId="1-6"

Name="Eric Brown"

Phone="(650)123-1000"

Location="Palo Alto"

AccessId="129" />

</PropertySet>

Update Method

The Update method is called when a record is modified. Figure 47 illustrates the property set for the Update input.

Figure 47. Update Input Property Set

The following is the XML representation of the property set shown in Figure 47:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

Business_spcComponent_spcId="1"

Business_spcComponent_spcName="Contact">

<PropertySet

Field_spcName="AccountId"

Changed="false"

Field_spcValue="1-6"/>

<PropertySet

Field_spcName="Name"

Changed="false"

Field_spcValue="MaxAdams"/>

<PropertySet

Field_spcName="Phone"

Changed="true"

Field_spcValue="(408)234-1029"/>

<PropertySet

Field_spcName="Location"

Changed="true"

Field_spcValue="SanJose"/>

<PropertySet

Field_spcName="AccessId"

Changed="false"

Field_spcValue="146" />

</PropertySet>

Figure 48 illustrates the property set for the Update output.

NOTE:  The property set for Update output does not affect the data in the business component. The output property set for Update is used to indicate what fields or records were changed.

Figure 48. Update Output Property Set

The following is the XML representation of the property set shown in Figure 48:

<?xml version="1.0" encoding="UTF-8" ?>

<?Siebel-Property-Set EscapeNames="true"?>

<PropertySet

<PropertySet

Phone=="(408)234-1029"

Location="San Jose" />

</PropertySet>

Integration Platform Technologies: Siebel Enterprise Application Integration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.