Skip to content

Add retry mechanism for order base extension via newBaseRequest field #44

Description

@HyundukChoi-Riibotics

Is your feature request related to a problem? Please describe.
According to the VDA-5050 specification, AGVs can request base extensions through the newBaseRequest field in state topics. Currently, the vda-5050-lib.js only detects these requests through the onEdgeTraversing callback. This creates a potential issue where if an AGV continuously sends newBaseRequest: true until receiving a successful order extension, we might miss some of these requests since they're only captured when field values change during edge traversal events.

Describe the solution you'd like
Add a new onStateUpdate callback that provides real-time state updates for active orders. This would allow applications to monitor the newBaseRequest field and other state changes continuously, rather than only during edge traversal events.

Describe alternatives you've considered

  1. Modifying the existing onEdgeTraversing callback to include additional state checks
  2. Creating a separate dedicated callback just for newBaseRequest changes

Additional context
The proposed solution adds a more general-purpose state monitoring capability through the new callback. While state topics can be directly subscribed to get state information, this callback provides additional benefits:

  1. Access to both state and active order context (context.order) in a single callback
  2. Enables real-time monitoring of state changes while maintaining reference to the current order
  3. Allows implementation of various business logic that requires both state and order information

This approach not only solves the immediate newBaseRequest monitoring need but also creates a more robust framework for implementing order-aware state monitoring features.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions