{"id":"bKY3i0Zc7zE","title":"Lesson 3: Daml Workflow Analysis","description":"For a better learning experience, sign up and enroll in this free course at: https://daml.talentlms.com/plus/catalog/courses/152","channel_name":"Digital Asset Training","published_at":"2025-02-20T00:00:00.000Z","thumbnail_url":"https://i.ytimg.com/vi/bKY3i0Zc7zE/hqdefault.jpg","transcript_text":"in previous lessons we have looked at distributed business workflows and how daml approaches the concepts of decisions actors Authority consequences and visibility in this lesson we will apply these Concepts to an example workflow to demonstrate how they can form the basis for daml workflow analysis we have seen how a workflow consists of people or systems under their control and direction making a series of decisions and the consequences of those decisions at a fundamental level a workflow results in a number of events that are the result of people making decisions that have consequences that are observed by people authorizing them to make more decisions resulting in more events events people's decisions consequences observation authorization these are the fundamental building blocks of a distributed workflow and at the center of these building blocks is making decisions we have also considered how these building blocks form the basis of how we think about daml and this is why we have placed the choice to make a decision at the very heart of the platform so to take this to the next step to design a daml workflow we start by analyzing the decisions involved for this we need to identify the decisions involved in the workflow understand each decision in isolation and determine the way each decision flows from or enables other decisions to reiterate worrying about the static elements of a business process distracts us from the fundamental reason for the workflow something happened that drove business value the static components may be necessary scaffolding but workflows are fundamentally Dynamic a description of activities and actions that generate business value ultim ultimately workflows are about people choosing to do things so we start by identifying the decisions involved the previous lesson provided us with a set of key questions we can use to analyze a decision we will use these questions to understand the decisions in isolation to complete our analysis we need to understand how each decision links to the others this means for each decision determining which prior decision authorized it and then what future decisions are authorized as a consequence of making it from this we can build a tree of decisions and their consequences that can be mapped onto damel choices and their Associated templates in this lesson we will work through an example of doing this analysis and then in the next lesson we will see how we use damel Concepts to map our analysis onto a daml design our example will be a swap market for digital trading cards cards each card will have an issuer and an owner but for this example we won't worry too much about the issuer the marketplace will allow card owners to offer their cards and respond to offers with proposed swaps if both card owners have agreed to a proposed swap then the cards will be exchanged and the issuers will be informed of the swap obviously the core of this example is very simple but the playground card swap is only simple because of the physical presence of the owners and the tangible nature of the cards dematerializing the marketplace introduces issues of atomicity and trust no longer can we rely on a direct physical exchange at a single point of time to ensure that both sides of the swap are satisfied going further and tokenizing the cards introduces issues around notification and consistency the issuer now needs strong guarantee the cards cannot be duplicated deliberately or inadvertently so they can validate The Exchange now let us look at how we can analyze this problem in a way that will allow daml to resolve these issues for us a daml workflow starts with an inciting incident a unilateral decision by a party to start the workflow however like an introduction to a book or an executive summary this is not normally the best place to start designing the workflow Instead try to identify the key event in the workflow that best defines the objective of the workflow in a sale this might be the final exchange meaning money for an asset in a logistics delivery workflow this might be the final delivery Acceptance in an insurance policy workflow it might be issuing the policy or accepting the claim keep in mind this key event is going to be a single Atomic event that occurs at a single point in time if your immediate thought is to choose something that occurs over a period of time then rather than a key event you have identified a key process either pick an event within that process whatever event either started the process or the event that eventually finished it the precise event we pick here isn't particularly important but kicking off the design process closer to the business objetive itive of the workflow does help Orient us to what is important our example is a card swap Marketplace so it should be reasonably obvious that the primary objective of the process the desired business outcome is the swap so let's start working on our analysis for this single use case we will follow the three steps we just outlined this means we start by identifying the triggering decision for the key event involved in the Swap and then analyzing it in isolation once we have identified the key decision we will proceed with the list of questions we discussed in the last lesson now let's use this technique to analyze the swap use case in a single sentence the key event is that two card owners Bob and Alice exchange cards note that this is an atomic swap meaning either the swap happens or it does not and the swap occurs at a single point in time there is no point in time when Bob or Alice hold both cards and still have to finish the swap it is possible to envisage a swap workflow where the swap is not Atomic or happens over a period of time but in these cases the swap would no longer be a single event but a process containing multiple individual events any one of which we could choose as a starting point for our analysis having identified the event what was the decision someone accepted a proposal to swap this naturally leads into the next question who made the decision here we arbitrarily pick Bob and it is arbitrary because for our analysis the actual individual is not important what is important is their role in making the decision so what is important is not that Bob made the decision but that someone in the role of approver made the decision and the approver Bob was able to make this decision because they had been previously authorized by a proposer allice finally we reach the true business value at the heart of the workflow what are the consequences of the decision in our case there are two obvious consequences the ownership of Bob's card is transferred to Alice and the ownership of Alice's card is transferred to Bob you might miss on the first pass but there is also a third consequence of note the exchange can only happen once so once it is happen the proposal that authorized it has been fulfilled and is now retracted to complete our initial analysis we need to understand who gets to witness the different aspects of the decision first we need to identify who has a right to be informed the decision was made in this case this will be the market operator as they facilitated the transaction and need to be informed so they can charge their fee and for each consequence we need to know who else other than the immediate parties to the decision need to be informed of it in this case the issuers will need to be informed pay attention here to the granularity of the requirement the issuer of Bob's old card should be informed only of the transfer of the card They issued not of the other transfer similarly the issuer of Alice's old card only needs to know of that card's transfer this sort of partial visibility is very common and dl's ability to support this is critical to implementing truly distributed business workflows with that we have finished analyzing this decision in isolation we understand the event the decision that triggered it how that decision was authorized the consequences and visibility so now we need to understand how this individual decision links to other decisions in the workflow the links we are looking for can be described simply as what happened that allowed this decision to occur specifically what immediately preceding decision made this decision to act possible or permitted what previous agreement had to exist to allow it to happen What policies around the business state had to be satisfied for this to be allowed to happen each of these results in at least one prior business event in the workflow that must have occurred let's look at our example the decision was to accept a proposal so the immediately preceding decision is going to be making that proposal the pre-existing agreements will be between the market operator and Bob and the market operator and Alice the required prior business state is that Bob and Alice are the acknowledged owner ERS of the cards by their respective issuers both the card ownership and the market agreements turn out to be relatively straightforward so we will leave them for the next lesson and instead focus on the proposal not surprisingly we use exactly the same approach to this decision that we used for the previous one so we go through the same questions again what is the event what was the decision and who made the decision what was their role when they made the decision who authorized the decision what were the consequences of the decision note that the critical consequence here the one that created the link that we followed to get here is that this decision authorized Bob's future choice to accept the proposal it is this ability for daml to capture this concept of authorizing a future Choice as a first class concept that is the secret sauce that drives a lot of its power and flexibility Alice is the actor and Bob is the authorizer they are already going to be informed implicitly on that basis for now we haven't identified anyone else with a right to be informed of this decision who meets to be informed of the consequences we wouldn't normally worry about calling this out explicitly as Bob automatically sees the consequences of decisions he authorized however if you eventually compare this analysis to the daml code code that implements it you will see Bob is explicitly informed of The Proposal this is an implementation detail required to ensure Bob is able to exercise this delegated authority so we will call it out here explicitly for this example before we move on we should reconsider the consequences of this decision while we captured the consequences necessary to link this decision into the swap workflow if we consider this decision in isolation there are probably other consequences we should consider so going back to thinking about consequences there are probably two additional authorizations involved Alis probably wants to retain the right to cancel the proposal if she changes her mind and Bob probably wants the right to reject the proposal if it is unacceptable to him in fact we might want Bob to be authorized to respond with a counter offer but that would complicate this example so we won't allow that for now the important thing to consider here is that we don't have to allow Alice to retract The Proposal this proposal is jointly authorized by Bob via his offer and Alice by making the decision Bob did not have to authorize Alice to make a renounceable proposal we will structure the requirements this way in this instance but keep in mind this ability to manage authorization in a fine greened manner is a powerful capability of damel at this point we now have three decisions to analyze the first two are the alternative consequences we can look at what happens should Alice choose to cancel the proposal we can look at what happens should Bob reject the proposal and we can continue working back up the workflow by looking at the preceding decision that authorized this one in this case Bob making his original offer on the marketplace the first two are pretty straightforward first the decision to cancel and then the decision to reject note that neither of these has any consequence Beyond withdrawing one of the authorizations required for the proposal to exist without the necessary Authority The Proposal is no longer valid and so in both cases it is retracted and that will be the end of the workflow so finally we come to Bob's original offer this analysis isn't hard but there are a couple of things to note this is a case where the link is a pre-existing agreement in this case Bob's membership with the marketplace the reason we call this out here is that this is not going to be a link to another decision in this workflow Instead This is a dependency on a consequence of a previously completed workflow at some point in the past Bob has successfully completed an onboarding workflow with the market operator this presumably included signing a contract with the marketplace agreeing to terms and conditions it may have included passing no your customer checks or verifying a payment facility regardless from the perspective of this workflow this is something that already exists so while the market operator has needed to authorize this decision acquiring that authorization is not a part of this workflow and so this can be considered a unilateral decision by Bob and unilateral decisions are where workflows start so we have reached the end of our analysis so here we are with five decisions that together constitute the swap card workflow including the three different ways our workflow can complete as we translate this analysis to a down design each of these five decisions will become a choice on a template our next steps will be to identify those templates assign the choices to those templates and determine what data should be kept on each contract at this point depending on how your team operates you might assign a Dale engineer to do these steps this is the point where we start to transition from doing D business analysis to doing D design and Engineering keep in mind that even for the relatively simple example we have been working with there are still multiple valid and effective combinations of templates and choice assignments that will work in the next lesson we will go through this process to arrive at a simple template and choice allocation technical design","transcript_synced_at":"2026-10-26T03:58:39.604Z","segments":[{"start_seconds":0,"text":"in previous lessons we have looked at distributed business workflows and how daml approaches the concepts of","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=0s"},{"start_seconds":6,"text":"decisions actors Authority consequences and visibility in this lesson we will apply","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=6s"},{"start_seconds":14,"text":"these Concepts to an example workflow to demonstrate how they can form the basis for daml workflow","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=14s"},{"start_seconds":20,"text":"analysis we have seen how a workflow consists of people or systems under their control and direction making a","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=20s"},{"start_seconds":28,"text":"series of decisions and the consequences of those decisions at a fundamental level a workflow results in a number of events","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=28s"},{"start_seconds":37,"text":"that are the result of people making decisions that have consequences that are observed by people authorizing them","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=37s"},{"start_seconds":45,"text":"to make more decisions resulting in more events events people's decisions consequences observation","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=45s"},{"start_seconds":53,"text":"authorization these are the fundamental building blocks of a distributed workflow and at the center of these building blocks is making","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=53s"},{"start_seconds":62,"text":"decisions we have also considered how these building blocks form the basis of how we think about daml and this is why","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=62s"},{"start_seconds":69,"text":"we have placed the choice to make a decision at the very heart of the platform so to take this to the next","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=69s"},{"start_seconds":76,"text":"step to design a daml workflow we start by analyzing the decisions involved for","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=76s"},{"start_seconds":83,"text":"this we need to identify the decisions involved in the workflow understand each decision in","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=83s"},{"start_seconds":90,"text":"isolation and determine the way each decision flows from or enables other decisions to reiterate worrying about","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=90s"},{"start_seconds":99,"text":"the static elements of a business process distracts us from the fundamental reason for the workflow something happened that drove business","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=99s"},{"start_seconds":107,"text":"value the static components may be necessary scaffolding but workflows are fundamentally Dynamic a description of","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=107s"},{"start_seconds":115,"text":"activities and actions that generate business value ultim ultimately workflows are about people choosing to","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=115s"},{"start_seconds":122,"text":"do things so we start by identifying the decisions involved the previous lesson provided us","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=122s"},{"start_seconds":129,"text":"with a set of key questions we can use to analyze a decision we will use these questions to understand the decisions in","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=129s"},{"start_seconds":138,"text":"isolation to complete our analysis we need to understand how each decision links to the others this means for each","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=138s"},{"start_seconds":146,"text":"decision determining which prior decision authorized it and then what future decisions are authorized as a consequence of making it","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=146s"},{"start_seconds":155,"text":"from this we can build a tree of decisions and their consequences that can be mapped onto damel choices and","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=155s"},{"start_seconds":162,"text":"their Associated templates in this lesson we will work through an example of doing this analysis and then in the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=162s"},{"start_seconds":169,"text":"next lesson we will see how we use damel Concepts to map our analysis onto a daml design our example will be a swap market","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=169s"},{"start_seconds":178,"text":"for digital trading cards cards each card will have an issuer and an owner but for this example we won't worry too","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=178s"},{"start_seconds":185,"text":"much about the issuer the marketplace will allow card owners to offer their cards and respond to offers with","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=185s"},{"start_seconds":193,"text":"proposed swaps if both card owners have agreed to a proposed swap then the cards will be exchanged and the issuers will","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=193s"},{"start_seconds":201,"text":"be informed of the swap obviously the core of this example is very simple but the playground card swap is only simple","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=201s"},{"start_seconds":210,"text":"because of the physical presence of the owners and the tangible nature of the cards dematerializing the marketplace","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=210s"},{"start_seconds":217,"text":"introduces issues of atomicity and trust no longer can we rely on a direct physical exchange at a single point of","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=217s"},{"start_seconds":225,"text":"time to ensure that both sides of the swap are satisfied going further and tokenizing the cards introduces issues","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=225s"},{"start_seconds":234,"text":"around notification and consistency the issuer now needs strong guarantee the cards cannot be duplicated","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=234s"},{"start_seconds":242,"text":"deliberately or inadvertently so they can validate The Exchange now let us look at how we can analyze this problem","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=242s"},{"start_seconds":249,"text":"in a way that will allow daml to resolve these issues for us a daml workflow starts with an inciting incident a","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=249s"},{"start_seconds":258,"text":"unilateral decision by a party to start the workflow however like an introduction to a book or an executive summary this is","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=258s"},{"start_seconds":267,"text":"not normally the best place to start designing the workflow Instead try to identify the key event in the workflow","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=267s"},{"start_seconds":274,"text":"that best defines the objective of the workflow in a sale this might be the final exchange meaning money for an","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=274s"},{"start_seconds":282,"text":"asset in a logistics delivery workflow this might be the final delivery Acceptance in an insurance policy","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=282s"},{"start_seconds":290,"text":"workflow it might be issuing the policy or accepting the claim keep in mind this","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=290s"},{"start_seconds":297,"text":"key event is going to be a single Atomic event that occurs at a single point in time if your immediate thought is to","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=297s"},{"start_seconds":305,"text":"choose something that occurs over a period of time then rather than a key event you have identified a key process","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=305s"},{"start_seconds":314,"text":"either pick an event within that process whatever event either started the process or the event that eventually finished it the precise event we pick","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=314s"},{"start_seconds":323,"text":"here isn't particularly important but kicking off the design process closer to the business objetive itive of the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=323s"},{"start_seconds":330,"text":"workflow does help Orient us to what is important our example is a card swap Marketplace so it should be reasonably","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=330s"},{"start_seconds":338,"text":"obvious that the primary objective of the process the desired business outcome is the swap so let's start working on","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=338s"},{"start_seconds":346,"text":"our analysis for this single use case we will follow the three steps we just outlined this means we start by","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=346s"},{"start_seconds":354,"text":"identifying the triggering decision for the key event involved in the Swap and then analyzing it in","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=354s"},{"start_seconds":361,"text":"isolation once we have identified the key decision we will proceed with the list of questions we discussed in the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=361s"},{"start_seconds":368,"text":"last lesson now let's use this technique to analyze the swap use case in a single","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=368s"},{"start_seconds":375,"text":"sentence the key event is that two card owners Bob and Alice exchange cards note that this is an atomic swap meaning","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=375s"},{"start_seconds":384,"text":"either the swap happens or it does not and the swap occurs at a single point in time there is no point in time when Bob","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=384s"},{"start_seconds":393,"text":"or Alice hold both cards and still have to finish the swap it is possible to envisage a swap workflow where the swap","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=393s"},{"start_seconds":402,"text":"is not Atomic or happens over a period of time but in these cases the swap would no longer be a single event but a","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=402s"},{"start_seconds":410,"text":"process containing multiple individual events any one of which we could choose as a starting point for our","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=410s"},{"start_seconds":417,"text":"analysis having identified the event what was the decision someone accepted a proposal to swap this naturally leads","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=417s"},{"start_seconds":425,"text":"into the next question who made the decision here we arbitrarily pick Bob and it is arbitrary because for our","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=425s"},{"start_seconds":434,"text":"analysis the actual individual is not important what is important is their role in making the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=434s"},{"start_seconds":441,"text":"decision so what is important is not that Bob made the decision but that someone in the role of approver made the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=441s"},{"start_seconds":448,"text":"decision and the approver Bob was able to make this decision because they had been previously authorized by a proposer","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=448s"},{"start_seconds":457,"text":"allice finally we reach the true business value at the heart of the workflow what are the consequences of","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=457s"},{"start_seconds":465,"text":"the decision in our case there are two obvious consequences the ownership of Bob's card is transferred to Alice and","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=465s"},{"start_seconds":474,"text":"the ownership of Alice's card is transferred to Bob you might miss on the first pass but there is also a third","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=474s"},{"start_seconds":482,"text":"consequence of note the exchange can only happen once so once it is happen the proposal that authorized it has been","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=482s"},{"start_seconds":489,"text":"fulfilled and is now retracted to complete our initial analysis we need to understand who gets","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=489s"},{"start_seconds":497,"text":"to witness the different aspects of the decision first we need to identify who has a right to be informed the decision","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=497s"},{"start_seconds":504,"text":"was made in this case this will be the market operator as they facilitated the transaction and need to be informed so","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=504s"},{"start_seconds":512,"text":"they can charge their fee and for each consequence we need to know who else other than the immediate parties to the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=512s"},{"start_seconds":520,"text":"decision need to be informed of it in this case the issuers will need to be informed pay attention here to the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=520s"},{"start_seconds":527,"text":"granularity of the requirement the issuer of Bob's old card should be informed only of the transfer of the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=527s"},{"start_seconds":534,"text":"card They issued not of the other transfer similarly the issuer of Alice's old card only needs to know of that","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=534s"},{"start_seconds":542,"text":"card's transfer this sort of partial visibility is very common and dl's ability to support this is critical to implementing","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=542s"},{"start_seconds":551,"text":"truly distributed business workflows with that we have finished analyzing this decision in isolation we","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=551s"},{"start_seconds":560,"text":"understand the event the decision that triggered it how that decision was authorized the consequences and","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=560s"},{"start_seconds":567,"text":"visibility so now we need to understand how this individual decision links to other decisions in the workflow the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=567s"},{"start_seconds":574,"text":"links we are looking for can be described simply as what happened that allowed this decision to occur","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=574s"},{"start_seconds":582,"text":"specifically what immediately preceding decision made this decision to act possible or permitted what previous agreement had to","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=582s"},{"start_seconds":591,"text":"exist to allow it to happen What policies around the business state had to be satisfied for this to be allowed to happen","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=591s"},{"start_seconds":599,"text":"each of these results in at least one prior business event in the workflow that must have occurred let's look at our example the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=599s"},{"start_seconds":608,"text":"decision was to accept a proposal so the immediately preceding decision is going to be making that proposal the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=608s"},{"start_seconds":616,"text":"pre-existing agreements will be between the market operator and Bob and the market operator and Alice the required","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=616s"},{"start_seconds":624,"text":"prior business state is that Bob and Alice are the acknowledged owner ERS of the cards by their respective","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=624s"},{"start_seconds":631,"text":"issuers both the card ownership and the market agreements turn out to be relatively straightforward so we will leave them for the next lesson and","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=631s"},{"start_seconds":640,"text":"instead focus on the proposal not surprisingly we use exactly the same approach to this decision that we used","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=640s"},{"start_seconds":648,"text":"for the previous one so we go through the same questions again what is the event what was the decision and who made","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=648s"},{"start_seconds":656,"text":"the decision what was their role when they made the decision who authorized the decision what were the consequences","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=656s"},{"start_seconds":664,"text":"of the decision note that the critical consequence here the one that created the link that we followed to get here is","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=664s"},{"start_seconds":671,"text":"that this decision authorized Bob's future choice to accept the proposal it is this ability for daml to capture this","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=671s"},{"start_seconds":679,"text":"concept of authorizing a future Choice as a first class concept that is the secret sauce that drives a lot of its","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=679s"},{"start_seconds":687,"text":"power and flexibility Alice is the actor and Bob is the authorizer they are already going to be","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=687s"},{"start_seconds":694,"text":"informed implicitly on that basis for now we haven't identified anyone else with a right to be informed of this","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=694s"},{"start_seconds":701,"text":"decision who meets to be informed of the consequences we wouldn't normally worry about calling this out explicitly as Bob","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=701s"},{"start_seconds":710,"text":"automatically sees the consequences of decisions he authorized however if you eventually compare this analysis to the daml code","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=710s"},{"start_seconds":718,"text":"code that implements it you will see Bob is explicitly informed of The Proposal this is an implementation detail","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=718s"},{"start_seconds":726,"text":"required to ensure Bob is able to exercise this delegated authority so we will call it out here explicitly for","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=726s"},{"start_seconds":734,"text":"this example before we move on we should reconsider the consequences of this decision while we captured the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=734s"},{"start_seconds":742,"text":"consequences necessary to link this decision into the swap workflow if we consider this decision in isolation","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=742s"},{"start_seconds":750,"text":"there are probably other consequences we should consider so going back to thinking about consequences there are","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=750s"},{"start_seconds":757,"text":"probably two additional authorizations involved Alis probably wants to retain the right to cancel the proposal if she","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=757s"},{"start_seconds":765,"text":"changes her mind and Bob probably wants the right to reject the proposal if it is unacceptable to him in fact we might","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=765s"},{"start_seconds":774,"text":"want Bob to be authorized to respond with a counter offer but that would complicate this example so we won't allow that for now the important thing","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=774s"},{"start_seconds":784,"text":"to consider here is that we don't have to allow Alice to retract The Proposal this proposal is jointly authorized by","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=784s"},{"start_seconds":792,"text":"Bob via his offer and Alice by making the decision Bob did not have to authorize Alice to make a renounceable","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=792s"},{"start_seconds":800,"text":"proposal we will structure the requirements this way in this instance but keep in mind this ability to manage","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=800s"},{"start_seconds":808,"text":"authorization in a fine greened manner is a powerful capability of damel at this point we now have three","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=808s"},{"start_seconds":815,"text":"decisions to analyze the first two are the alternative consequences we can look at what happens","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=815s"},{"start_seconds":822,"text":"should Alice choose to cancel the proposal we can look at what happens should Bob reject the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=822s"},{"start_seconds":829,"text":"proposal and we can continue working back up the workflow by looking at the preceding decision that authorized this","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=829s"},{"start_seconds":837,"text":"one in this case Bob making his original offer on the marketplace the first two are pretty","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=837s"},{"start_seconds":844,"text":"straightforward first the decision to cancel and then the decision to reject note that neither of these has any","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=844s"},{"start_seconds":851,"text":"consequence Beyond withdrawing one of the authorizations required for the proposal to exist without the necessary","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=851s"},{"start_seconds":858,"text":"Authority The Proposal is no longer valid and so in both cases it is retracted and that will be the end of the","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=858s"},{"start_seconds":866,"text":"workflow so finally we come to Bob's original offer this analysis isn't hard but there are a couple of things to note","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=866s"},{"start_seconds":876,"text":"this is a case where the link is a pre-existing agreement in this case Bob's membership with the marketplace the reason we call this out","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=876s"},{"start_seconds":884,"text":"here is that this is not going to be a link to another decision in this workflow Instead This is a dependency on","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=884s"},{"start_seconds":892,"text":"a consequence of a previously completed workflow at some point in the past Bob has successfully completed an onboarding","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=892s"},{"start_seconds":900,"text":"workflow with the market operator this presumably included signing a contract with the marketplace agreeing to terms","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=900s"},{"start_seconds":908,"text":"and conditions it may have included passing no your customer checks or verifying a payment facility regardless from the perspective","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=908s"},{"start_seconds":917,"text":"of this workflow this is something that already exists so while the market operator has needed to authorize this","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=917s"},{"start_seconds":924,"text":"decision acquiring that authorization is not a part of this workflow and so this can be considered a unilateral decision","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=924s"},{"start_seconds":932,"text":"by Bob and unilateral decisions are where workflows start so we have reached the end of our","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=932s"},{"start_seconds":939,"text":"analysis so here we are with five decisions that together constitute the swap card workflow including the three","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=939s"},{"start_seconds":947,"text":"different ways our workflow can complete as we translate this analysis to a down design each of these five decisions will","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=947s"},{"start_seconds":955,"text":"become a choice on a template our next steps will be to identify those templates assign the choices to those","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=955s"},{"start_seconds":962,"text":"templates and determine what data should be kept on each contract at this point depending on how your team operates you","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=962s"},{"start_seconds":971,"text":"might assign a Dale engineer to do these steps this is the point where we start to transition from doing D business","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=971s"},{"start_seconds":979,"text":"analysis to doing D design and Engineering keep in mind that even for the relatively simple example we have","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=979s"},{"start_seconds":987,"text":"been working with there are still multiple valid and effective combinations of templates and choice assignments that will work in the next","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=987s"},{"start_seconds":996,"text":"lesson we will go through this process to arrive at a simple template and choice allocation technical","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=996s"},{"start_seconds":1017,"text":"design","url":"https://www.youtube.com/watch?v=bKY3i0Zc7zE&t=1017s"}],"youtube_url":"https://youtube.com/watch?v=bKY3i0Zc7zE","url":"https://ccpedia.xyz/videos/bKY3i0Zc7zE"}