Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more information on how to orchestrate sequences of tasks, see Overview of Operationalization.


Limitations

  • Custom security certificates cannot be used.
  • HTTP-based requests have a 30-second timeout limit.

Prerequisites


Info

NOTE: It's possible that webhook requests can be submitted back to the platform to execute API tasks within the platform. However, there are security concerns. Additional configuration is required. For more information, see Configure Webhooks.


Requirements for receiving application

...

  1. Open your plan in Plan View. Click a node to create a new task.

  2. In the right panel, select HTTP task.

  3. Set the following parameters:

    ParameterDescription
    NameUser-visible name of the task.
    UrlURL where the webhook message is received by the other application.
    Headers

    Insert HTTP content headers as key-value pairs. For example, if your body is in JSON format, you should include the following header:

    Code Block
    key: Content-Type
    value: application/json


    Info

    NOTE: You may be required to submit an authentication token as the value for the Authorization key.

    Please refer to the documentation for your receiving application about the required headers.

    Body

    (POST, PUT, or PATCH methods only) The body of the request submitted to the receiving application.

    Info

    NOTE: If your request does not require a body, please insert {} here. This is a known issue.


    MethodSelect the HTTP method to use to deliver the message. The appropriate method depends on the receiving application. Most use cases require the POST method.
    Secret key

    (Optional) A secret key can be used to verify the webhook payload. This secret value must be inserted in this location, and it must be included as part of the code used to process the requests in the receiving application. Insert the secret value here as a string without quotes.

    For more information on how this secret key is used to generate a signature, see Verify Webhook Signatures below.

    Validate SSL certificate

    When set to true, HTTPS (SSL) communications are verified to be using a valid certificate before transmission.

    Info

    NOTE: If you must send a request to an endpoint that has an expired/invalid certificate, you must disable SSL verification.


    Retry on failure

    If the returned status code is outside of the 200-299 range, then the webhook is considered to have failed. When this option is enabled, the request is retried.

    When a message is retried, the following header is submitted:

    Code Block
    X-Http-Task-Guid



  4. To test the connection, click Test. A success message is displayed.
  5. To add the task to the flow, click Save.

...


As needed, you can specify task overrides as part of a launching a job via API. For more information, see API Workflow - Run Job.

Prerequisites


Info

NOTE: For this example, the platform must be whitelisted to receive requests from itself. Additional configuration is required. For more information, see Configure Webhooks.

You must acquire the recipe identifier for the next job to execute. 

...

  1. Open the flow containing the next recipe. 
  2. In Flow View, click the recipe whose outputs you wish to generate. 
  3. Review the URL for the recipe object. In the example below, the recipe Id value is 4:

    Code Block
    http://www.example.com:3005/flows/1?recipe=4&tab=recipe


  4. Retain this value for below.

Define the HTTP task

ParameterDescription
Name

This name appears in the

D s webapp
only.

Url

Specify the URL as follows, replacing the example values with your own:

Code Block
http://www.example.com:3005/v4/jobGroups/


Headers

Insert the following two headers:

Code Block
key: Content-Type
value: application/json


Code Block
key: Authorization
value: Bearer <paste your access token here>


Info

NOTE: The token value must be preceded by the string: Bearer.


Body

In the body, insert the recipe Id for the value for wrangledDataset, which is the internal platform term for recipe:

Code Block
{
  "wrangledDataset": {
    "id": 4
  }
}



MethodSelect the POST method.

Verify

  1. Run the plan for which the HTTP task was created.
  2. When the plan successfully completes, open the flow containing the other job to execute. 
  3. When you select the target recipe, a new job should be queued, in-progress, or completed.

...

  1. If needed, create a Slack channel to receive your messages.
  2. Create an app.
  3. Activate incoming HTTP messages for your app. 
  4. Specify the channel to receive your incoming messages.
  5. Copy the URL for the incoming HTTP request from the cURL statement.

Define the HTTP task

ParameterDescription
Name

This name appears in the

D s webapp
only.

MethodSelect the POST method.
UrlPaste the URL that you copied from Slack.
Headers
Copy the content headers from the Slack cURL command:


Code Block
key: Content-Type
value: application/json


Body


Code Block
{"text":"Your job has completed."}



Verify

  1. Click Test to validate that this task will work. 
  2. Run a job:
    1. Check the Slack channel for a message.

...

Tip

Tip: Start by typing $, which provides access to a menu tree of metadata references for each of the metadata reference types. The final syntax is noted above.


Entered valuePlan metadata reference type


Code Block
{{$plan


Metadata information from the plan definition or the current plan run.


Code Block
{{$flow_


Metadata information for the flow tasks executed in the current plan run.


Code Block
{{$flow_7p.['My Output Name'].


Metadata information for the outputs generated by the specific flow task. In this example:

  • flow_7p is a reference to the specific flow task.
  • 'My Output Name' is the display name for the underlying output.

Plan information

The following request body contains references to the Plan name, plan run identifier, and the flow that was just executed:

...