My name is Erum and I am still in learning phase of DAML. I have started an Airline Model example from DAML Repository
My questions are:
Is there any complete description of DAML code for Airline model as I want to understand the complete process to map it into UML Class diagram. I have gone through the readme file but it contains very little information to understand the complete model. I am trying to find an approach to communicate DAML code into business user so they can understand easily.
In the following What is the seatClasses: TextMapClass attributes describes? and same for allocation: Text,Map Text. If you can explain me what are these attributes used for here?
template Flight
with
seatClasses : TextMap Class
allocation : TextMap Text
flightNumber : Text
airline : Party
invitedPassengers : [Party]
passengers : [Party]
where
signatory airline, passengers
observer invitedPassengers
Hi @Zerum and welcome to the Daml developer forum!
As far as I know there’s no more documentation around the Airline model than what’s in the GitHub repo. If you’re new to Daml I would recommend starting with @SteveSeow’s Daml 101 video series that will make reading the model easier.
Regarding your 2nd question: TextMap creates an associative array.
If you search for the seatClass argument of the template in the file you’ll find the following definition
Thank you for your reply. Very helpful for me. I am trying to find an approach to communicate DAML code into business user so they can understand easily. I am trying to map to code in UML Class Diagram. If I face problem later, I will come back to this forum again
I don’t personally think there is a good substitute for actually reading the code, and Daml has been designed to be relatively business-friendly in both syntax and semantics.
@Zerum
When asking a new question, please always start a new thread.
To answer your question, this is an infix notation for the assetEq function, which checks if the values of two expressions are equal and fails with a message if they are not. Here’s the link to the documentation.