---
title: Agreement Smart Constract (AgreementState belongs to AgreementContract)
---
%%{
init: {
'themeVariables': {
'fontFamily' :'ms',
'fontSize' :'10px'
}
}
}%%
stateDiagram-v2
%%クラス定義
classDef state fill:white
classDef constraint fill:#a2e8e8,stroke-width:0px
class PROPOSED state
class REJECTED state
class AGREED state
class UNIVERSAL constraint
class propose constraint
class reject constraint
class repropose constraint
class agree constraint
class redeem constraint
%%Corda state定義
PROPOSED:AgreementState<br>(PROPOSED)<br>______________________________<br>Properties:<br>~buyer:Party<br>~seller:Party<br>...<br>______________________________<br>Perticipants:<br>~buyer<br>~seller
REJECTED:AgreementState<br>(REJECTED)<br>______________________________<br>Properties:<br>~buyer:Party<br>~seller:Party<br>...<br>______________________________<br>Perticipants:<br>~buyer<br>~seller
AGREED:AgreementState<br>(AGREED)<br>______________________________<br>Properties:<br>~buyer:Party<br>~seller:Party<br>...<br>______________________________<br>Perticipants:<br>~buyer<br>~seller
%%制約1
note left of PROPOSED :*status制約:<br>-STC1
note left of REJECTED :*status制約:<br>-STC2
note left of AGREED :*status制約:<br>-STC3
%%制約2
propose:**Flow制約<br>-FC1
reject:*Flow制約:<br>-FC2<br>______________________________<br>*Command制約:<br>-CC1
repropose:*Flow制約:<br>-FC3<br>______________________________<br>*Command制約:<br>-CC2
agree:*Flow制約:<br>-FC4<br>______________________________<br>*Command制約:<br>-CC3
redeem:*Flow制約:<br>-FC5
UNIVERSAL:*AgreementState Universal制約<br>-UC1
%%フロー図
direction LR
[*] --> propose:0 propse<br>(-SC1)
propose --> PROPOSED:1
PROPOSED --> reject :1 reject <br>(-SC2)
reject --> REJECTED :1
REJECTED --> repropose :1 repropose <br>(-SC3)
repropose --> PROPOSED :1
PROPOSED -->agree :1 agree <br>(-SC4)
agree --> AGREED :1
AGREED -->redeem :1 redeem <br>(-SC5)
redeem --> [*]:0