|
| 1 | +{ |
| 2 | + "version": "0.1", |
| 3 | + "pageContent": |
| 4 | + { |
| 5 | + "_comments": "JSON object that contains data for page labels, buttons, etc.", |
| 6 | + "navItems": |
| 7 | + { |
| 8 | + "_common": |
| 9 | + { |
| 10 | + "buttonBackToGallery": |
| 11 | + { |
| 12 | + "name": "Back To Gallery", |
| 13 | + "method": "backToGallery()", |
| 14 | + "idName": "backToGallery" |
| 15 | + }, |
| 16 | + "buttonStartTutorial": |
| 17 | + { |
| 18 | + "name": "Start Tutorial", |
| 19 | + "method": "startTutorialFromDetailsScreen()", |
| 20 | + "idName": "startTutorial" |
| 21 | + }, |
| 22 | + "buttonViewDetails": |
| 23 | + { |
| 24 | + "name": "View Details", |
| 25 | + "method": "viewDetails()", |
| 26 | + "idName": "stepsViewDetails" |
| 27 | + } |
| 28 | + } |
| 29 | + } |
| 30 | + }, |
| 31 | + "tutorial": |
| 32 | + { |
| 33 | + "_common": |
| 34 | + { |
| 35 | + "name": "LoopBack Request node", |
| 36 | + "shortDescription": "Learn how to use the LoopBackRequest node to create a JSON document in a Cloudant database", |
| 37 | + "durationText": "This tutorial takes approximately", |
| 38 | + "durationTime": "10 minutes", |
| 39 | + "_resourceToOpenComment": "The ID of the first resource to open when the user imports the tutorial. Resource IDs are defined in the repo_metadata.json Tutorials listing on ot4i.", |
| 40 | + "resourceToOpen": "EventRoutingFlow", |
| 41 | + "helpLink": |
| 42 | + { |
| 43 | + "text": "IBM Knowledge Center", |
| 44 | + "link": "https://www.ibm.com/support/knowledgecenter/en/SSTTDS_11.0.0/com.ibm.ace.home.doc/help_home.htm" |
| 45 | + } |
| 46 | + }, |
| 47 | + "pageDetails": |
| 48 | + { |
| 49 | + "topicsName": "Tutorial Topics", |
| 50 | + "_topicListComment": "A short list of product concepts or tasks demonstrated by this tutorial", |
| 51 | + "topicList": |
| 52 | + [ |
| 53 | + { |
| 54 | + "title": "LoopBackRequest node" |
| 55 | + }, |
| 56 | + { |
| 57 | + "title": "Cloudant DB" |
| 58 | + } |
| 59 | + ], |
| 60 | + "outcomesName": "Learning outcomes", |
| 61 | + "_outcomesComment": "A description of what the user will have learned or accomplished by running this tutorial.", |
| 62 | + "outcomeList": |
| 63 | + [ |
| 64 | + { |
| 65 | + "title": "Use a LoopBackRequest node to insert JSON documents into a Cloudant database" |
| 66 | + } |
| 67 | + ], |
| 68 | + "summary": |
| 69 | + { |
| 70 | + "overviewName": "OVERVIEW", |
| 71 | + "_overviewComment": "A short description of what happens in this tutorial, and an optional short explanation of the ACE concepts used in this tutorial if necessary for context. What background knowledge must the user have for this to make sense?", |
| 72 | + "sections": |
| 73 | + [ |
| 74 | + { |
| 75 | + "section": "This tutorial demonstrates a simple message flow that receives a JSON message over HTTP, and uses a LoopBackRequest node to insert the document into a NoSQL Cloudant database. This tutorial describes how to use npm to install a LoopBack connector for Cloudant, and the required configuration to let the LoopBackRequest node locate and authenticate a connection with a Cloudant database instance running on IBM Bluemix." |
| 76 | + } |
| 77 | + ] |
| 78 | + }, |
| 79 | + "helpLinks": |
| 80 | + { |
| 81 | + "_helpLinksComment": "Helplinks that have a type:web attribute are rendered as web links. Otherwise, links are assumed to be to embedded Help topics in the Knowledge Center.", |
| 82 | + "title": "Find out more", |
| 83 | + "details": |
| 84 | + [ |
| 85 | + { |
| 86 | + "title": "Working with LoopBack Connectors", |
| 87 | + "description": "Working with LoopBack Connectors", |
| 88 | + "link": "https://www.ibm.com/support/knowledgecenter/en/SSTTDS_11.0.0/com.ibm.etools.mft.doc/bz90800_.htm", |
| 89 | + "type": "web" |
| 90 | + }, |
| 91 | + { |
| 92 | + "title": "More detailed LoopBackRequest node tutorial", |
| 93 | + "description": "More detailed LoopBackRequest node Tutorial (written for IIBv10)", |
| 94 | + "link": "https://developer.ibm.com/integration/blog/2016/10/13/iib-v10-0-0-6-loopback-request-node-tutorial/", |
| 95 | + "type": "web" |
| 96 | + } |
| 97 | + ] |
| 98 | + } |
| 99 | + }, |
| 100 | + "pageSteps": |
| 101 | + { |
| 102 | + "create": |
| 103 | + { |
| 104 | + "overview": |
| 105 | + { |
| 106 | + "name": "Create", |
| 107 | + "heading": "Import projects", |
| 108 | + "_createComment": "A description of what will happen when the user clicks Import.", |
| 109 | + "sections": |
| 110 | + [ |
| 111 | + { |
| 112 | + "section": "When you click Import, an application will be created in your workspace named <span class='application'>LoopBack</span>." |
| 113 | + }, |
| 114 | + { |
| 115 | + "section": "The application <span class='application'>LoopBack</span> contains a message flow named <span class='msgflow'>LoopBack_Cloudant.msgflow</span> which contains an HTTPInput node, LoopBackRequest node and HTTPReply node." |
| 116 | + }, |
| 117 | + { |
| 118 | + "section": "The HTTPInput node has a path suffix <code>/LoopBack_Cloudant</code>." |
| 119 | + }, |
| 120 | + { |
| 121 | + "section": "The LoopBackRequest node has a datasource property of <code>CLOUDANT</code>, and is configured to interact with a LoopBack object named <code>share_price</code> (in our example this is the name of the Cloudant database). The <code>Create</code> operation is selected so that the JSON structure passed in to the LoopBackRequest node is inserted into the Cloudant database." |
| 122 | + } |
| 123 | + ] |
| 124 | + }, |
| 125 | + "helpLinks": |
| 126 | + { |
| 127 | + "title": "Find out more", |
| 128 | + "details": |
| 129 | + [ |
| 130 | + { |
| 131 | + "title": "Working with LoopBack Connectors", |
| 132 | + "description": "Working with LoopBack Connectors", |
| 133 | + "link": "https://www.ibm.com/support/knowledgecenter/en/SSTTDS_11.0.0/com.ibm.etools.mft.doc/bz90800_.htm", |
| 134 | + "type": "web" |
| 135 | + }, |
| 136 | + { |
| 137 | + "title": "More detailed LoopBackRequest node tutorial", |
| 138 | + "description": "More detailed LoopBackRequest node Tutorial (written for IIBv10)", |
| 139 | + "link": "https://developer.ibm.com/integration/blog/2016/10/13/iib-v10-0-0-6-loopback-request-node-tutorial/", |
| 140 | + "type": "web" |
| 141 | + } |
| 142 | + ] |
| 143 | + }, |
| 144 | + "actions": |
| 145 | + { |
| 146 | + "title": "Create Actions", |
| 147 | + "details": |
| 148 | + [ |
| 149 | + { |
| 150 | + "name": "Import", |
| 151 | + "method": "importArtifacts()" |
| 152 | + } |
| 153 | + ] |
| 154 | + } |
| 155 | + }, |
| 156 | + "prepare": |
| 157 | + { |
| 158 | + "overview": |
| 159 | + { |
| 160 | + "name": "Prepare", |
| 161 | + "heading": "", |
| 162 | + "_prepareComment": "A description of the required preparation steps.", |
| 163 | + "sections": |
| 164 | + [ |
| 165 | + { |
| 166 | + "section": "<h4>Create the Cloudant Database</h4>", |
| 167 | + "steps": |
| 168 | + { |
| 169 | + "type": "ordered", |
| 170 | + "details": |
| 171 | + [ |
| 172 | + { |
| 173 | + "details": "This tutorial assumes the availability of a non-partitioned Cloudant database. You can use IBM Cloud to provide this (free of charge). Sign into IBM Cloud, find Cloudant in the Databases section of the Catalog, and create an instance of the Cloudant service. " |
| 174 | + }, |
| 175 | + { |
| 176 | + "details": "Navigate to the Service Credentials section. If this is a new instance of Cloudant you will need to generate some new Service credentials. If you are generating new credentials you can choose the default options. When you view the Service credentials, you will find connection details that we will be using to tell ACE how to communicate with your IBM Cloud Cloudant instance. They will look similar to the following JSON (don't be surprised if you see some additional fields listed as well - for example related to the use of IAM):<br><span class='resource'>{<br>"username": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix",<br> "password": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",<br> "host": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix.cloudantnosqldb.appdomain.cloud",<br> "port": 443,<br> "url": "https://aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix.cloudant.com"<br>}</span>" |
| 177 | + }, |
| 178 | + { |
| 179 | + "details": "Switch to the Cloudant dashboard part of the service and create a database called <code>share_price</code>." |
| 180 | + } |
| 181 | + ] |
| 182 | + } |
| 183 | + }, |
| 184 | + { |
| 185 | + "section": "<h4>Configure the ACE LoopBack connector</h4>", |
| 186 | + "steps": |
| 187 | + { |
| 188 | + "type": "ordered", |
| 189 | + "details": |
| 190 | + [ |
| 191 | + { |
| 192 | + "details": "To use the LoopBackRequest node in this tutorial, you must install the Cloudant LoopBack connector. Open the App Connect Enterprise Command Console:<br><code><span class='cmdname'> cd</span> <span class='varname'> %MQSI_WORKPATH%\\node_modules </span></code><br><code><span class='cmdname'> npm install loopback-connector-cloudant </span></code>" |
| 193 | + }, |
| 194 | + { |
| 195 | + "details": "If you don't already have one, create a datasources.json file in the connectors/loopback folder of your ACE workpath (by default on Windows, this will be at C:\\ProgramData\\IBM\\MQSI\\connectors\\loopback). This is where ACE stores connection information for Loopback Request node instances." |
| 196 | + }, |
| 197 | + { |
| 198 | + "details": "Add a stanza to the datasources.json file:<br><code><span class='cmdname'> { "CLOUDANT":{"database": "share_price","name": "CLOUDANT","host": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix.cloudantnosqldb.appdomain.cloud","port": 443,"connector": "cloudant"}}</code>" |
| 199 | + }, |
| 200 | + { |
| 201 | + "details": "From your command console, create an integration node (if you don't already have one):<code><span class='cmdname'> mqsicreatebroker TESTNODE</span></code>" |
| 202 | + }, |
| 203 | + { |
| 204 | + "details": "From your command console, configure ACE with your Cloudant security credentials like this:<br><code><span class='cmdname'> mqsisetdbparms TESTNODE -n loopback::CLOUDANT_SEC_ID -u aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa-bluemix -p bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb </span></code>" |
| 205 | + }, |
| 206 | + { |
| 207 | + "details": "From your command console, start your node: <code><span class='cmdname'> mqsistart TESTNODE</span></code>" |
| 208 | + }, |
| 209 | + { |
| 210 | + "details": "From your command console, create an integration server (if you don't already have one): <code><span class='cmdname'> mqsicreateexecutiongroup TESTNODE -e default</span></code>" |
| 211 | + } |
| 212 | + ] |
| 213 | + } |
| 214 | + } |
| 215 | + ] |
| 216 | + }, |
| 217 | + "helpLinks": |
| 218 | + { |
| 219 | + "title": "Find out more", |
| 220 | + "details": |
| 221 | + [ |
| 222 | + { |
| 223 | + "title": "Working with LoopBack Connectors", |
| 224 | + "description": "Working with LoopBack Connectors", |
| 225 | + "link": "https://www.ibm.com/support/knowledgecenter/en/SSTTDS_11.0.0/com.ibm.etools.mft.doc/bz90800_.htm", |
| 226 | + "type": "web" |
| 227 | + }, |
| 228 | + { |
| 229 | + "title": "More detailed LoopBackRequest node tutorial", |
| 230 | + "description": "More detailed LoopBackRequest node Tutorial (written for IIBv10)", |
| 231 | + "link": "https://developer.ibm.com/integration/blog/2016/10/13/iib-v10-0-0-6-loopback-request-node-tutorial/", |
| 232 | + "type": "web" |
| 233 | + } |
| 234 | + ] |
| 235 | + } |
| 236 | + }, |
| 237 | + "run": |
| 238 | + { |
| 239 | + "overview": |
| 240 | + { |
| 241 | + "name": "Run", |
| 242 | + "heading": "Use the Flow Exerciser to test the tutorial scenario", |
| 243 | + "_runComment": "The full steps for the user to run through the tutorial. Use 'sections' to render paragraphs, 'steps' with a type of 'ordered' or 'unordered' to render HTML lists, and 'substeps' to render nested lists.", |
| 244 | + "sections": |
| 245 | + [ |
| 246 | + { |
| 247 | + "section": "Having prepared the scenario, the following steps describe how to use the Flow Exerciser to test the message flow:", |
| 248 | + "steps": |
| 249 | + { |
| 250 | + "type": "ordered", |
| 251 | + "details": |
| 252 | + [ |
| 253 | + { |
| 254 | + "details": "Open <span class='resource'>LoopBack_Cloudant.msgflow</span>." |
| 255 | + }, |
| 256 | + { |
| 257 | + "details": "Click the Flow Exerciser icon <img src='http://ot4i.github.io/ot4i.tutorials//dist/images/icons/iib/startFlowExerciser.png' alt='' /> to start testing the flow" |
| 258 | + }, |
| 259 | + { |
| 260 | + "details": "Click the Send Message icon <img src='http://ot4i.github.io/ot4i.tutorials/dist/images/icons/iib/sendMessage.png' alt='' />." |
| 261 | + }, |
| 262 | + { |
| 263 | + "details": "Select the saved message which has been provided, named <span class='resource'>InputMessage</span>, and click Send:<br><span class='resource'>{"companyID":"100","company":"IBM UK Ltd","price":199}</span><br>Your message is sent to the HTTPInput node." |
| 264 | + }, |
| 265 | + { |
| 266 | + "details": "A response should be shown, which now includes an id that the database has created and given to the document, which should look like this:<br><span class='resource'>{"id":"de28e5b037b01a3670d9b9f8d459deb5","companyID":"100","company":"IBM UK Ltd","price":199}</span>" |
| 267 | + }, |
| 268 | + { |
| 269 | + "details": "After you close the dialog, the paths taken through the messageflow are highlighted. Click on the message icon on each connection to see how the tree has been updated by each node." |
| 270 | + } |
| 271 | + ] |
| 272 | + } |
| 273 | + }, |
| 274 | + { |
| 275 | + "section": "This tutorial has shown the LoopBackRequest node creating a JSON document in a Cloudant database." |
| 276 | + } |
| 277 | + ] |
| 278 | + }, |
| 279 | + "helpLinks": |
| 280 | + { |
| 281 | + "title": "Find out more", |
| 282 | + "details": |
| 283 | + [ |
| 284 | + { |
| 285 | + "title": "Working with LoopBack Connectors", |
| 286 | + "description": "Working with LoopBack Connectors", |
| 287 | + "link": "https://www.ibm.com/support/knowledgecenter/en/SSTTDS_11.0.0/com.ibm.etools.mft.doc/bz90800_.htm", |
| 288 | + "type": "web" |
| 289 | + }, |
| 290 | + { |
| 291 | + "title": "More detailed LoopBackRequest node tutorial", |
| 292 | + "description": "More detailed LoopBackRequest node Tutorial (written for IIBv10)", |
| 293 | + "link": "https://developer.ibm.com/integration/blog/2016/10/13/iib-v10-0-0-6-loopback-request-node-tutorial/", |
| 294 | + "type": "web" |
| 295 | + } |
| 296 | + ] |
| 297 | + } |
| 298 | + } |
| 299 | + } |
| 300 | + } |
| 301 | +} |
0 commit comments