Adding another customer snippet

Follow these steps to add another customer snippet:
  1. Click the Invoke icon on the palette.
  2. Click the Snippet icon on the palette.
  3. Click the connection between GetNewsArticles and Reply. 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 Filter articles. The Name field is set to Filterarticles.
  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. Click getNewsArticlesResponse.
  12. In the Filter by type, namespace, or file (? = any character, * = any String) field, type getNewsArticlesResponse.
  13. Click OK.
  14. Click the canvas to add the activity.
  15. Add the existing OutputVariable variable to the canvas.
  16. Connect the create getNewsArticlesResponse figure to the OutputVariable.
  17. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  18. In the navigation tree, click SCA services > create specific BO.
  19. Click OK. The Data Type Selection window opens.
  20. In the Filter by type, namespace, or file (? = any character, * = any String) field, type getNewsArticlesListBO.
  21. Click NewsArticleListBO.
  22. Click OK.
  23. Click the canvas to add the activity.
  24. Add the existing OutputVariable variable to the canvas, and drill into OutputVariable.newsArticles.
  25. Connect the create NewsArticlesListBO figure to OutputVariable.newsArticles.
  26. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  27. In the Specify a type (? = any character, * = any String) field, type java.util.ArrayList.
  28. Click ArrayList.
  29. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  30. Click ArrayList().
  31. Click OK.
  32. Click the canvas to add the activity.
  33. Add the existing OutputVariable variable to the canvas, and drill into OutputVariable.newsArticles.value.
  34. Connect the new ArrayList figure to OutputVariable.newsArticles.value.
  35. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  36. In the Specify a type (? = any character, * = any String) field, type java.util.ArrayList.
  37. Click ArrayList.
  38. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  39. Click ArrayList().
  40. Click OK.
  41. Click the canvas to add the activity.
  42. Add an expression to the canvas with and type newsArticles as the label.
  43. Add the existing GetNewsArticlesOutput variable to the canvas, and drill into GetNewsArticlesOutput.newsArticles.value.
  44. Add the existing newsArticles variable to the canvas.
  45. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  46. In the navigation tree, click SCA services > copy list contents.
  47. Click OK.
  48. Click the canvas to add the activity.
  49. Connect the GetNewsArticlesOutput.newsArticles.value figure to the copy list contents figure.
  50. Connect the newsArticles figure to the copy list contents figure.
  51. Add the existing newsArticles figure to the canvas.
  52. Click the For Each icon on the palette.
  53. Click the canvas to add the activity.
  54. Add the existing variable item to the For Each figure.
  55. Add the existing InputVariable to the For Each figure. Drill into InputVariable.symbols.value.
  56. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  57. In the navigation tree, click logic > IsDisplayArticle.
  58. Click OK.
  59. Click the For Each figure to add the activity.
  60. Click the Choice icon on the palette.
  61. Click the For Each figure to add the activity.
  62. Connect the item figure to the IsDisplayArticle figure.
  63. Connect the InputVariable.symbols.value figure to the IsDisplayArticle figure.
  64. Connect the IsDisplayArticle figure to the if true figure.
  65. Add the existing variable OutputVariable to the if true figure, and drill into OutputVariable.newsArticles.value.
  66. Add the existing item variable to the if true figure.
  67. Click the Java... icon on the palette. The Select a Java Visual Snippet window opens.
  68. In the Specify a type (? = any character, * = any String) field, type java.util.List.
  69. Click List.
  70. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  71. Click add(Object).
  72. Click OK.
  73. Click inside the if true figure to add the activity.
  74. Connect the OutputVariable.newsArticles.value figure to the add figure.
  75. Connect the item figure to the add figure
  76. From the menu, select File > Save (or press Ctrl+S).
  77. Here is what the process should look like:
    GetNewsArticlesProcess
  78. From the menu, select File > Close (or press Ctrl+F4). The editor closes for GetNewsArticlesProcess.

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