Executor Service

The Executor Service offers a robust and integrated solution for automating tasks and managing workflows across the platform’s core services.

It consists of two main properties:

  1. trigger: defines when the execution should happen.

  2. operation: defines what action should be performed.

Trigger

The Trigger property defines the conditions under which the Executor service initiates an action. It specifies the event type and condition that must be met for the action to be triggered.

You can configure the following three types of triggers to execute the user defined tasks.

  1. Event-based trigger

  2. Incoming webhook trigger

  3. Schedule-based trigger

Operation

The operation property defines the action to be executed when the Trigger condition is met. You can describe the specific task or operation to be performed, such as querying Tailor DB, sending notifications, or triggering workflows. There are four types of targets:

  1. TailorGraphql

This involves interaction with the Tailor DB and performs operations such as querying data or making changes (mutations).

  1. Webhook

With this type of operation, you can send a HTTP request from your executor service. Currently we only support POST method.

  1. Function

This operation type executes JavaScript/TypeScript code synchronously via the Function Service. Functions return results directly and are ideal for custom business logic, data transformations, and API integrations.

  1. Job Function

This operation type executes JavaScript/TypeScript code asynchronously via the Function Service. Job functions are typically used for asynchronous task processing, long-running operations, and background processing.

Each Trigger can be configured with the above four target types, providing twelve ways to configure them.

Timeouts

Both operations TailorGraphql and Webhook have a timeout set to 60 seconds. If the process exceeds this limit, it is considered a failure, and a retry will be triggered (up to a maximum of 10 attempts).

You can view the number of attempts for each job created for an executor in the Tailor Console.

For more details on the number of attempts, refer to the Verify the trigger section of the event-based trigger tutorial.

Additionally, executor operations are subject to a recursive call depth limit of 10 levels when triggering other platform services. See Platform Limits for more details.