The string functoids perform string manipulation on either an incoming value or a set of values. They all output a string, which can be used as the input for another functoid or sent directly to the destination schema. Table 3.5 lists the string functoids, their usage, and parameters.
Sunday, March 3, 2013
Saturday, March 2, 2013
Table Looping Functoid:
Table Looping Functoid:
Use the Table Looping functoid , in conjunction with one or more Table Extractor functoids, to create a repeating structure in an output instance message by using constant values, values from an instance message, and values that are output from other functoids. The Table Looping functoid can also be used to add records to the output structure when there is no input record
Input:
Parameter 1: A link from a repeating node in the source schema. The number of instances of this structure that occur in a particular input instance message defines the number of times that the associated table looping grid is processed.
Parameter 2: A constant input parameter that defines the number of columns in the associated table looping grid.
Parameters 3 – 100: A link from a node in the source schema or from another functoid, such as a Value Extractor functoid, or a constant input parameter. The relative order of parameters 3 – 100 is unimportant.
Output:
Output 1: A link to a repeating node in the destination schema, identifying the location of the repeating structure in output instance messages that is constructed by using values configured in the associated table looping grid.
Outputs 2 – N: One or more links to the associated Table Extractor functoids, one per such functoid.
Notes:
You must use this functoid in conjunction with one or more Table Extractor functoids.
This functoid accepts multiple inputs, such as links from the source schema, constants, and the output of other functoids. You use these inputs to configure the table looping grid from which the associated Table Extractor functoids extract the data used to build the relevant portion of the output instance message You configure the table looping grid by using the Configure Table Looping Functoid Dialog Box, Table Looping Grid Tab. You access this dialog box by using the Table Looping Grid (Functoid Property). The Table Looping Grid is a property of Table Looping functoids.
Every cell in the table looping grid is a drop-down list that is populated by input parameters 3 through 100. How the entries in the drop-down list are represented depends on the type of the corresponding input parameter and, where applicable, on whether the Label property of the link is assigned a value. There are three possibilities:
1. Constant input parameters are displayed as their values.
2. Input parameters that are links from nodes in the source schema and for which no Label link property value is supplied are displayed by using the value of their Link Source functoid property.
3. Input parameters that are links from another functoid and for which no Label link property value is supplied are displayed by using the value of their (Name) property.
In the case of 2 and 3 above, and especially in the case of 2, where the input parameters are links from nodes in the source schema, the effort involved in providing descriptive values for the Label property of the relevant link is generally well spent when the time comes to configure the table looping grid.
The Table Looping Configuration dialog box also has a check box with the label Gated. When you select this check box, you are specifying that the value of the data specified for column 1 controls whether any processing is performed for that row. When this is output from a logical functoid, if the value specified in column 1 evaluates to False, the associated row of the grid is skipped (meaning that the associated Table Extractor functoids are not invoked for that row). When column 1 is a field, then the functoid treats the presence of data as True; it treats the absence of data as False.
Example:
Source Document:
- <ns0:Root xmlns:ns0="http://BTSMar13.TableLoopingSource">
<LoanNumber>1000</LoanNumber>
<Amount>10000</Amount>
<Barrower1FName>Ravi</Barrower1FName>
<Barrower1LName>M</Barrower1LName>
<Barrower1SSN>006</Barrower1SSN>
<Barrower2FName>Sand</Barrower2FName>
<Barrower2LName>M</Barrower2LName>
<Barrower2SSN>007</Barrower2SSN>
</ns0:Root>
Destination Document:
- <ns0:Loan xmlns:ns0="http://BTSMar13.TableLoppingDest">
<LoanNumber>1000</LoanNumber>
<Amount>10000</Amount>
- <Barrowers>
- <Barrower>
<LName>M</LName>
<FName>Ravi</FName>
<SSN>006</SSN>
</Barrower>
- <Barrower>
<LName>M</LName>
<FName>Sand</FName>
<SSN>007</SSN>
</Barrower>
</Barrowers>
</ns0:Loan>
List 1:
Notes: Please note that looping functoid is added to barrower.
List 2:
Notes:
Value 2 is no of repeating records and value is 3 no of columns.
List 3:
Notes:
Please select the required row and column combinations
List 4:
Notes:
Value 2 indicates that column 2 value will be selected and moved to the corresponding field on the destination schema.
Record Count Functoid:
Record Count
Functoid:
Use the Record Count functoid to generate a count of the
number of times a particular repeating structure occurs in an input instance
message.
Input:
Parameter 1: A link
from a node in the source schema. For this functoid to do something
interesting, the structure in an input instance message that corresponds to
this node must be repeating. Otherwise, the output is always one (1).
Output:
Output 1: A number
that corresponds to the number of occurrences of the repeating structure in an
input instance message that corresponds to the node specified by parameter 1.
Note:
You can also use the Record Count functoid to count
repeating field elements. It is not restricted to records.
Example:
Source Document:
- <ns0:PO
xmlns:ns0="http://BTSMar13.CountInput">
- <Items>
<SKU>001</SKU>
<Description>Item1</Description>
</Items>
- <Items>
<SKU>002</SKU>
<Description>Item2</Description>
</Items>
- <Items>
<SKU>003</SKU>
<Description>Item3</Description>
</Items>
- <Items>
<SKU>004</SKU>
<Description>Item4</Description>
</Items>
- <Items>
<SKU>005</SKU>
<Description>Item5</Description>
</Items>
</ns0:PO>
Record Count Destination Document:
- <ns0:Count
xmlns:ns0="http://BTSMar13.CountOutput">
- <Details>
<TotalRecords>5</TotalRecords>
</Details>
</ns0:Count>
Please note that Items record in
the Destination Document should be unbounded as we are expecting multiple
occurrences.
Value Mapping and Value Mapping Flattening Functoids:
Value Mapping and
Value Mapping Flattening Functoids:
Use Value Mapping and Value Mapping Flattening Functoids to
allow a Boolean value to control whether another value gets mapped.
Input:
Parameter 1: Either of the strings "true" or
"false", generally from the output of some other Logical functoid or
from a variable Boolean field in the input instance message.
Parameter 2: A value that is output if parameter 1 is
"true". This value can be from a link from a node in the source
schema that represents simple content, the output from another functoid, or a
constant input parameter.
Output:
Output 1: The value of the second parameter if the value of
the first parameter is "true". If the value of the first parameter is
not "true", the corresponding element or attribute in the output instance
message is not created.
Note:
Determine whether to use the Value Mapping functoid or the
Value Mapping (Flattening) functoid based on the following characteristics of
the relevant portions of the source and destination schemas:
Value Mapping: When
both the source and the destination schemas define parallel repeating
structures between which the relevant data is mapped.
Value Mapping
(Flattening): When the source schema
defines a repeating structure and the destination schema defines a flat
structure, such that different instances of the repeating structure in the
source schema are intended to be mapped into unique elements in the flat
structure in the destination schema.
Example:
<ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingSource">
Source Document:
<Record>
<Field
Name="X" Value="1" />
<Field
Name="Y" Value="2" />
<Field Name="Z"
Value="3" />
</Record>
<Record>
<Field
Name="X" Value="4" />
<Field
Name="Y" Value="5" />
<Field
Name="Z" Value="6" />
</Record>
<Record>
<Field
Name="X" Value="7" />
<Field
Name="Y" Value="8" />
<Field
Name="Z" Value="9" />
</Record>
</ns0:Root>
Value Mapping Destination
Document:
- <ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingDest">
<Record
X="1" />
<Record
Y="2" />
<Record
Z="3" />
<Record
X="4" />
<Record
Y="5" />
<Record
Z="6" />
<Record
X="7" />
<Record
Y="8" />
<Record
Z="9" />
</ns0:Root>
Please note that the Record and Field records are unbounded
in Source Document. The max occurs should be set as unbounded for both Record
and Field records.
Also note that Record in the Destination Document should be
unbounded as we are expecting multiple occurrences of X,Y and Z.
Value Mapping Flattening
Destination Document:
- <ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingDest">
<Record
X="1" Y="2" Z="3" />
<Record
X="4" Y="5" Z="6" />
<Record
X="7" Y="8" Z="9" />
</ns0:Root>
Please note that the Record and Field records are unbounded
in Source Document. The max occurs should be set as unbounded for both Record
and Field records.
Also note that Record in the Destination Document should be
unbounded as we are expecting multiple occurrences of X,Y and Z.
Name, value, X, Y, Z are defined as attributes not elements.
Name, value, X, Y, Z are defined as attributes not elements.
Subscribe to:
Posts (Atom)