You can use an event sequencing qualifier to ensure that invocations to operations at run time will be processed in a predetermined sequence.
If you store customer data in a database, you might need to ensure that any updates to the customer data are processed in the order that they are received. If events are processed in parallel, the first update might be delayed and might overwrite a more recent update. You can establish a qualifier for such events to ensure that an update cannot be processed if there is already a request to update that customer record.
Event sequencing requires events to acquire a lock before they are dispatched to the target component to execute business logic. When the execution of the business logic completes, the event releases the lock.
You can establish a sequence for events related to a particular operation by following these steps: