Snaplogic Triggered Task using an OnPremises URL through Load Balanced Groundplex Nodes
This article describes how a triggered task is invoked in the SnapLogic Elastic Integration Platform using an OnPremise URL through load balanced Groundplex nodes. Assume that your organization has a SnapLogic Groundplex provisioned with 3 nodes. When an OnPremise URL is exposed for a triggered task, it will automatically suggest the hostname of one of the nodes that belongs to the Groundplex. e.g., https://GP-Node1:<port>/api/1/rest/feed/<RELATIVE_PATH_TO_TASK>/ To provide redundancy across all nodes in the Groundplex when a triggered task is invoked, a load balancer can be placed in front of the Groundplex nodes. When a load balancer is setup and configured, Snaplogic will use the load balancer in the auto-generated OnPremise URL. e.g., https://GP-LB:<PORT>/api/1/rest/feed/<RELATIVE_PATH_TO_TASK>/ The following diagram describes the flow of network requests made when remotely executing a triggered task using a load balancer OnPremise URL. A remote client invokes the triggered task using the OnPremise URL that points to the load balancer (e.g., GP-LB). The load balancer forwards the request to an active groundplex node. GP-Node1 is selected for the purpose of this example. The groundplex node that receives the triggered task request asks the Control Plane on which node the task should be executed. The Control Plane forwards the request to an active groundplex node. GP-Node2 is selected for the purpose of this example. The triggered task now prepares to be executed on GP-Node2. An HTTPS connection is created between GPNode-1 and GP-Node2 to enable data to be streamed between the nodes. The data is read/write from/to the end points. The response message is sent though GP-Node1 then GP-LB (load balancer) back to the caller.11KViews4likes23CommentsServiceNow - Outbound REST with a Business Rule
Using ServiceNow (SNOW) Outbound REST and Business Rules with SnapLogic. This document defines the steps required to create a Business Rule and REST Endpoint in ServiceNow that will call a SnapLogic pipeline. Business rules allow the user to define conditions that will trigger an Outbound REST Message when an expression or expressions are evaluated. Using the sample pipeline as a template create a pipeline and triggered task (associating your SNOW account with the ServiceNow Query snap). NOTE – 1: this pipeline is setup to accept a POST and is ASYNC – sending back just the RUUID though no additional processing is done against it in SNOW once returned NOTE – 2: A pipeline parameter called ‘Inc_Number’ has been setup and is used in the query snap Copy the Bearer Token and URL for use the newly created task: Next create an Outbound REST Message in ServiceNow. Go to SNOW and type “REST” in the Navigator Search Under ‘Outbound’ click ‘REST Message’ Create a New Message, pointing to the triggered URL + “?” + QueryParams NOTE: You will need to remember the Name (eg. EB – Snaplogi – Send Incident) and variable (ex. ${IncidentNumber}) as both will be used during the script process for the business rule This should create the HTTP Methods for you – I have POST only but you could also use other methods as needed based on the use case. GET would have also worked in this scenario since I’m only passing Query Parameters to the endpoint The Next step is to create a Business Rule which references the created REST (under System Definition) Setup a new business rule select the table / SNOW Object (eg. Incident) Because we are scripting the REST call, you’ll need to select “Advanced” in the top section select desired ‘When to run’ options (eg. before / insert / update / delete) and any filter conditions needed In the Advanced area on the bottom, you’ll need to add in the following script, substituting your specific values from above for the RESTMessageName and VARIABLE_NAME function onBefore(current, previous) { //This function will be automatically called when this rule is processed. var incnum =current.number; var r = new RESTMessage('<RESTMessageName>', 'post'); r.setStringParameter('<VARIABLE_NAME>',incnum); var response = r.execute(); } Done! Test the rule by editing an Incident in ServiceNow and seeing if the pipeline was triggered. Here is a dashboard view of the pipeline execution: And the file created in the middle SNOW Query Path:9.6KViews0likes0CommentsSemantic URL Example
Hi, I would like to know how to correctly pass data via Semantic URL (as a Triggered Task via URL)? Here is what I did: Edit Pipeline Properties: I created an exampleId variable, if I wanted to pass a value of 1 to the exampleId variable: https://elastic.snaplogic.com:443/api/1/rest/path/to/my/project/pipelineName/exampleId/1 What I have working is: https://elastic.snaplogic.com:443/api/1/rest/path/to/my/project/pipelineName/?exampleId=19.2KViews1like18CommentsSettings a HTTP response code for triggered tasks
Hi everyone, we’re offering a triggered task as a sort of simplified API for a more complex REST API (specifically Jira). What we want to achieve is to influence the HTTP return code, status and message we deliver back to the caller of the triggered task based on the return result of the REST API. Here’s a brief description for context: Assuming there’s an error in the Jira Search snap, the error will bubble up to the pipeline execute snap, which in turn triggers the attached error pipe of the template pipe. This will ensure that the error is correctly logged, however, the response to the caller of the triggered task will be 200 in any case. I’m unsure of 2 points: Where is the response formed and delivered back to the caller? At the Error pipe or already somewhere before that? Is there any way to influence what is delivered back to the caller? Ideally we’d like to implement a solution in the template pipeline for e.g. common response codes, but want to refrain from having to implement ‘repsonse code conditionals’ in every integration pipeline. Any suggestions are highly appreciated! Thanks and best regards Thomas8.2KViews0likes7CommentsJIRA event capture in real time via WebHooks and triggering Snaplogic pipelines
Jira event capture in real time via WebHook and trigger Snaplogic pipeline How to Trigger Snaplogic Pipeline after an event in Jira This document shows how to setup a Jira instance to trigger a Snaplogic Pipeline (REST API) after an event in Jira and send the event information to Snaplogic pipeline. The events can be one of the following: • Issue related events • Project related events • User related events • JIRA configuration related events • JIRA Software related events Integration Scenario: Update ServiceNow ticket when an Issue is updated in Jira Steps involved in this integration are: • Create a SnapLogic pipeline and publish it as a triggered task • Create a WebHook in Jira to trigger a SnapLogic pipeline after an issue is updated in Jira Step1: Create a Snaplogic pipeline and publish it as a triggered task The diagram below is a screen shot of SnapLogic pipeline that consumes the json document sent by Jira after an event (Example: Issue update, like add comments) happens in Jira and updates corresponding ServiceNow ticket. The Binary Router Snap receives the incoming json from Jira and sends the output to two flows. In the first flow, the incoming json document in binary format is parsed and converted to document format, mapper is used to map Jira issue information to appropriate fields in Service Now and “ServiceNow Update Snap” is used to update ServiceNow ticket. In the second flow, the json received from Jira is written to an audit file. A section of the json document received is below. { “timestamp”: 1483558289780, “webhookEvent”: “comment_created”, “comment”: { “self”: “https://snaplogic.atlassian.net/rest/api/2/issue/25701/comment/21801”, “id”: “21801”, “author”: { “self”: “https://snaplogic.atlassian.net/rest/api/2/user?username=admin”, “name”: “admin”, “key”: “admin”, “created”: “2017-01-04T11:31:29.780-0800”, “updated”: “2017-01-04T11:31:29.780-0800” } } The following is a triggered task REST API created by Snaplogic for the integration scenario and we will use this to configure WebHook in Jira. https://elastic.snaplogic.com:443/api/1/rest/slsched/feed/ConnectFasterInc/Shankar%20Sanikop/ServiceNow%20Jira/Jira%20Outbound%20Trigger%20Task? Step2: Create a WebHook in Jira to trigger a Snaplogic pipeline after an issue is updated in Jira In Jira go to Applications. You will see WebHooks in Advanced Configuration Create a new WebHook to call the Snaplogic Triggered task In the URL configuration: Put the Snaplogic Triggered task, including the authorization information (bearer_token) https://elastic.snaplogic.com:443/api/1/rest/slsched/feed/ConnectFasterInc/Shankar%20Sanikop/ServiceNow%20Jira/Jira%20Outbound%20Trigger%20Task?bearer_token=FrcE0Whf6r2NjHx Configure the event related information, in this integration we are capturing the issue related events. The diagram below shows the available events of an issue that can be captured and also you can write a JQL query send events only that match certain conditions. strong text4.6KViews0likes1CommentHow to capture the Trigger task API headers
Hi, I want to capture all the headers passed to a Triggered task. Generally they are hidden in the Pipeline Parameters in a triggered execution. Based on a header ‘User-Agent’ we have to take an action. Could someone please help with info on this?4.3KViews0likes4CommentsTriggered task - don't wait for API response
I have a pipeline that is acting as a “driver” pipeline to kick off other pipelines. I would like to kick off the children pipelines using a triggered task and a REST API call in the parent pipeline. I can get this to work, but I’m noticing that the REST API snap in the parent pipeline is waiting for the child pipeline to finish before moving on. I don’t want want it to wait. I just want it to make the REST API call and move on. How can I accomplish this?4.2KViews1like3CommentsSecuring exposed API endpoint for triggered task
It is my understanding that when we create a Triggered Task for a pipeline there are only two ways of securing the API endpoint, 1) the bearer token and 2) basic authentication in the endpoint URL as a parameter. I know others that use SnapLogic that have had their triggered tasks hacked (via figuring out the bearer token) and pipelines have been kicked off by people that weren’t authorized. My question is this: how can we add additional security to the Triggered Task API endpoint?Solved