Skip to main content

Overview

An overview of the concept and purpose of LOC triggers.

What is a Trigger?

Triggers are mechanisms to start an execution with one or more linked data processes as tasks running simultaneously.

Trigger Broker

The triggers do not execute tasks directly. Instead, they broadcast messages to the LOC trigger broker, which will in turn inform the LOC runtime to initialise the executions.

Triggers do not have revisions. The same data process can be linked to multiple triggers with any type.

Trigger Types

See: API Route and Schedule

LOC currently provides the following triggers:

Trigger TypeDescriptionInvoke ModeCan Has Payload
API RouteHTTP requestsSync/AsyncYes
Message QueueMQ messagesAsyncYes
ScheduleScheduled jobAsyncNo

Trigger Response

See: Execution and Task

For some trigger types in specific modes, the invoker - for example, the HTTP client that invoked an API route - will receive a response containing execution and task results.

The following setup will return a response to the trigger:

  • API Route (synchronous only)
  • Message Queue (asynchronous)

For all trigger types and modes, the results will be available as execution results.

Load Trigger Metadata and Payload

The trigger metadata and payload can be loaded from a logic's data context object.

See the SDK docs for details.