receive

open override fun receive(order: SupplyChainModel.Order)(source)

Receive order, routing each of its demands to a per-demand filler. Steps (matching Java's OrderFillerAbstract.receive):

  1. If unavailable, reject the order with OrderStatusCode.FillerUnavailable.

  2. Assign a DemandFillerIfc to each demand via demandFillerFinder; throw NoDemandFillerFoundException if any demand has no eligible filler.

  3. Compute the order's status via determineOrderStatus; if any demand will be rejected, reject the order.

  4. Otherwise, ask the order to begin batched receipt.