<webm:scope>
You use the <webm:scope> tag to limit the variables in the Integration Server pipeline that are available to a specified block of code in the JSP.
The specified scope remains in effect until Integration Server encounters the next </webm:scope> tag.
Syntax
<webm:scope [recordName="document"]
[options="param(name=’value’)
param(stringList[]=’value1’, ’value2’,...’valuen’)
rparam(document={name1=’value1’;name2=’value2’;...namen=’valuen’})
rparam(documentList[]={name1=’value1’;name2=’value2’;...namen=’valuen’}|
{name1=’value1’;name2=’value2’;...namen=’valuen’})"]> block_of_code
</webm:scope>
Arguments
You can use any of the following options with this tag. If you specify multiple options, use a space to separate the options.
Important: If you set the value of a variable with these options, the value you specify will replace the current value of that variable.
If the value of a variable contains spaces, enclose the value within single quotes.
When you use the <webm:scope> tag in a JSP, the entire tag must appear on one line.
Argument Description
Specifies the document to use as the current scope.
[recordName="document"]
Adds to the current scope a String named
name whose value is
value.
[options="param(name=’value’)"]
Example
<webm:scope options="param(csClass=Gold) param(csName='Joe Smith')"/>
Adds to the current scope a String List named
stringList whose values are
value1 value2...
valuen.
[options="param(stringList[]=’value1’, ’value2’,...
’valuen’)"]
Example
<webm:scope options="param(shipPoints[]=BOS,LAX,NYC,PHL)
param(warehouseLoc[]=’Los Angeles’,Philadelphia)"/>
Adds to the current scope a Document named document whose variables are name and whose values are
value.
[options="rparam(document={name1=’value1’;name2=’value2’;...
namen=’valuen’})"]
Example
<webm:scope options="rparam(custServiceInfo={csClass=Gold;
csPhone=’800-444-2300’;csRep=’Ann Johnson’})
rparam(buyerInfo={buyerName=’Joe Smith’;buyerPhone=’800-333-1234’})"/>
Adds to the current scope a Document List named
documentList whose variables are
name and whose values are
value.
[options="rparam(documentList []={name1=’value1’; name2=’value2’;...
namen=’valuen’}|{name1=’value1’;name2=’value2’;...namen=’valuen’})"]
Example
<webm:scope options="rparam(custServiceCtrs[]=
{csName=Memphis;csPhone=’800-444-2300’}|
{csName=Troy;csPhone=’800-444-3300’}|
{csName=Austin;csPhone=’800-444-4300’})
rparam(custServiceReps[]={csRep=’Ann Johnson’;csExt=27}|
{csRep=’John Jones’;csExt=28}|
{csRep=’Chris Smith’;csExt=29})"/>
Examples
This code sets the scope to the Document
buyerInfo and inserts the information in the scope into the HTML page produced by the JSP.
<webm:scope recordName="buyerInfo">
<p>Shipped To:<br>
<webm:value variable="companyName"/><br>
<webm:value variable="streetAddr1"/><br>
<webm:value variable="streetAddr2"/><br>
<webm:value variable="city"/>
<webm:value variable="state"/>
<webm:value variable="postalCode"/>
</p>
</webm:scope>
This code sets the scope to the Document
buyerInfo, adds variables named
buyerClass and
shipPoint to the scope, and inserts the information in the scope into the HTML page produced by the JSP.
<webm:scope recordName="buyerInfo"
options="param(buyerClass=Gold) param(shipPoint='BWI Hub')">
<p>Shipped To:<br>
<webm:value variable="companyName"/><br>
<webm:value variable="streetAddr1"/><br>
<webm:value variable="streetAddr2"/><br>
<webm:value variable="city"/>
<webm:value variable="state"/>
<webm:value variable="postalCode"/>
</p>
<hr>
<p>Point of Departure: <webm:value variable="shipPoint"/><br>
Customer Class: <webm:value variable="buyerClass"/></p>
</webm:scope>
This code sets the scope to the Document
buyerInfo, adds variables named
buyerClass and
shipPoint from a Document named
shipInfo to the scope, and inserts the information in the scope into the HTML page produced by the JSP.
<webm:scope recordName="buyerInfo"
options="rparam(shipInfo={buyerClass=Gold;shipPoint='BWI Hub'})">
<p>Shipped To:<br>
<webm:value variable="companyName"/><br>
<webm:value variable="streetAddr1"/><br>
<webm:value variable="streetAddr2"/><br>
<webm:value variable="city"/>
<webm:value variable="state"/>
<webm:value variable="postalCode"/>
</p>
<hr>
<p>Point of Departure: <webm:value
variable="shipInfo/shipPoint"/><br>
Customer Class: <webm:value variable="shipInfo/buyerClass"/></p>
</webm:scope>
This code sets the scope to the Document
buyerInfo, adds a variable named
shipPoints to the scope, adds variables named
name and
ssid from a Document List called
custInfo, and inserts the information in the scope into the HTML page produced by the JSP.
<webm:scope recordName="buyerInfo"
options="param(shipPoints[]=DC,VA,LA,MD)
rparam(custInfo[]={name=Joe;ssid=ssid1}|{name=John;ssid=ssid2})">
<h3>Ship Points: </h3>
<webm:loop variable="shipPoints">
<webm:value /><br>
</webm:loop>
<h3>Customers: </h3>
<webm:loop variable="custInfo">
<webm:value variable="name" />, <webm:value variable="ssid" /> <br>
</webm:loop>
</webm:scope>