Adding the GetNewsInput Snippet

Follow these steps to add the GetNewsInput Snippet:
  1. Click the Invoke icon on the palette.
  2. Click the Snippet icon on the palette.
  3. Click the Flow 2 figure Flow 2. The Snippet figure Snippet was added.
  4. Switch to the Properties view. The Display Name field is set to Snippet. The Name field is set to Snippet.
  5. In the details section, click the Description tab.
  6. In the Display Name field, type Assign getNewsInput. The Name field is set to AssigngetNewsInput.
  7. In the details section, click the Details tab.
  8. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  9. In the navigation tree, click SCA services > create specific BO.
  10. Click OK. The Data Type Selection window opens.
  11. In the Filter by type, namespace, or file (? = any character, * = any String) field, type getNewsArticles.
  12. Click getNewsArticles.
  13. Click OK.
  14. Click the canvas to add the activity.
  15. Add the existing getNewsArticlesInput variable to the canvas.
  16. Connect the create getNewsArticles figure to the getNewsArticlesInput figure.
  17. Add a create specific BO activity for StringListBO.
  18. Add the existing getNewsArticlesInput variable to the canvas and drill into getNewsArticlesInput.symbols.
  19. Connect the create StringListBO activity to the getNewsArticlesInput.symbols.
  20. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  21. In the Specify a type (? = any character, * = any String) field, type java.util.ArrayList.
  22. Click ArrayList.
  23. Click ArrayList().
  24. Click OK.
  25. Click the canvas to add the activity.
  26. Add the existing getNewsArticlesInput variable to the canvas and drill into getNewsArticlesInput.symbols.value.
  27. Connect the new ArrayList figure to the getNewsArticlesInput.symbols.value figure.
  28. Add a create specific BO activity for StringListBO.
  29. Add the existing getNewsArticlesInput variable to the canvas and drill into getNewsArticlesInput.categories.
  30. Connect the create StringListBO activity to the getNewsArticlesInput.categories.
  31. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  32. In the Specify a type (? = any character, * = any String) field, type java.util.ArrayList.
  33. Click ArrayList.
  34. Click ArrayList().
  35. Click OK.
  36. Click the canvas to add the activity.
  37. Add the existing getNewsArticlesInput variable to the canvas and drill into getNewsArticlesInput.categories.value.
  38. Connect the new ArrayList figure to the getNewsArticlesInput.categories.value figure.
  39. Add the existing getBrokerageAccountOuput variable to the canvas and drill into getBrokerageAccountOutput.brokerageAccount.stockPortfolio.stockInfoList.
  40. Click the For Each icon on the palette.
  41. Click the canvas to add the activity.
  42. Connect the getBrokerageAccountOutput.brokerageAccount.stockPortfolio.stockInfoList figure to the For Each figure.
  43. Add the existing getNewsArticlesInput variable to the For Each figure and drill into getNewsArticlesInput.symbols.value.
  44. Add the existing item variable to the For Each figure and drill into item.symbol.
  45. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  46. In the Specify a type (? = any character, * = any String) field, type java.util.List.
  47. Click List.
  48. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  49. Click add(Object).
  50. Click OK.
  51. Click the canvas to add the activity.
  52. Connect the getNewsArticlesInput.symbols.value figure to the add figure.
  53. Connect the item.symbol figure to the add figure.

Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.