工位缓冲区
AI-generatedSummary
Manage a manufacturing work-in-progress buffer using either occupancy-based distribution or a FIFO queue maintained in workflow static data.
Inputs
- bufferMode (required) — Selects between 'occupancyField' mode to route items based on occupancy number compared to max capacity, or 'fifoWorkflowQueue' mode to enqueue or dequeue items in a FIFO queue stored in static data across executions.
- fifoAction — When in FIFO mode, choose to 'enqueue' (add items to the queue tail) or 'dequeue' (remove items from the queue head).
- bufferId (required) — Identifier for the buffer instance, used to distinguish multiple buffer queues; added to each item's mopBuffer.bufferId property.
- maxCapacity (required) — Maximum capacity of the buffer: In occupancy mode, compares item occupancy to this maximum; in FIFO mode, limits the queue size (0 disables enqueueing).
- onFull (required) — Behavior when the buffer is full: either route items to the second output labeled '已满' for further handling, or throw an error to stop execution.
- occupancyField — Path to read the occupancy number from each item's JSON (dot notation supported), used only in occupancy mode.
- defaultOccupancy — Fallback occupancy number when the occupancyField is missing or invalid, used only in occupancy mode.
Output shape
Two outputs: first for items that can enter the buffer ('可入区'), second for items blocked due to full buffer ('已满').
In occupancy mode, items are routed based on their occupancy value relative to maxCapacity. In FIFO mode, enqueue action adds items to a persistent queue, dequeue removes in FIFO order; output routing reflects success or full/empty conditions. Errors optionally thrown on full buffer depending on configuration.
Examples
Example 1: Occupancy mode with maxCapacity 5; items with occupancy less than 5 pass through first output, others to second output.
bufferMode='occupancyField', maxCapacity=5, occupancyField='bufferOccupancy', onFull='routeToOutput2'.
Example 2: FIFO queue mode enqueuing with maxCapacity 3; items added to persistent queue until full, then routed to second output or error thrown.
bufferMode='fifoWorkflowQueue', fifoAction='enqueue', maxCapacity=3, onFull='routeToOutput2'.
Example 3: FIFO queue mode dequeuing; items trigger removal from queue head; if queue empty, items route to second output.
bufferMode='fifoWorkflowQueue', fifoAction='dequeue', maxCapacity=any, onFull='routeToOutput2'.