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):
- 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.
- actions-library validates the request and resolves the barcode to a tenant+store+ESL tuple.
- Writes a
taskdefinition.v1record to DtoFlow, which triggers actions-executor. - 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:
- Read the
storeesl.v1for the target barcode to resolve the physical hardware (barcode, ESL type). - Determine the appropriate LED command for the ESL type from the task definition fields.
- 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.
- On
storeesl.v1change events, check if there are pendingtaskdefinitionrecords for the affected ESL and replay any that should still be active.
Related services¶
- actions-executor — sibling service; consumes
taskdefinition.v1and delivers the LED/flash command to Pricer Server hardware - pricer-server — terminal hardware destination; shares the tenant/store-routing patterns used here
- storeesl —
storeesl.v1is read by actions-executor to resolve the physical hardware for each task