Processing Future-Dated Orders in the Orchestrator

The orchestrator enables the submission of future-dated orders by specifying the execution time in the requiredByDate field. Plans generated by AOPD have a time dependency on the eligible plan items. These plan items remain in the pending state until all of their dependencies, including time dependencies, are completed.

Every order, including those scheduled for the future, is processed only by its owner instance. On receiving a future-dated order, Orchestrator:

  • Logs it in the time_scheduler table with a timestamp and the owner instance's ID.

  • The TimeDependencyScheduler then checks for time dependencies associated with the owner instance, filtering by the instance ID.

  • If relevant dependencies are found, they are marked as completed.

During gateway mode, the instance ID is null in both the order and time_scheduler tables. The Broker's Time Dependency Monitor is responsible for assigning the owner to the order and its time dependencies.