Adding a snippet to assign the counter and numberOfSymbols variables

Follow these steps to add a snippet to assign the counter and numberOfSymbols variables to the PortfolioEvaluatorProcess process:
  1. Switch to the PortfolioEvaluatorProcess editor.
  2. Click the Empty Action icon on the palette.
  3. Click the Snippet icon on the palette.
  4. Click the connection between Receive and Reply. The Snippet figure Snippet was added.
  5. Switch to the Properties view.
  6. In the details section, click the Description tab.
  7. In the Display Name field, type Initialize variables. The Name field will be set to Initializevariables.
  8. In the details section, click the Details tab.
  9. Click the Expression icon on the palette.
  10. Add the expression to the canvas and type 0 as the label.
  11. Add the existing counter variable to the canvas.
  12. Connect the 0 figure to the counter figure counter figure.
  13. Add the existing InputVariable to the canvas and drill into InputVariable.inputStockPortfolio.stockInfoList.
  14. Click the Java™... icon Java icon on the palette. The Select a Java Visual Snippet window opens.
  15. In the Specify a type (? = any character, * = any String) field, type java.util.List.
  16. Click List.
  17. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  18. Click size().
  19. Click OK.
  20. Add the existing numberOfSymbols variable to the canvas.
  21. Connect the InputVariable.inputStockPortfolio.stockInfoList figure to the size figure.
  22. Connect the size figure to the numberOfSymbols figure. connected figure
  23. Click the Standard... icon Standard icon on the palette. The Add a Standard Visual Snippet window opens.
  24. In the navigation tree, click SCA services > create specific BO.
  25. Click OK. The Data Type Selection window opens.
  26. In the Filter by type, namespace, or file (? = any character, * = any String) field, type getStockPortfolioValueResponse.
  27. Click getStockPortfolioValueResponse.
  28. Click OK.
  29. Click the canvas to add the activity. type:int.
  30. Add the existing OutputVariable to the canvas.
  31. Connect the create getStockPortfolioResponse figure to the OutputVariable figure. Connected to OutputVariable
  32. Click the Standard... icon Standard icon on the palette. The Add a Standard Visual Snippet window opens.
  33. In the navigation tree, click SCA services > create specific BO.
  34. Click OK. The Data Type Selection window opens.
  35. In the Filter by type, namespace, or file (? = any character, * = any String) field, type StockPortfolioBO.
  36. Click StockPortfolioBO.
  37. Click OK.
  38. Click the canvas to add the activity. type:int
  39. Add the existing OutputVariable to the canvas and drill into OutputVariable.outputStockPortfolio.
  40. Connect the create StockPortfolioBO figure to the OutputVariable.outputStockPortfolio figure. type:int
  41. Click the Expression icon on the palette.
  42. Click the canvas to add the expression and type 0 as the label.
  43. Add the existing OutputVariable variable to the canvas and drill into OutputVariable.outputStockPortfolio.value.
  44. Connect the 0 figure to the OutputVariable.outputStockPortfolio.value figure. type:int
  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.ArrayList.
  47. Click ArrayList.
  48. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  49. Click ArrayList.
  50. Click OK.
  51. Click the canvas to add the activity. type:int
  52. Add the existing OutputVariable to the canvas and drill into OutputVariable.outputStockPortfolio.stockInfoList.
  53. Connect the new ArrayList figure to the OutputVariable.outputStockPortfolio.stockInfoList figure.

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