From a49dd9ed8cb658c2002ed20ee176669d16c8ad7b Mon Sep 17 00:00:00 2001 From: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com> Date: Wed, 12 Oct 2022 13:54:51 -0400 Subject: [PATCH] Update initaccept.rst (#15218) Addressing the missing word issue noticed by Craig, plus some additional improvements. [CHANGELOG_BEGIN] [CHANGELOG_END] Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com> --- docs/source/daml/patterns/initaccept.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/source/daml/patterns/initaccept.rst b/docs/source/daml/patterns/initaccept.rst index 28d3f51cf8..7ea037429c 100644 --- a/docs/source/daml/patterns/initaccept.rst +++ b/docs/source/daml/patterns/initaccept.rst @@ -9,36 +9,36 @@ The Initiate and Accept pattern demonstrates how to start a bilateral workflow. Motivation ********** -It takes two to tango, but one party has to initiate. There is no difference in business world. The contractual relationship between two businesses often starts with an invite, a business proposal, a bid offering, etc. +It takes two to tango, but one party has to initiate. It is no different in the business world. The contractual relationship between two businesses often starts with an invite, a business proposal, a bid offering, etc. Invite - When a market operator wants to set up a market, they need to go through an on-boarding process, in which they invite participants to sign master service agreements and fulfill different roles in the market. Receiving participants need to evaluate the rights and responsibilities of each role and respond accordingly. + When a market operator wants to set up a market, they need to go through an onboarding process in which they invite participants to sign master service agreements and fulfill different roles in the market. Receiving participants need to evaluate the rights and responsibilities of each role and respond accordingly. Propose When issuing an asset, an issuer is making a business proposal to potential buyers. The proposal lays out what is expected from buyers, and what they can expect from the issuer. Buyers need to evaluate all aspects of the offering, e.g. price, return, and tax implications, before making a decision. -The Initiate and Accept pattern demonstrates how to write a Daml program to model the initiation of an inter-company contractual relationship. Daml modelers often have to follow this pattern to ensure no participants are forced into an obligation. +The Initiate and Accept pattern demonstrates how to write a Daml program to model the initiation of an inter-company contractual relationship. Daml modelers often have to follow this pattern to ensure that no participant is forced into an obligation. Implementation ************** -The Initiate and Accept pattern in general involves 2 contracts: +The Initiate and Accept pattern in general involves two contracts, the initiate contract and the result contract: -Initiate contract - The Initiate contract can be created from a role contract or any other point in the workflow. In this example, initiate contract is the proposal contract *CoinIssueProposal* the issuer created from the master contract *CoinMaster*. +Initiate Contract + The initiate contract can be created from a role contract or any other point in the workflow. In this example, the initiate contract is the proposal contract *CoinIssueProposal* which the issuer created from the master contract *CoinMaster*. .. literalinclude:: daml/CoinIssuance.daml :language: daml :start-after: -- BEGIN_COIN_ISSUER :end-before: -- END_COIN_ISSUER - The *CoinIssueProposal* contract has *Issuer* as the signatory, and *Owner* as the controller to the *Accept* choice. In its complete form, the *CoinIssueProposal* contract should define all choices available to the owner, i.e. Accept, Reject or Counter (e.g. re-negotiate terms). + The *CoinIssueProposal* contract has *Issuer* as the signatory and *Owner* as the controller to the *Accept* choice. In its complete form, the *CoinIssueProposal* contract should define all choices available to the owner, i.e. Accept, Reject or Counter (re-negotiate terms). .. literalinclude:: daml/CoinIssuance.daml :language: daml :start-after: -- BEGIN_COIN_ISSUE_PROPOSAL :end-before: -- END_COIN_ISSUE_PROPOSAL -Result contract +Result Contract Once the owner exercises the *AcceptCoinProposal* choice on the initiate contract to express their consent, it returns a result contract representing the agreement between the two parties. In this example, the result contract is of type *CoinIssueAgreement*. Note, it has both *issuer* and *owner* as the signatories, implying they both need to consent to the creation of this contract. Both parties could be controller(s) on the result contract, depending on the business case. .. literalinclude:: daml/CoinIssuance.daml @@ -47,7 +47,7 @@ Result contract :end-before: -- END_COIN_ISSUE_AGREEMENT .. figure:: images/initiateaccept.png - :alt: The Intiate and Accept Pattern, showing how the CoinIssueProposal contract (an initiate contract), when accepted, returns the resulting CoinIssueAgreement contract. + :alt: The Intiate and Accept Pattern, showing how the CoinIssueProposal contract (an initiate contract), when accepted, returns the CoinIssueAgreement result contract. Initiate and Accept pattern diagram