{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Set execution hints at node level","type":"basic","slug":"set-execution-hints-at-node-level","excerpt":"","body":"##Via the visual interface\n1. Go to the **Apps** tab of your project dashboard.\n2. Click <i class=\"fa fa-ellipsis-h\" aria-hidden=\"true\"></i> next to the workflow and select **Edit**. Workflow Editor opens.\n3. In the workflow editor, double-click the node representing the tool in the workflow whose instance you want to set. This will show the object inspector on the right. Note that input and output nodes in a workflow don't represent tools, and you can't set their instances.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/504bbe8-set-hints-at-node-level-cavatica-1.png\",\n        \"set-hints-at-node-level-cavatica-1.png\",\n        808,\n        625,\n        \"#333\"\n      ]\n    }\n  ]\n}\n[/block]\n4. In the object inspector, open the **Step** tab.\n5. Scroll to the bottom of the tab's contents and click **Set Hints**. The **Set Hints** popup window opens.\n5. Click **Add a Hint** and enter the following information:\n  * In the **Class** field select e.g. `sbg:AWSInstanceType` or `sbg:GoogleInstanceType` to define the instance you want to use to execute the tool.\n  * In the **Value** field select an instance type from the list of available [AWS](doc:list-of-available-amazon-web-services-instances) or [GCP](doc:list-of-available-google-cloud-platform-instances)  instances. In the field on the right, you can set the size of [storage attached to the computation instance](#attached-storage-workflow).\n  * Click **Done**. You have successfully set the instance hint.\n\n##Via the API\n  * To set node-level hints via the API, include those hints in the CWL specification of the workflow when [adding a new app](ref:add-an-app-using-raw-cwl) or [adding a new revision of an app](doc:add-an-app-revision-using-raw-cwl).\n  * Node level hints should be placed in an array named hints at the top level of the appropriate step object in the workflow JSON file. Step objects themselves are contained in an array named steps at the top level of the workflow JSON.\n  * A hint is represented by a JSON object with the following fields:\n\n| Field | Description |\n| --- | --- |\n| `class`\t| The name of the hint to set |\n| `value`\t| The value to assign to this hint |\n\n**AWS**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  ...\\n  \\\"steps\\\": [\\n    ...\\n    {\\n      \\\"hints\\\": [\\n        {\\n          \\\"class\\\": \\\"sbg:AWSInstanceType\\\",\\n          \\\"value\\\": \\\"c4.8xlarge;ebs-gp2;2000\\\"\\n        }\\n      ],\\n      ...\\n    },\\n    ...\\n  ],\\n  ...\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Example workflow object with node level hints\"\n    }\n  ]\n}\n[/block]\nIn this case, the node uses the `c4.8xlarge` instance with 2000 GB of attached EBS storage. The value of `sbg:AWSInstanceType` consists of the following three parts:\n* instance type, e.g. `c4.8xlarge`\n* attached disk type: `ebs-gp2`\n* attached disk size in GB","updates":[],"order":7,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"60f06ac590a05800516c926e","createdAt":"2021-07-15T17:05:09.020Z","user":"5dbff97bc91e080029778657","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Task Execution","slug":"task-execution","order":17,"from_sync":false,"reference":false,"_id":"5eb0172be179b70073dc936e","createdAt":"2020-05-04T13:22:51.351Z","version":"5773dcfc255e820e00e1cd50","project":"5773dcfc255e820e00e1cd4d","__v":0},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5773dcfc255e820e00e1cd51","5773df36904b0c0e00ef05ff","577baf92451b1e0e006075ac","577bb183b7ee4a0e007c4e8d","577ce77a1cf3cb0e0048e5ea","577d11865fd4de0e00cc3dab","578e62792c3c790e00937597","578f4fd98335ca0e006d5c84","578f5e5c3d04570e00976ebb","57bc35f7531e000e0075d118","57f801b3760f3a1700219ebb","5804d55d1642890f00803623","581c8d55c0dc651900aa9350","589dcf8ba8c63b3b00c3704f","594cebadd8a2f7001b0b53b2","59a562f46a5d8c00238e309a","5a2aa096e25025003c582b58","5a2e79566c771d003ca0acd4","5a3a5166142db90026f24007","5a3a52b5bcc254001c4bf152","5a3a574a2be213002675c6d2","5a3a66bb2be213002675cb73","5a3a6e4854faf60030b63159","5c8a68278e883901341de571","5cb9971e57bf020024523c7b","5cbf1683e2a36d01d5012ecd","5dc15666a4f788004c5fd7d7","5eaff69e844d67003642a020","5eb00899b36ba5002d35b0c1","5eb0172be179b70073dc936e","5eb01b42b36ba5002d35ebba","5eb01f202654a20136813093","5eb918ef149186021c9a76c8","5f0839d3f4b24e005ebbbc29","5f893e508c9862002d0614a9","6024033e2b2f6f004dfe994c","60a7a12f9a06c70052b7c4db","60a7ab97266a4700161507c4","60b0c84babba720010a8b0b5"],"_id":"5773dcfc255e820e00e1cd50","__v":39,"createdAt":"2016-06-29T14:36:44.812Z","releaseDate":"2016-06-29T14:36:44.812Z","project":"5773dcfc255e820e00e1cd4d"},"project":"5773dcfc255e820e00e1cd4d","__v":0,"parentDoc":null}

Set execution hints at node level


##Via the visual interface 1. Go to the **Apps** tab of your project dashboard. 2. Click <i class="fa fa-ellipsis-h" aria-hidden="true"></i> next to the workflow and select **Edit**. Workflow Editor opens. 3. In the workflow editor, double-click the node representing the tool in the workflow whose instance you want to set. This will show the object inspector on the right. Note that input and output nodes in a workflow don't represent tools, and you can't set their instances. [block:image] { "images": [ { "image": [ "https://files.readme.io/504bbe8-set-hints-at-node-level-cavatica-1.png", "set-hints-at-node-level-cavatica-1.png", 808, 625, "#333" ] } ] } [/block] 4. In the object inspector, open the **Step** tab. 5. Scroll to the bottom of the tab's contents and click **Set Hints**. The **Set Hints** popup window opens. 5. Click **Add a Hint** and enter the following information: * In the **Class** field select e.g. `sbg:AWSInstanceType` or `sbg:GoogleInstanceType` to define the instance you want to use to execute the tool. * In the **Value** field select an instance type from the list of available [AWS](doc:list-of-available-amazon-web-services-instances) or [GCP](doc:list-of-available-google-cloud-platform-instances) instances. In the field on the right, you can set the size of [storage attached to the computation instance](#attached-storage-workflow). * Click **Done**. You have successfully set the instance hint. ##Via the API * To set node-level hints via the API, include those hints in the CWL specification of the workflow when [adding a new app](ref:add-an-app-using-raw-cwl) or [adding a new revision of an app](doc:add-an-app-revision-using-raw-cwl). * Node level hints should be placed in an array named hints at the top level of the appropriate step object in the workflow JSON file. Step objects themselves are contained in an array named steps at the top level of the workflow JSON. * A hint is represented by a JSON object with the following fields: | Field | Description | | --- | --- | | `class` | The name of the hint to set | | `value` | The value to assign to this hint | **AWS** [block:code] { "codes": [ { "code": "{\n ...\n \"steps\": [\n ...\n {\n \"hints\": [\n {\n \"class\": \"sbg:AWSInstanceType\",\n \"value\": \"c4.8xlarge;ebs-gp2;2000\"\n }\n ],\n ...\n },\n ...\n ],\n ...\n}", "language": "json", "name": "Example workflow object with node level hints" } ] } [/block] In this case, the node uses the `c4.8xlarge` instance with 2000 GB of attached EBS storage. The value of `sbg:AWSInstanceType` consists of the following three parts: * instance type, e.g. `c4.8xlarge` * attached disk type: `ebs-gp2` * attached disk size in GB