Created
August 1, 2023 16:24
-
-
Save da-blog/1ebed6976ac4625db901f619ff2b8b2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Status = NotStarted | Started | Reviewed deriving (Eq, Show) | |
template Task | |
with | |
lead : Party | |
manager : Party | |
developer : Party | |
status : Status | |
where | |
signatory lead | |
observer manager,developer | |
controller developer can | |
Start_Task : ContractId Task | |
do | |
create this with status = Started | |
controller manager can | |
Mark_Reviewed : ContractId Task | |
do | |
create this with status = Reviewed | |
controller lead can | |
Mark_Completed : () | |
do | |
pure () -- Archive/close the contract when completed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment