Reputation: 2842
Is there a standard way to have a transaction listen for events or other transactions and when fulfilled conditions occur (ie: a specific event happens), to run the transaction code.
Ie: Sell house only when money is received, receiving money is a different transaction.
Or does one simply Poll, set an alarm with an external service that is listening on the channel for events? Is there a standard approach here?
Upvotes: 0
Views: 77
Reputation: 6740
if a transaction updates a PropertyListing
asset (using its ID) to PAYMENT_RECEIVED
(eg. the seller's solicitor has received the monies for the property transaction held in escrow etc so, as a party submits the transaction to indicate so), then the house asset can automatically be updated to 'SOLD' and post an event that your Client App listens for.
Your client application can then initiate the next step in the process, eg the agreement to transfer the title etc (however that is done in your use case, may be another transaction to show 'acceptance' manual or automatic as you wish). I say 'client app' because I assume there is a level of user interaction to sign it off as a means of agreement
See more on events here and subscribing to events here
Upvotes: 1