The domain tree is the full data relating to the registry data. The name of the root domain is the same as the service transaction rootDomainName value. Like the service tree root domain, the domain tree root domain can have its own attributes as well as any number of child domains, allowing for vast structures of data.
Unlike the service tree, the domain tree data lives on if a new service instance is created based off existing registry data. In these cases the domain tree is copied to the new service transaction.
When a service transaction is created for a new service instance that is not based on exiting registry data (i.e. is a Create or Search mode business service) then the domain tree will be initialised as an empty domain, but almost always added to as the view tree is built and configuration relating to domain data is applied.
If the service transaction is a current head, then the domain tree data represents the full data that is currently live on the register for that registry data or entity.
If the service transaction is a current tip, then the domain tree data represents the full data relating to that service transaction. If it was based on another service instance i.e. is a maintain, then it is the data that is currently live on the register, plus any additional changes made within the current service instance.
Remember: the domain tree always reflects the full data relating to a service transaction. This is the case regardless of the state of the viewTree i.e. even if the view tree only reflects a small portion of the domain data, or even doesn’t exist.
Example Domain Tree JSON and XML
"domainTree" : {
"_id" : "300e67edccf805b0",
"name" : "Hero",
"attributes" : {
"CostumeYn" : "Y",
"RegistrationDate" : "2020-05-20T17:34:33.524+0000",
"Name" : "Batman",
"YearOfArrival" : "1974",
"CapeYn" : "Y",
"SuperPowers" : "agility,fighting"
},
"authority" : {
"_id" : "2408c55758ffb143",
"name" : "AuthorityInstance",
"objName" : "authority",
"attributes" : {
"CreatedDate" : "2020-05-20T17:34:32.834+0000",
"CreatedByRequestId" : "975f368444eb9af9b57cb9fb78e1206c",
"CreatedByUser" : "1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c",
"CreatedByUserName" : "External User"
},
"authorities" : [
{
"_id" : "4420c8c1e2795b85",
"name" : "Authority",
"arrName" : "authorities",
"attributes" : {
"CreatedDate" : "2020-05-20T17:34:32.834+0000",
"CreatedByRequestId" : "975f368444eb9af9b57cb9fb78e1206c",
"CreatedByUser" : "1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c",
"CreatedByUserName" : "External User",
"Type" : "initiator",
"Status" : "active",
"GrantMechanism" : "registration",
"GrantedOn" : "2020-05-20T17:34:32.834+0000",
"UserType" : "individual",
"UserIdentifier" : "1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c",
"UserFullName" : "External User",
"FirstName" : "External",
"LastName" : "User"
}
}
]
}
},
<domain-tree id="300e67edccf805b0" name="Hero" CapeYn="Y" CostumeYn="Y" Name="Batman" RegistrationDate="2020-05-21 05:34:33.524 NZST" SuperPowers="agility,fighting" YearOfArrival="1974">
<domain-node id="2408c55758ffb143" name="AuthorityInstance" obj-name="authority" CreatedByRequestId="975f368444eb9af9b57cb9fb78e1206c" CreatedByUser="1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c" CreatedByUserName="External User" CreatedDate="2020-05-21 05:34:32.834 NZST">
<domain-node id="4420c8c1e2795b85" name="Authority" arr-name="authorities" CreatedByRequestId="975f368444eb9af9b57cb9fb78e1206c" CreatedByUser="1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c" CreatedByUserName="External User" CreatedDate="2020-05-21 05:34:32.834 NZST" FirstName="External" GrantMechanism="registration" GrantedOn="2020-05-21 05:34:32.834 NZST" LastName="User" Status="active" Type="initiator" UserFullName="External User" UserIdentifier="1a87b82c3129bfb9b30944c9182f45efc22b097b09a1b6789a7099fb8512d63c" UserType="individual"/>
</domain-node>
</domain-tree>

