Reporting a new accident

Now that the demo assets are set up and we have verified that at least one of the assets is stored in the chaincode state database, we can execute the first functional operation. Let's imagine that an accident just happened and that the vehicle with the registration number JN6ND01S3GX194659 automatically reports the accident by calling the REST proxy of the lease company to which the car belongs, for example, AutoLease. The HTTP request calls the {{AutoLeaseProxyHost}}/bcsgw/rest/v1/transaction/invocation endpoint and invokes the reportAccident transaction/function.

The function expects a minimum of two arguments, namely the longitude and latitude, but it can also receive the date and time when the accident occurred ...

Get Blockchain across Oracle now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.