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
templateId
references the RelationshipTemplate received from its creator.- Optionally,
creationContent
can be provided. It is a RelationshipCreationContent or an ArbitraryRelationshipCreationContent depending on whether the RelationshipTemplate’scontent
is a RelationshipTemplateContent or an ArbitraryRelationshipTemplateContent. Specify this parameter if additional validations are wanted for thecreationContent
that would be used to create the Relationship.
On Success
- Returns a CanCreateRelationshipResponse that indicates if a Relationship can be created with the given parameters.
- If the
isSuccess
property of the CanCreateRelationshipResponse has the valuetrue
, a Relationship can currently be created to the creator of the RelationshipTemplate. This would then initially have"Pending"
asstatus
until the creator of the RelationshipTemplate accepts the Relationship. - If the
isSuccess
property of the CanCreateRelationshipResponse has the valuefalse
, no Relationship can currently be created to the creator of the RelationshipTemplate. This can have various causes, for example:
– ThetemplateId
does 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 itsexpiresAt
property has been exceeded.
– A Relationship with"Pending"
,"Active"
,"Terminated"
or"DeletionProposed"
asstatus
already 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.
– ThecreationContent
, if specified, is not a RelationshipCreationContent or an ArbitraryRelationshipCreationContent.
On Failure
- The parameters are malformed.