Business Processes and Rules: Siebel eBusiness Application Integration Volume IV > Data Mapping Using Scripts > Siebel Message Objects and Methods >

CSSEAIIntCompOut


This object represents the output integration object, open for writing. You can use this object's methods to create new output integration components and to copy or set actual data in the records of the integration components. This object provides CopyFieldValue, CreateIntComp, NewRecord, SetCopySource, and SetFieldValue methods.

CopyFieldValue() Method

This method sets the value of a field in the active record to the value of a field in the current source record. Table 32 presents the parameters for this method.

Syntax

CopyFieldValue(targetName, sourceName [, defaultIfNull [, defaultIfEmpty]])

Table 32. Parameters for CopyFieldValue() Method
Parameter
Description
targetName
Name of the field to set in the output integration component.
sourceName
Name of the field to retrieve from the input integration component.
defaultIfNull
Optional value that specifies what should be inserted into the target, if the source field does not exist.
defaultIfEmpty
Optional value that specifies what to use as a source value if the source field is empty.

Returns

Not applicable

Usage

Use this method to copy a field from an input integration component to the output integration component. You could achieve the same results by calling the GetFieldValue method on the input component and the SetFieldValue on the output component; however, using CopyFieldValue is easier.

You must call the SetCopySource method first to specify the source integration component. CopyFieldValue uses the active records of the input and output components of the active integration component.

If the integration component is not set with the SetCopySource method first, a call to the CopyFieldValue method raises an error. An error also occurs if either input or output component does not have an active record.

If you set the copy source using the following statement:

outIntComp.SetCopySource(inIntComp);

the following two statements are equivalent:

outIntComp.SetFieldValue("Fld-A", inIntComp.GetFieldValue("X"));

outIntComp.CopyFieldValue("Fld-A", "X");

Using the second convention is convenient if you are copying many fields between the same components.

CreateIntComp() Method

This method creates a new integration component. Table 33 presents the parameters for this method.

Syntax

CreateIntComp(name [, createNow])

Table 33. Parameters for CreateIntComp() Method
Parameter
Description
name
The name of the new integration component.
createNow
Defaults to true. This is an optional parameter. By default, the underlying data object is created in the output data object at the time this method is called. To change this behavior, specify the optional createNow argument as false. If you specify createNow as false, the underlying data object is not created until you make the first NewRecord call on the newly created integration component.

Returns

CSSEAIIntCompOut. Output Integration Component

Usage

Use this method to create a new integration component, open it for writing, and add it to the active record of the integration component.

This method raises an error if you call it without an active integration component record. Use the NewRecord method to create a new record and set the active record.

SetCopySource() Method

This method establishes the integration component from which a field value will be copied. Table 34 presents the parameter for this method.

Syntax

SetCopySource(IntComp)

Table 34. Parameter for SetCopySource() Method
Parameter
Description
IntComp
The integration component object—either CSSEAIPrimaryIntCompIn or CSSEAIIntCompIn.

Returns

Not applicable

Usage

Call this method before calling the CopyFieldValue method.

SetFieldValue() Method

This method sets the value of the named field in the active integration component record. Table 35 presents the parameters for this method.

Syntax

SetFieldValue(name, value)

Table 35. Parameters for SetFieldValue() Method
Parameter
Description
name
The name of a field in the active record of the integration component.
value
The string value to be put into the field given in the name parameter.

Returns

Not applicable

Usage

Both the name and value arguments should be strings.

The field is not set if the value is null. This method provides no return value.

This method raises an error if called while there is no active record.

NOTE:  Siebel eScript automatically converts most types to strings as necessary.


 Business Processes and Rules: Siebel eBusiness Application Integration Volume IV 
 Published: 18 April 2003