Adding a snippet to assign the getQuoteInput variable
Follow these steps to add a snippet to assign the getQuoteInput variable to the PortfolioEvaluatorProcess process:
Switch to the PortfolioEvaluatorProcess editor.
Click the
Snippet
icon
on the palette.
Click the
WhileLoop
figure
. The Snippet figure
was added.
Switch to the Properties view.
In the details section, click the
Description
tab.
In the
Display Name
field, type
Assign getQuoteInput
. The
Name
field is set to
AssigngetQuoteInput
.
In the details section, click the
Details
tab.
Add the existing
InputVariable
variable to the canvas and drill into
InputVariable.inputStockPortfolio.stockInfoList
.
Add the existing counter variable to the canvas.
Click the
Java™...
icon
on the palette. The
Select a Java Visual Snippet
window opens.
In the
Specify a type (? = any character, * = any String)
field, type
java.util.List
.
Click
List
.
Click
get(int)
.
Click
OK
.
Click the canvas to add the activity.
Add the existing
stockInfo
variable to the canvas.
Connect the
InputVariable.inputStockPortfolio.stockInfoList
figure to the
get
figure
Connect the
counter
figure to the
get
figure.
Connect the
get
figure to the
stockInfo
figure.
Add the existing
stockInfo
variable to the canvas and drill into
stockInfo.symbol
.
.
Add the existing
getQuoteInput
variable to the canvas.
Connect the
stockInfo.symbol
figure to the
getQuoteInput
figure.
Parent topic:
Creating PortfolioEvaluator process implementation
Previous topic:
Adding a while activity
Next topic:
Adding the getQuote activity to the while