Interact with the Order Lifecycle
Overview
Changing the status of an order is an important part of tillit as it controls the execution of activities. To correctly trigger these activity, the correct endpoint need to be utilised. It is not advised that you change the status of an order via the PUT:/core/order-instance
endpoint Instead the POST:/core/order-manager
endpoint needs to be used. Each order lifecycle state has an endpoint that you need to query to be able to succesfully move orders between.
Ready an Order
This will move an order from the NEW state to the READY state. It will only work while the order has a status of NEW.
Start Order Changeover
This will move an order from the READY state to CHANGEOVER. It will only work while the order has a status of READY and scheduledChangeOverDuration is more than 0.
Start an Order
This will move an order from the READY or CHANGEOVER state to RUNNING. It will only work while the order has a status of READY or CHANGEOVER
Complete an Order
This will move an order from the RUNNING or SUSPENDED state to COMPLETE. It will only work while the order has a status of RUNNING or SUSPENDED.
Suspend an Order
This will move an order from the RUNNING state to SUSPENDED. It will only work while the order has a status of RUNNING.
Resume an Order
This will move an order from the CANCELLED, SUSPENDED or COMPLETED state to RUNNING. It will only work while the order has a status of CANCELLED, SUSPENDED or COMPLETED.
Cancel an Order
This will move an order from the READY or NEW state to CANCELLED. It will only work while the order has a status of READY or NEW.
Last updated