Adding a snippet to assign the OutputVariable variable

Follow these steps to add a snippet to assign the OutputVariable variable to the PortfolioEvaluatorProcess process:
  1. Switch to the PortfolioEvaluatorProcess editor.
  2. Click the Invoke icon on the palette.
  3. Click the Snippet icon on the palette.
  4. Click the WhileLoop figure WhileLoop. 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 Assign OutputVariable .The Name field is set to AssignOutputVariable.
  8. In the details section, click the Details tab.
  9. Add the existing getQuoteOutput variable to the canvas.
  10. Add the existing stockInfo variable to the canvas and drill into stockInfo.pricePerShare.
  11. Connect the getQuoteOutput figure to the stockInfo.pricePerShare figure. type:float{http://www.w3.org/2001/XMLSchema}.
  12. Add the existing stockInfo variable to the canvas and drill into stockinfo.pricePerShare.
  13. Add the existing stockInfo variable to the canvas and drill into stockinfo.quantity. type:float{http://www.w3.org/2001/XMLSchema}
  14. Click the Standard... icon Standard icon on the palette. The Add a Standard Visual Snippet window opens.
  15. In the navigation tree, click math > multiply.
  16. Click OK.
  17. Click the canvas to add the activity.
  18. Connect the stockInfo.pricePerShare figure to the multiply figure.
  19. Connect the stockInfo.quantity figure to the multiply figure. type:float{http://www.w3.org/2001/XMLSchema}
  20. Add the existing OutputVariable to the canvas and drill into OutputVariable.outputStockPortfolio.value. type:float{http://www.w3.org/2001/XMLSchema}
  21. Click the Standard... icon standard icon on the palette. The Add a Standard Visual Snippet window opens.
  22. In the navigation tree, click math > add.
  23. Click OK.
  24. Click the canvas to add the activity. type:float{http://www.w3.org/2001/XMLSchema}
  25. Add the existing OutputVariable to the canvas and drill into OutputVariable.outputStockPortfolio.value.
  26. Connect the multiply figure to the add figure.
  27. Connect the first OutputVariable.outputStockPortfolio.value figure to the add figure.
  28. Connect the add figure to the second OutputVariable.outputStockPortfolio.value figure. type:float{http://www.w3.org/2001/XMLSchema}
  29. Add the existing stockInfo variable to the canvas. type:float{http://www.w3.org/2001/XMLSchema}
  30. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  31. In the navigation tree, click SCA services > copy BO.
  32. Click OK.
  33. Click the canvas to add the activity. type:float{http://www.w3.org/2001/XMLSchema}
  34. Click the Expression icon on the palette.
  35. Add the expression to the canvas and type stockInfoCopy as the label.
  36. Right-click the stockInfoCopy figure stockInfoCopy.
  37. From the pop-up menu, select Set Type > Business Object . The Data Type Selection window opens.
  38. In the Filter by type, namespace, or file (? = any character, * = any String) field, type StockInfoBO.
  39. Click StockInfoBO.
  40. Click OK.
  41. Click the stockInfo figure to the copyBO figure.
  42. Connect the copy BO figure to the stockInfoCopy figure . type:float{http://www.w3.org/2001/XMLSchema}
  43. Add the existing OutputVariable to the canvas and drill into OutputVariable.outputStockPortfolio.stockInfoList.
  44. Add the existing stockInfoCopy variable to the canvas. type:float{http://www.w3.org/2001/XMLSchema}
  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 OutputVariable.outputStockPortfolio.stockInfoList figure to the add figure.
  53. Connect the stockInfoCopy figure to the add figure. type:float{http://www.w3.org/2001/XMLSchema}
  54. Add the existing counter variable to the canvas. type:float{http://www.w3.org/2001/XMLSchema}
  55. Click the Expression icon on the palette.
  56. Add the expression to the canvas and type 1 as the label.
  57. Click the Standard... icon on the palette. The Add a Standard Visual Snippet window opens.
  58. In the navigation tree, click math > add.
  59. Click OK.
  60. Click the canvas to add the activity. type:float{http://www.w3.org/2001/XMLSchema}
  61. Add the existing counter variable to the canvas.
  62. Connect the first counter figure to the add figure.
  63. Connect the 1 figure to the add figure.
  64. Connect the add figure to the counter figure.
  65. From the menu, select File > Save (or press Ctrl+S).
    PortfolioEvaluatorProcess
    The User Operation is Waiting window opens. The The user operation is waiting for "Building workspace" to complete. page opens.
  66. From the menu, select File > Close (or press Ctrl+F4). The editor closes for PortfolioEvaluatorProcess.
  67. From the menu, select File > Save (or press Ctrl+S).

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