Check if Relationship can be created
This use case checks whether a Relationship can be created based on a received RelationshipTemplate to the RelationshipTemplate’s creator without actually creating it.
It makes sense to promptly execute this use case in order to prevent the data required to initiate a Relationship from being provided when this is currently not technically possible anyway.
If a Relationship can be created, this can be achieved by executing the Create Relationship with RelationshipTemplate use case.
If the Request Module is enabled and a RelationshipTemplateContent has been specified as the content of the RelationshipTemplate, the Accept incoming Request use case should be utilized to initiate a Relationship.
Parameters
templateIdreferences the RelationshipTemplate received from its creator.- Optionally,
creationContentcan be provided. It is a RelationshipCreationContent or an ArbitraryRelationshipCreationContent depending on whether the RelationshipTemplate’scontentis a RelationshipTemplateContent or an ArbitraryRelationshipTemplateContent. Specify this parameter if additional validations are wanted for thecreationContentthat would be used to create the Relationship.
On Success
- Returns a
resultthat indicates if a Relationship can be created with the given parameters. - If the
isSuccessproperty of theresulthas the valuetrue, a Relationship can currently be created to the creator of the RelationshipTemplate. This would then initially have"Pending"asstatusuntil the creator of the RelationshipTemplate accepts the Relationship. - If the
isSuccessproperty of theresulthas the valuefalse, no Relationship can currently be created to the creator of the RelationshipTemplate. This can have various causes, for example:- 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
creationContent, if specified, is not a RelationshipCreationContent, although the RelationshipTemplate’scontentis a RelationshipTemplateContent, or it is not an ArbitraryRelationshipCreationContent, although the RelationshipTemplate’scontentis an ArbitraryRelationshipTemplateContent. - A RelationshipCreationContent was specified as
creationContent, because the RelationshipTemplate’scontentis a RelationshipTemplateContent, but there is no associated accepted incoming Request. - A RelationshipCreationContent was specified as
creationContent, because the RelationshipTemplate’scontentis a RelationshipTemplateContent, and there is an associated accepted incoming Request, but its Response was not provided as theresponseof the specified RelationshipCreationContent.
- The
On Failure
- The parameters are malformed.