Python SDK

Description

This Task triggers and listens for updates for a workflow running in a piece of third-party infrastructure. Updates are sent via webhook events back to Orchestra. This can be achieved using the Orchestra Python SDK or by explicitly sending HTTP requests to the Orchestra webhook endpoint (see here for more details).

Use Cases

Generally, HTTP Requests are helpful for triggering processes in external systems using Orchestra. Often, these are requests to alerting services or requests to metadata microservices that collate data upon completion of a task.

In Orchestra, we aim to provide this functionality "out-the-box", but we of course understand the need for interoperability and therefore have a HTTP Request option for edge-cases where we cannot support the use-case natively.

This job supports long running workflows by waiting for a webhook event to complete the task. This requires some minimal code changes in your workflow to send the webhook event on completion/failure. The Orchestra Python SDK is available to help wrap the webhook event trigger in your code.

Parameters

These parameters are required to run the Request Task

To send the webhook event to Orchestra to complete the task, you need the Task Run ID. This will be included as a request header orchestra_task_run_id in the HTTP request.

Error handling

API Requests

Orchestra will fail the Task if the response code isn't a 2xx code.

Timeout

We do not expect the process start trigger to "take a long time". Therefore HTTP requests will timeout (and the Task, and Pipeline) will fail if the request takes more than 30 seconds. There is currently no limit on how long we wait for the webhook event to complete the task. You will need to manually cancel the task if the webhook message to succeed or fail the task is not successfully sent.

Last updated