OrderFillerAbstract

abstract class OrderFillerAbstract @JvmOverloads constructor(parent: ModelElement, initialAvailability: Boolean = true, name: String? = null) : ModelElement, OrderFillerIfc(source)

Base class for objects that implement OrderFillerIfc. Provides the order-receipt orchestration (availability gating → per-demand filler assignment → status determination → batched receipt) and leaves fill / canFillItemType / negotiate to subclasses.

Parameters

parent

the SupplyChainModel this filler belongs to

initialAvailability

availability at the start of each replication

name

optional model-element name

See sc.inventorylayer.OrderFillerAbstract

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ModelElement, initialAvailability: Boolean = true, name: String? = null)

Properties

Link copied to clipboard

Used to look up a per-demand filler for each demand on an order.

Link copied to clipboard

Availability at the start of each replication.

Link copied to clipboard
override val isAvailable: Boolean

True when this object can currently be selected for use.

Functions

Link copied to clipboard

Tell order to begin batched processing. Subclasses may override to resequence demands before processing.

Link copied to clipboard

Tell order to begin batched receipt. Subclasses may override to resequence demands before receipt.

Link copied to clipboard

True iff every demand on order can have its item type filled by this filler. Diverges from the Java original, which returned only the last demand's result (preserved here as a clean all { ... }).

Link copied to clipboard

Walks each demand, setting its status via its assigned filler and collecting whether any will reject. Returns true iff at least one demand will be rejected.

Link copied to clipboard
protected open override fun initialize()

This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called

Link copied to clipboard

Place order in process state.

Link copied to clipboard
open override fun receive(order: SupplyChainModel.Order)

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

Link copied to clipboard
protected fun rejectOrder(order: SupplyChainModel.Order, status: OrderStatusCode)

Place order in rejected state with the given status code.

Link copied to clipboard
protected fun setAvailability(flag: Boolean)
Link copied to clipboard

Assign a DemandFillerIfc to each demand on order via demandFillerFinder. Throws NoDemandFillerFoundException if no filler is found for any demand.