{"_id":"588f722bbcace50f0052b9f1","user":"565f5f29de5dc50d00acfe9f","version":{"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":1,"createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"__v":0,"parentDoc":null,"project":"565f5fa26bafd40d0030a064","category":{"_id":"588f722bbcace50f0052b9e3","version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-09T21:22:52.427Z","from_sync":false,"order":1,"slug":"user-guide","title":"Reference"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-07T16:46:13.718Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"The Components view provides a place to manage your shared component logic. These components can be defined once and reused among many different Proxy Endpoints. These component types can also be individually defined on a per Proxy Endpoint basis.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ZOU9XljR5KR31tQbUQIc_components.png\",\n        \"components.png\",\n        \"1436\",\n        \"529\",\n        \"#4e85c4\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Component Type\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Single Call component**\",\n    \"1-0\": \"**Multi-Call Component**\",\n    \"2-0\": \"**Logic Component**\",\n    \"0-1\": \"Consists of: \\n\\n1. **Conditional Logic** - determines whether to skip to the end\\n2. **Before Request Logic** - runs before the remote endpoint is invoked\\n3. **Invocation of a Remote Endpoint**\\n4. **After Request Logic** - can be used to formulate the response\",\n    \"1-1\": \"Consists of:\\n\\n1. **Conditional Logic** - determines whether to skip to the end\\n2. **Before Request Logic** - runs before the remote endpoints are invoked\\n3. **Invocation of Multiple Remote Endpoints in Parallel**\\n4. **After Request Logic** - can be used to formulate a composite response\",\n    \"2-1\": \"Consists of:\\n\\n1. **Conditional Logic** - determines whether to skip to the end\\n2. **Main Logic** - where a response can be formulated.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n## 2. a) Single Call Component\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/C8o7u11GSFOJ7j6k5135_user-guide-proxy-endpoints-single-call-component.png\",\n        \"user-guide-proxy-endpoints-single-call-component.png\",\n        \"1280\",\n        \"73\",\n        \"#ec9325\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThe single call component allows the developer to invoke a single Remote Endpoint, passing the request that can be customized, and receiving a response that can be transformed before sending to the client.  \n\nThe following properties are available in a single call component:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Conditional**\",\n    \"1-0\": \"**Conditional Logic**\",\n    \"2-0\": \"**Before Request Logic**\",\n    \"3-0\": \"**Remote Endpoint**\",\n    \"4-0\": \"**Endpoint Name Override**\",\n    \"5-0\": \"**After Request Logic**\",\n    \"6-0\": \"**Call Conditional Logic**\",\n    \"0-1\": \"Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.\",\n    \"1-1\": \"Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.\",\n    \"2-1\": \"Is custom JavaScript that is written to manipulate the request.\",\n    \"3-1\": \"By clicking on the dropdown you will be required to select a predefined Remote Endpoint.\",\n    \"4-1\": \"Optionally, enter an Endpoint Code Name override. This is useful when the same Remote Endpoint is used multiple times within a workflow, potentially for different purposes.  For example: a \\\"Customers\\\" Remote Endpoint could be used in two different steps within a workflow with Endpoint Code Name overrides: \\\"activeCustomers\\\" and \\\"inactiveCustomers\\\".\",\n    \"5-1\": \"Allows you to use write JavaScript in order to manipulate the response.\",\n    \"6-1\": \"JavaScript can be entered into the conditional logic block for data manipulation on the request data/input data.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\nThe following diagram illustrates the sequence of steps in a **Single Call Component’s** workflow.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/kJeRohb8TZGHgkSVJFGq_user-guide-proxy-endpoints-single-call-component-workflow-diagram.png\",\n        \"user-guide-proxy-endpoints-single-call-component-workflow-diagram.png\",\n        \"300\",\n        \"467\",\n        \"#5f92cc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## 2. b) Multi-Call Component\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/R320kZBdQuScJGFKU0jD_user-guide-proxy-endpoints-multi-call-component.png\",\n        \"user-guide-proxy-endpoints-multi-call-component.png\",\n        \"1280\",\n        \"73\",\n        \"#eb933c\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThe Multi-Call component- allows the developer to invoke a multiple Remote Endpoints in parallel, passing the request that can be customized, and receiving multiple responses that can be combined before sending to the client.  \n\nThe following properties are available in a multi-call component:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Conditional**\",\n    \"1-0\": \"**Conditional Logic**\",\n    \"2-0\": \"**Before Request Logic**\",\n    \"3-0\": \"**After Request Logic**\",\n    \"0-1\": \"Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.\",\n    \"1-1\": \"Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.\",\n    \"2-1\": \"Is custom JavaScript that is written to manipulate the request.\",\n    \"3-1\": \"Allows you to write JavaScript in order to manipulate the response.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n## 2. c) Logic Component\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9MVOV5yySvuVmPUFDqsi_user-guide-proxy-endpoints-logic-component.png\",\n        \"user-guide-proxy-endpoints-logic-component.png\",\n        \"1280\",\n        \"73\",\n        \"#546484\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThe JavaScript component allows the developer to define JavaScript-based business logic to determine how the Proxy Endpoint should respond.  \n\nThe following properties are available in a JavaScript component:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**Conditional Logic**\",\n    \"1-0\": \"**Conditional Logic**\",\n    \"2-0\": \"**Request Logic**\",\n    \"0-1\": \"Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.\",\n    \"1-1\": \"Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.\",\n    \"2-1\": \"The default logic entered here will get enabled if the the Conditional Logic is set to False or if there none present.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nThe following diagram illustrates the sequence of steps in a **Logic Component’s** workflow. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b41EOP4sR9qSXTtJ1Dvs_user-guide-proxy-endpoints-logic-component-workflow-diagram.png\",\n        \"user-guide-proxy-endpoints-logic-component-workflow-diagram.png\",\n        \"255\",\n        \"332\",\n        \"#829849\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"components","type":"basic","title":"Components"}
The Components view provides a place to manage your shared component logic. These components can be defined once and reused among many different Proxy Endpoints. These component types can also be individually defined on a per Proxy Endpoint basis. [block:image] { "images": [ { "image": [ "https://files.readme.io/ZOU9XljR5KR31tQbUQIc_components.png", "components.png", "1436", "529", "#4e85c4", "" ] } ] } [/block] [block:parameters] { "data": { "h-0": "Component Type", "h-1": "Description", "0-0": "**Single Call component**", "1-0": "**Multi-Call Component**", "2-0": "**Logic Component**", "0-1": "Consists of: \n\n1. **Conditional Logic** - determines whether to skip to the end\n2. **Before Request Logic** - runs before the remote endpoint is invoked\n3. **Invocation of a Remote Endpoint**\n4. **After Request Logic** - can be used to formulate the response", "1-1": "Consists of:\n\n1. **Conditional Logic** - determines whether to skip to the end\n2. **Before Request Logic** - runs before the remote endpoints are invoked\n3. **Invocation of Multiple Remote Endpoints in Parallel**\n4. **After Request Logic** - can be used to formulate a composite response", "2-1": "Consists of:\n\n1. **Conditional Logic** - determines whether to skip to the end\n2. **Main Logic** - where a response can be formulated." }, "cols": 2, "rows": 3 } [/block] ## 2. a) Single Call Component [block:image] { "images": [ { "image": [ "https://files.readme.io/C8o7u11GSFOJ7j6k5135_user-guide-proxy-endpoints-single-call-component.png", "user-guide-proxy-endpoints-single-call-component.png", "1280", "73", "#ec9325", "" ] } ] } [/block] The single call component allows the developer to invoke a single Remote Endpoint, passing the request that can be customized, and receiving a response that can be transformed before sending to the client. The following properties are available in a single call component: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "**Conditional**", "1-0": "**Conditional Logic**", "2-0": "**Before Request Logic**", "3-0": "**Remote Endpoint**", "4-0": "**Endpoint Name Override**", "5-0": "**After Request Logic**", "6-0": "**Call Conditional Logic**", "0-1": "Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.", "1-1": "Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.", "2-1": "Is custom JavaScript that is written to manipulate the request.", "3-1": "By clicking on the dropdown you will be required to select a predefined Remote Endpoint.", "4-1": "Optionally, enter an Endpoint Code Name override. This is useful when the same Remote Endpoint is used multiple times within a workflow, potentially for different purposes. For example: a \"Customers\" Remote Endpoint could be used in two different steps within a workflow with Endpoint Code Name overrides: \"activeCustomers\" and \"inactiveCustomers\".", "5-1": "Allows you to use write JavaScript in order to manipulate the response.", "6-1": "JavaScript can be entered into the conditional logic block for data manipulation on the request data/input data." }, "cols": 2, "rows": 7 } [/block] The following diagram illustrates the sequence of steps in a **Single Call Component’s** workflow. [block:image] { "images": [ { "image": [ "https://files.readme.io/kJeRohb8TZGHgkSVJFGq_user-guide-proxy-endpoints-single-call-component-workflow-diagram.png", "user-guide-proxy-endpoints-single-call-component-workflow-diagram.png", "300", "467", "#5f92cc", "" ] } ] } [/block] ## 2. b) Multi-Call Component [block:image] { "images": [ { "image": [ "https://files.readme.io/R320kZBdQuScJGFKU0jD_user-guide-proxy-endpoints-multi-call-component.png", "user-guide-proxy-endpoints-multi-call-component.png", "1280", "73", "#eb933c", "" ] } ] } [/block] The Multi-Call component- allows the developer to invoke a multiple Remote Endpoints in parallel, passing the request that can be customized, and receiving multiple responses that can be combined before sending to the client. The following properties are available in a multi-call component: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "**Conditional**", "1-0": "**Conditional Logic**", "2-0": "**Before Request Logic**", "3-0": "**After Request Logic**", "0-1": "Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.", "1-1": "Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.", "2-1": "Is custom JavaScript that is written to manipulate the request.", "3-1": "Allows you to write JavaScript in order to manipulate the response." }, "cols": 2, "rows": 4 } [/block] ## 2. c) Logic Component [block:image] { "images": [ { "image": [ "https://files.readme.io/9MVOV5yySvuVmPUFDqsi_user-guide-proxy-endpoints-logic-component.png", "user-guide-proxy-endpoints-logic-component.png", "1280", "73", "#546484", "" ] } ] } [/block] The JavaScript component allows the developer to define JavaScript-based business logic to determine how the Proxy Endpoint should respond. The following properties are available in a JavaScript component: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "**Conditional Logic**", "1-0": "**Conditional Logic**", "2-0": "**Request Logic**", "0-1": "Select the type of conditional logic check to apply, which determines whether the rest of the workflow is executed. When selecting “If”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to True. Similarly, when selecting “Unless”, the workflow will continue if the JavaScript business logic in the Conditional Logic code window evaluates to False.", "1-1": "Specify the JavaScript logic that evaluates to a True or False that determines whether the workflow should continue to the next step or skip to the end. If there is no conditional logic present then the execution moves onto the next sequential component in the tree.", "2-1": "The default logic entered here will get enabled if the the Conditional Logic is set to False or if there none present." }, "cols": 2, "rows": 3 } [/block] The following diagram illustrates the sequence of steps in a **Logic Component’s** workflow. [block:image] { "images": [ { "image": [ "https://files.readme.io/b41EOP4sR9qSXTtJ1Dvs_user-guide-proxy-endpoints-logic-component-workflow-diagram.png", "user-guide-proxy-endpoints-logic-component-workflow-diagram.png", "255", "332", "#829849", "" ] } ] } [/block]