How to automatically disable and enable Ultra task through api's
Hello, We have a requirement to automatically recycle ultra task threads on every day at a certain time. Are there any api’s to disable and enable ultra task ? or any alternative to recycle threads when ultra task is hung. Thank you in advance. Harish3.3KViews0likes3CommentsHow to find incoming data format(json,xml) dynamically in pipeline input view?
How to find incoming data format dynamically? Say for example, If the incoming data is JSON then I need to perform certain validation and flow for JSON If the incoming data is xml then I to perform certain operations. Can any one suggest How to find incoming data format during the run-time. by using single input view for the pipeline?7.3KViews0likes6CommentsUltra endpoints - Response is not returned to the caller
Hello, We started to experience very strange behavior with ultra tasks. Ultra tasks are up and running, but some of the endpoints are not returning the response back, even in dashboard we can see that the requests are processes successfully. Any thoughts why this could be the case? Thanks, Pero M.960Views0likes0CommentsInvocation of Ultra task fails
Hello Team, I have created a test pipeline, where using Rest post I am invoking an Ultra pipeline. The ultra pipeline is simple, it expects the $test input and sends the result back. This is only for test purpose. Here is the input that I provide to the Rest post snap: [ { “url”: “https://URL/api/1/rest/feed-master/queue/Reece-Dev/-Project/Test/Test%20Task%20Ultra”, “token”: “xyz”, “test”: “1” } ] Here is a test pipeline : The Rest post gives an error: I fail to understand why does the ultra pipeline throw an error when I am passing $test object to it. Here is the snap of Ultra task : Can someone help here please?Solved2.3KViews0likes2CommentsI wanted to create multiple arrays from a single array based on specific Field
I have the below input: “AT_Pricehash”: [ { "@TermsListID": "Test1", "ORGID":"1000", "@MinimumQuantity": 1 }, { "@TermsListID": "Test2", "ORGID":"1001", "@MinimumQuantity": 1 }, { "@TermsListID": "Test3", "ORGID":"1000", "@MinimumQuantity": "1" } ] I wanted to generate two arrays based on the ORGID, expected output as below: "1000Array" : [ { "@TermsListID": "Test1", "ORGID":"1000", "@MinimumQuantity": 1 }, { "@TermsListID": "Test3", "ORGID":"1000", "@MinimumQuantity": "1" } ] "1001Array"[ { "@TermsListID": "Test2", "ORGID":"1001", "@MinimumQuantity": 1 } ] Since this requirement is part of the ultra pipeline, I cannot use the straightforaward way i.e. by using the Split, sort, and then perform the GroupBy Field snap to generate arrays based on ORGID. We can use the child pipeline but I would like to see if we can get this done in the same pipeline directly. Is there any way to achieve this such as a direct expression or expression library, etc? Any help would be appreacited.Solved3.1KViews0likes2CommentsTail Snap and Ultra Pipelines
I’ve written a pipeline which is setup for Ultra. I’ve been advised to use non-ultra snaps, to place them in pipelines that the ultra is going to execute using the Pipeline execute. The problem is with Tail it seems. When executing in our dev environment, I was getting the expected results. However in Ultra it looks to be different. Example issue 50 records copied to do two different tasks First copy is to do a DB read for each record – Input shows 50 incoming docs, output though is only 1 The second copy is to a Tail with only one (last one) as the output - works as expected 50 docs in and 1 out. It seems as if the Tail that is being processed is affecting the data output of the DB query, where it’s also limited the output to just a single record. This doesn’t seem to happen during an execute or triggerred task. Wondering if the Ultra is the one causing this.2.1KViews0likes0CommentsCreating APIs with SnapLogic Pipelines and Ultra Tasks
Overview API (Application Program Interface) is an old concept repurposed to mean a modern web service based on the REST protocol and increasingly using the JSON data format. These modern APIs have become the franca lingua of the digital economy, by facilitating lightweight, performant communication between applications across an enterprise or across the internet. Typically RESTful APIs perform operations on “resources” (Customers, Orders, People, etc). By convention, the type of operation is identified using the most common HTTP verbs such as POST (create), GET (read), PUT (update), DELETE SnapLogic provides Ultra Tasks as the means by which a Pipeline can be exposed as a secure, high-availability, low-latency, sub-second request/response API. For example, the following is a Pipeline that embodies a Customer API exposed using an Ultra Task: Once the Ultra Task is enabled, the associated Pipeline stays resident in memory on the Snaplex node(s) it was configured to execute on. The number or Instances can be configured to accomodate the expected concurrent API request volume. The API can then be called securely from an external application (Postman REST client in this case): This is an example of an API GET (read) request for a specific Customer identified by the ID “1001” Designing the Pipeline Ultra Tasks deliver the components of the HTTP request message to its associated Pipeline as fields in the JSON document: content: The request body for POST or PUT requests headers: For example, the ‘User-Agent’ HTTP header can be referenced in the input document as $[‘user-agent’] uri: The original URI of the request. method: The HTTP request method. query: The parsed version of the query string. The value of this field will be an object whose fields correspond to query string parameters and a list of all the values for that parameter. For example, the following query string: foo=bar&foo=baz&one=1 Will result in a query object that looks like: { "foo" : ["bar", "baz"], "one": ["1"] } task_name: The name of the Ultra task. path_info: The part of the path after the Ultra task URL. server_ip: The IP address of the feed-master that received the request. server_port: The TCP port of the feed-master that received the request. client_ip: The IP address of the client that sent the request. client_port: The TCP port of the client that sent the request. In the above Customer API example: A Mapper Snap is used to parse the ID from the portion of the URL after the base path provided by the Ultra Task (demo-fm.snaplogic.io/api/1/rest/feed-master/queue/MyOrg/MyProjectSpace/API/Customers)… In this case “/1001”: A Router Snap is used to conditionally direct execution to the appropriate subflows designed in accordance with the RESTful CRUD operations described above: Additional Reference https://en.wikipedia.org/wiki/Representational_state_transfer http://doc.snaplogic.com/ultra-tasks13KViews1like5CommentsUltra task with Salesforce Read snap: merge output into single document
I have a question similar to the one asked here Merge documents into one big document Specifically, I have a pipeline with a Salesforce Read Snap which returns 0 or more documents as the result. I’d like the output of the Read Snap to contain a single document containing an array with results returned by the Read Snap. Based on my reading of the forum posting: I cannot use the Group By N snap as it isn’t supported in Ultra tasks It is possible to use the script snap in an Ultra snap to do this. I’ve attached a pipeline that can do this: SFReadUltraPipeline.slp (13.6 KB) The pipeline returns the following output from a triggered (non-ultra task): [ { "theOriginal": { "Id": "0036A00000Vatj6QAB", "FirstName": "Andrew", "LastName": "Ramirez", "hed__AlternateEmail__c": "aramirez@destinsolutions.com", "original": { "FirstName": "Andrew", "Email": "aramirez@destinysolutions.com" } }, "duplicates": [ { "Id": "0036A00000AbbdpQAB", "FirstName": "Andrew", "LastName": "Ramirez", "hed__AlternateEmail__c": "aramirez@destinysolutions.com", "original": { "FirstName": "Andrew", "Email": "aramirez@destinysolutions.com" } }, { "Id": "0036A00000AbbeOQAR", "FirstName": "Andrew", "LastName": "Mayzak", "hed__AlternateEmail__c": "4541474710648498@destinysolutions.com", "original": { "FirstName": "Andrew", "Email": "aramirez@destinysolutions.com" } }, { "Id": "0036A00000Vatj6QAB", "FirstName": "Andrew", "LastName": "Ramirez", "hed__AlternateEmail__c": "aramirez@destinsolutions.com", "original": { "FirstName": "Andrew", "Email": "aramirez@destinysolutions.com" } } ] } ] with the dashboard view demonstrating that documents are merged correctly: A request sent to an ultra task based on the pipeline times out, with the dashboard indicating the script snap never returns: I suspect that the issue is that document lineage is not being maintained by the script snap. However, I don’t know how to maintain document lineage and also get the snap to output a single document with an array containing the results of the Salesforce Read Snap. Can someone tell me how to alter this pipeline to make it ultra compatible while still returning a single output document containing the results of the Salesforce Read snap?3.5KViews0likes2CommentsHow to remove a response header from a ultra task
Hi I think we have plenty of articles that show how to add a custom header into the response header of an ultra task. But, how to remove a header from the response? Maybe more specific, currently for Ultra task, there’s a ‘Server’ header in the response. How to remove it? ThanksSolved3.1KViews0likes2Comments