Order Lifecycle
Understanding how orders progress from creation to completion.
Lifecycle Overviewโ
An order goes through several states during its lifetime:
PENDING โ IN_PROGRESS โ DELIVERED โ COMPLETED
โ
CANCELLED
Order Statesโ
PENDINGโ
Description: Order created, waiting for deliveries
Characteristics:
- No items delivered yet
- Escrow balance held (if charge-on-creation enabled)
- Visible to all players
- Can be cancelled (if allowed)
Transitions:
- โ
IN_PROGRESSwhen first delivery occurs - โ
CANCELLEDif cancelled - โ Expired if time limit reached
IN_PROGRESSโ
Description: Order has partial deliveries
Characteristics:
- Some items delivered
- Partial payment made to deliverers
- Remaining items still needed
- Can receive more deliveries
Transitions:
- โ
DELIVEREDwhen all items delivered - โ
CANCELLEDif cancelled (may be restricted) - โ Expired if time limit reached
DELIVEREDโ
Description: All items delivered, waiting for collection
Characteristics:
- All items delivered
- Deliverers paid
- Items available for collection
- Order creator can collect items
Transitions:
- โ
COMPLETEDwhen all items collected - โ Auto-deleted when fully collected and paid
COMPLETEDโ
Description: Order fully fulfilled and collected
Characteristics:
- All items collected
- All payments processed
- Order ready for deletion
- Auto-deleted to save storage
Transitions:
- โ Deleted (automatic cleanup)
CANCELLEDโ
Description: Order cancelled by creator or admin
Characteristics:
- Order no longer active
- Escrow refunded (if enabled)
- No new deliveries allowed
- May be kept for record-keeping
Transitions:
- โ Deleted (optional, configurable)
Lifecycle Diagramโ
State Transitionsโ
Creation โ PENDINGโ
When an order is created:
- Order created with
PENDINGstatus - Payment deducted (if charge-on-creation enabled)
- Escrow balance set
- Order visible to all players
PENDING โ IN_PROGRESSโ
When first delivery occurs:
- First items delivered
- Status changes to
IN_PROGRESS - Partial payment to deliverer
- Remaining items still needed
IN_PROGRESS โ DELIVEREDโ
When all items delivered:
- Last items delivered
- Status changes to
DELIVERED - All deliverers paid
- Items available for collection
DELIVERED โ COMPLETEDโ
When all items collected:
- Order creator collects items
- Status changes to
COMPLETED - Order auto-deleted
- Lifecycle complete
Any State โ CANCELLEDโ
When order is cancelled:
- Status changes to
CANCELLED - Escrow refunded (if enabled)
- No new deliveries allowed
- Order removed from active list
Expirationโ
Orders can expire if order-life is configured:
- Expiration Check: Periodic check for expired orders
- Auto-Refund: Escrow refunded if enabled
- Status Update: Order marked appropriately
- Cleanup: Expired orders with no uncollected items are deleted
Concurrent Operationsโ
The plugin handles concurrent operations safely:
- Multiple Deliveries: Multiple players can deliver simultaneously
- Optimistic Locking: Prevents over-delivery
- Transaction Safety: Database transactions ensure consistency
Best Practicesโ
- Monitor Order Status: Use
/orders myordersto track your orders - Collect Promptly: Collect items soon after delivery
- Cancel Early: Cancel orders before deliveries if needed
- Check Expiration: Be aware of order expiration times
Related Documentationโ
- Escrow System - Payment handling
- Delivery System - How deliveries work
- Collection System - How collection works