Create Relationship with RelationshipTemplate
This use case intends to create a Relationship based on a RelationshipTemplate, which was previously received.
The Relationship will be established with the RelationshipTemplate’s creator.
This use case must always be applied if the content of the RelationshipTemplate is an ArbitraryRelationshipTemplateContent.
However, if it is a RelationshipTemplateContent, it usually does not have to be executed manually anymore.
Instead, the Request Module, which is enabled by default, takes care of this automatically.
For information on how to establish a Relationship based on a RelationshipTemplate with RelationshipTemplateContent and an enabled Request Module, refer to the corresponding scenario documentation.
To check whether a Relationship can be created without actually creating it, the Check if Relationship can be created use case can be executed.
Parameters
templateIdreferences the RelationshipTemplate that was received from its creator.creationContentis an ArbitraryRelationshipCreationContent if the RelationshipTemplate’scontentis an ArbitraryRelationshipTemplateContent and the use case is applied manually. It is a RelationshipCreationContent if the RelationshipTemplate’scontentis a RelationshipTemplateContent and the Request Module automatically takes care of the execution of the use case. It will be stored inside the Relationship and can be analyzed by the creator of the RelationshipTemplate to decide whether to accept the Relationship.
On Success
- Creates and returns the Relationship.
On Failure
- The
templateIddoes not resolve to a RelationshipTemplate or the associated RelationshipTemplate was not cached correctly. - The RelationshipTemplate has already expired, which means that the timestamp specified in its
expiresAtproperty has been exceeded. - A Relationship with
"Pending","Active","Terminated"or"DeletionProposed"asstatusalready exists to the creator of the RelationshipTemplate. In particular, the initiation of a new Relationship is prevented if the potential initiator has already decomposed the former Relationship to the RelationshipTemplate’s creator, but the creator of the RelationshipTemplate has not yet decomposed it and still has the former Relationship with"DeletionProposed"asstatus. - The Identity of the creator of the RelationshipTemplate is in deletion or has already been deleted.
- The
creationContentis not a RelationshipCreationContent, although the RelationshipTemplate’scontentis a RelationshipTemplateContent, or it is not an ArbitraryRelationshipCreationContent, although the RelationshipTemplate’scontentis an ArbitraryRelationshipTemplateContent. - The RelationshipTemplate’s
contentis a RelationshipTemplateContent, but there is no associated accepted incoming Request. - The RelationshipTemplate’s
contentis a RelationshipTemplateContent and there is an associated accepted incoming Request, but its Response was not provided as theresponseof the specified RelationshipCreationContent.