Statuses

Once you have defined the state, you need to show the different statuses that the state can be in. You do this by having a copy of the State for each status.

The properties shown in each status box may differ. This allows you to highlight the properties which are salient for that status even though they are actually a view of the same underlying class which must implement the union of all properties on the diagram.

In this example the participants remain consistent in all statuses but this will not always be the case.

To prevent an explosion of complexity, CDL mandates the following rules:

  • The Primary state type is defined as the state type in the Smart Contract which has a status field.
  • There can only be one Primary state type per smart contract, although there can be multiple smart contracts operating and interacting in a single transaction each of which have their own Primary state type.
  • Other state types in this smart contract cannot have a status field.
  • A transaction’s inputs can only contain primary states with a single status.
  • A transaction’s outputs can only contain primary states with a single status, although this can be different from the input status.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.