When an activity completes, any updates it has made to data are committed and the database manager releases its locks on the data. The updated data is then available to other activities--including activities which are part of other business applications. These other activities may make decisions based on the state of the data. If you later compensate the completed activity and return the data to its previous state, some activities may have executed based on data which is no longer valid. If these activities are part of the same process as the compensated activity, you can code your application to compensate them too. However, to cope with the possibility that activities in other applications may take decisions based on data that is later changed by compensation, your application must be coded differently.
If your applications include compensation activities which reverse previously-committed data updates, they may need to include logic to provide logical record locking. This "application lock" does not need to be a hard lock preventing access to the data, but simply a flag which indicates that the data is part of an incomplete business process which may be reversed. All activities working with the "in-process" data could be coded to check this flag and then follow appropriate logic. To support this, when you design your database you need to include a "locked" field in your data records.
For example, you might have a "Welcome letter" application which scans the customer database for new customers who have placed their first order, and sends each a welcoming letter thanking them for their order and asking them to complete a customer satisfaction questionnaire. Perhaps your company considers it inappropriate to send such a letter if the order is not yet complete and payment received, because the welcome letter might be received along with less friendly letters demanding payment! Therefore, the Order activity of the Sale business application could set an order-in-progress flag on the order record, which would exclude the order from consideration by a "Welcome letter" process. Later, the Payment activity of the Sale application could unset the order-in-progress flag.