Follow these steps to add the GetNewsInput Snippet:
- Click the Invoke icon
on the palette.
- Click the Snippet icon
on the palette.
- Click the Flow 2 figure
. The Snippet figure
was added.
- Switch to the Properties view. The Display Name field
is set to Snippet. The Name field
is set to Snippet.
- In the details section, click the Description tab.
- In the Display Name field, type Assign
getNewsInput. The Name field is set to AssigngetNewsInput.
- In the details section, click the Details tab.
- Click the Standard... icon
on the palette. The Add a Standard Visual Snippet window
opens.
- In the navigation tree, click SCA services > create specific
BO.
- Click OK. The Data Type Selection window
opens.
- In the Filter by type, namespace, or file (? = any character,
* = any String) field, type getNewsArticles.
- Click getNewsArticles.
- Click OK.
- Click the canvas to add the activity.
- Add the existing getNewsArticlesInput variable
to the canvas.
- Connect the create getNewsArticles figure
to the getNewsArticlesInput figure.
- Add a create specific BO activity for StringListBO.
- Add the existing getNewsArticlesInput variable
to the canvas and drill into getNewsArticlesInput.symbols.
- Connect the create StringListBO activity
to the getNewsArticlesInput.symbols.
- 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.ArrayList.
- Click ArrayList.
- Click ArrayList().
- Click OK.
- Click the canvas to add the activity.
- Add the existing getNewsArticlesInput variable
to the canvas and drill into getNewsArticlesInput.symbols.value.
- Connect the new ArrayList figure to the getNewsArticlesInput.symbols.value figure.
- Add a create specific BO activity for StringListBO.
- Add the existing getNewsArticlesInput variable
to the canvas and drill into getNewsArticlesInput.categories.
- Connect the create StringListBO activity
to the getNewsArticlesInput.categories.
- 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.ArrayList.
- Click ArrayList.
- Click ArrayList().
- Click OK.
- Click the canvas to add the activity.
- Add the existing getNewsArticlesInput variable
to the canvas and drill into getNewsArticlesInput.categories.value.
- Connect the new ArrayList figure to the getNewsArticlesInput.categories.value figure.
- Add the existing getBrokerageAccountOuput variable
to the canvas and drill into getBrokerageAccountOutput.brokerageAccount.stockPortfolio.stockInfoList.
- Click the For Each icon
on the palette.
- Click the canvas to add the activity.
- Connect the getBrokerageAccountOutput.brokerageAccount.stockPortfolio.stockInfoList figure
to the For Each figure.
- Add the existing getNewsArticlesInput variable
to the For Each figure and drill into getNewsArticlesInput.symbols.value.
- Add the existing item variable to the For Each figure
and drill into item.symbol.
- 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 java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
- Click add(Object).
- Click OK.
- Click the canvas to add the activity.
- Connect the getNewsArticlesInput.symbols.value figure
to the add figure.
- Connect the item.symbol figure to the add figure.