Skip to content

Use Cosmos Bot Read Model in Order Service Candidate Selection #90

@DakotaCondos

Description

@DakotaCondos

As the Order Service API,
I want to use the Cosmos DB bot read model to select candidate bots for new orders,
so that orders can be routed to bots that appear available and stocked without depending directly on the simulator runtime for normal candidate reads.

Acceptance Criteria

  • Given a customer submits an order
    When the Order Service API evaluates candidate bots
    Then it reads bot availability, location, and inventory from the Cosmos DB bots container.

  • Given multiple bots can fulfill the order
    When the Order Service API selects a target bot
    Then it chooses a bot based on defined selection rules such as availability, stock, distance, or priority.

  • Given the Order Service API selects a target bot
    When it creates the order assignment
    Then it publishes the assignment to the robot-input Event Hub.

  • Given the readable bot state may be slightly behind the simulator
    When the simulator receives the order assignment
    Then the simulator performs final stock and availability validation before accepting the order.

  • Given the simulator accepts, queues, or rejects the order
    When the response event is published
    Then downstream processing updates the readable bot representation as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for User Story.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions