A simple test application using Hyperledger composer.
Acme airlines have been having troubles with their scheduling system, a lot of people has lost flights because of the databases of different airports not being in sync. Acme hired us to build a blockchain application so that they can have a more robust application and real time data across all the airports.
We define an assets as an object that represents value to the organization and that it can be digitally represented.
What are the assets of Acme Airlines:
- ownershipType
- number of seats
- flightNumber
- origin
- destination
- scheduledTime
A transaction is any change to an assets status, including the creation and removal of assets. Transactions are defined in the model (.cto
files) and the logic is defined in the lib/logic.js
file. Logic is associated using anotations, example:
/**
* @param {org.acme.airlines.flight.CreateFlight} flightData
* @transaction
*/
function CreateFlight(flightData) {...}
What transactions Acme Airlines wants to handle?:
Acme Airlines want to be able to create new flights, as well they want all the airports operators to know when new flights are created, this is achievable using Èvents
.