No Empty Order Example

In the No Empty Order example, the requirement is to have no empty orders. It only makes business sense to place an order that has line items. This requirement is implemented using the following logic.
lac42
In the No Empty Order example, the requirement is to have no empty orders. It only makes business sense to place an order that has line items. This requirement is implemented using the following logic.
This example illustrates the following concepts:
  • Counts for existence checks.
     The 
    itemCount
     indicates whether the order has any items.
  • Commit time logic. 
     
    CA Live API Creator
     executes the commit validation rule after item logic has adjusted the 
    itemCount
    .
  • Constraint-derived result.
     Regular validations have the effect that all orders are rejected. Because 
    CA Live API Creator
     checks commit validation rules after it has executed the logic for all the rows in the transaction, the 
    itemCount
     reflects the 
    Lineitems
     (if any). The logic operates as intended.
For more information: