The transactions configured in the pipeline changes the status of the order line after successful execution. A transaction is either complete or incomplete for an order line, based on the status change.
All the transactions need not understand the completion. This is based on the configuration. The completion is recorded only if that transaction can be configured for completion. Once the transaction is enabled for completion, it is evaluated to be marked as completed or incomplete whenever any status change happens to the order line. In some cases, a completed transaction can be marked as incomplete since its status could be demoted.
There are two ways to mark a transaction as complete or incomplete. One way provides a single status and whenever the order line goes past, this status transaction is marked as complete. The other way to mark a transaction as complete is by providing a list of statuses. If the order line is in any of those statuses, the transaction is marked as complete. To avoid configuring a list of statuses, it is better to configure statuses in an ascending order as the order's life cycle progresses.
For example, if transaction X needs to be completed before transaction Y, then transaction X should drop in status which is less than the status transaction Y drops in to.
The order fulfillment pipeline has transactions pre-configured for completion. You cannot modify the completion criteria for system transactions. However, you can configure the completion for custom or derived transactions. You can also configure completion for derived listeners, but it has to be done for every instance of the listener.
An event is triggered when a transaction is completed and it is determined that the order is ready to process the dependent transaction. This event also allows the custom transactions to know that the order is ready for processing.
There can be multiple transactions that become ready due to one transaction completion. The event is raised for each transaction on the order line that were waiting for the completion of this order line.