Skip to content

Commit

Permalink
refactor: deleted data due to decomposed Relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Dec 20, 2024
1 parent 8632086 commit b641091
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions _docs_integrate/terminate-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Each use case has the `relationshipId` as input. Only accepting the reactivation

## Decompose a Relationship

Decomposing a Relationship deletes from your Connector
Decomposing a [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) deletes all data associated with the peer that was transmitted during the Relationship:

- the Relationship
- the peer's RelationshipTemplates
- the Relationship's [RelationshipTemplate]({% link _docs_integrate/data-model-overview.md %}#relationshiptemplate) if it was single use (its `maxNumberOfAllocations` is 1) or owned by the peer - for a new Relationship you will have to exchange a RelationshipTemplate again
- shared [Attributes]({% link _docs_integrate/data-model-overview.md %}#attributes), [Notifications]({% link _docs_integrate/data-model-overview.md %}#notification), [Requests]({% link _docs_integrate/data-model-overview.md %}#request) (in each case both sent and received)
- sent and received [Messages]({% link _docs_integrate/data-model-overview.md %}#message) with one exception: If you have sent a Message to multiple recipients, the Message is not deleted but the peer's address is replaced with a pseudonym. The pseudonym is the same for every peer.
- furthermore, [Tokens]({% link _docs_integrate/data-model-overview.md %}#token) and [AttributeListeners]({% link _docs_integrate/data-model-overview.md %}#localattributelistener).
- The Relationship itself.
- The [RelationshipTemplate]({% link _docs_integrate/data-model-overview.md %}#relationshiptemplate) used to establish the Relationship if it was for single use, which means that the value of its `maxNumberOfAllocations` property is one, or is owned by the peer. A RelationshipTemplate must be exchanged again to establish a new Relationship.
- In any case, all RelationshipTemplates of the peer. During a Relationship, several RelationshipTemplates may have been exchanged, as [Requests can be sent via RelationshipTemplates]({% link _docs_integrate/requests-via-relationshiptemplates.md %}#create-the-relationshiptemplate) both when establishing new Relationships and for existing Relationships.
- Both the sent and the received shared [Attributes]({% link _docs_integrate/data-model-overview.md %}#attributes), [Notifications]({% link _docs_integrate/data-model-overview.md %}#notification) and [Requests]({% link _docs_integrate/data-model-overview.md %}#request).
- Sent and received [Messages]({% link _docs_integrate/data-model-overview.md %}#message) with one exception: If a Message has been sent to multiple `recipients`, the Message is not deleted but the peer's address is replaced with a pseudonym. The pseudonym is the same for every peer.
- Furthermore, the corresponding [Tokens]({% link _docs_integrate/data-model-overview.md %}#token) and [AttributeListeners]({% link _docs_integrate/data-model-overview.md %}#localattributelistener).

The use case is [Decompose Relationship]({% link _docs_use-cases/use-case-transport-decompose-relationship.md %}), which takes the `relationshipId` as input. For the peer, the Relationship is not deleted, but its `status` now is `"DeletionProposed"`.
If the peer uses a Connector, they receive a `transport.relationshipChanged` [event]({% link _docs_integrate/connector-events.md %}). You receive a `transport.relationshipDecomposedBySelf` event. The peer is expected to follow suit once the shared data is no longer needed. Only after both Identities involved in the Relationship have decomposed it, the Relationship itself and data transmitted during it are deleted from the Backbone. To get to an active Relationship again after one involved Identity has decomposed, the other Identity must decompose as well. After that, the two have to start from scratch to [establish a Relationship]({% link _docs_integrate/establish-relationships.md %}), as reactivation of the former Relationship is no longer possible.

0 comments on commit b641091

Please sign in to comment.