Skip to content

actions-library

Cloud Run / CQS queue name: actions-library Legacy name: platform-plaza-actions-task Tech stack: Quarkus (Java), Gradle

actions-library manages the library of flash/LED task definitions used to visually signal events on Electronic Shelf Labels. When a business event occurs — a price change, a promotion, a stock alert — a task definition is written to taskdefinition.v1 describing what the ESL should do (flash an LED color, run a pattern for a defined duration). The sibling service actions-executor subscribes to taskdefinition.v1 and storeesl.v1 and carries out the actual hardware instruction.

DTO Ownership

DTO Version Why
taskdefinition v1 Describes a flash/LED action to perform on a specific ESL; keyed t/{tenantId}/s/{storeId}/e/{barcode}/taskdefinition; fields include LED color (RGB), flash pattern, duration, and priority; written when a business event requires visual ESL notification

CQS Subscriptions

actions-library does not subscribe to DtoFlow DTOs. It is the producer that writes taskdefinition.v1 records in response to external triggers (API calls, business rules, webhooks). The consuming side is handled by actions-executor.

Processing Logic

actions-library (task definition management):

  1. External systems or platform rules POST a task request to actions-library's API, specifying the ESL barcode(s), the desired action type (LED flash, pattern, duration), and an optional priority.
  2. actions-library validates the request and resolves the barcode to a tenant+store+ESL tuple.
  3. Writes a taskdefinition.v1 record to DtoFlow, which triggers actions-executor.
  4. Task definitions have a TTL: once the duration expires or the task is acknowledged, the record is deleted or marked complete.

actions-executor (sibling service — task execution):

actions-executor subscribes to taskdefinition.v1 and storeesl.v1. When a new task definition appears:

  1. Read the storeesl.v1 for the target barcode to resolve the physical hardware (barcode, ESL type).
  2. Determine the appropriate LED command for the ESL type from the task definition fields.
  3. Route the LED/flash command to the Pricer Server REST API for the tenant's store, using tenant-routing and bearer-token mechanisms shared across the platform.
  4. On storeesl.v1 change events, check if there are pending taskdefinition records for the affected ESL and replay any that should still be active.
  • actions-executor — sibling service; consumes taskdefinition.v1 and delivers the LED/flash command to Pricer Server hardware
  • pricer-server — terminal hardware destination; shares the tenant/store-routing patterns used here
  • storeeslstoreesl.v1 is read by actions-executor to resolve the physical hardware for each task