-
I have a policy that flows as illustrated below, per the IWA dMRV spec. I am using Request VC document blocks within the policy to store the data and support the workflow. When using the UI, documents are correctly associated to one another through the chain of messageID>relationships. When using the APIs, how do you associate the child document to the correct parent? In the UI, this is managed through how the request VC for the child is located on the same line as the parent in the document grid. However, if per the diagram below, I have data coming in as Ecological Claims 1-4 via API, how do I make sure those VCs have relationships to the correct parent Claim Source document? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
To link the document via API you'd need to pass into the request block In the created VC document's To check the correctness of relationships you could check this in the the created VC document and verify that it contains the messageID of the parent VC document. |
Beta Was this translation helpful? Give feedback.
-
Does the ID of the connected VC mean the messageId or some other identifier?
…On Thu, Feb 22, 2024 at 11:06 AM Andrey (Envision Blockchain) < ***@***.***> wrote:
https://docs.hedera.com/guardian/guardian/standard-registry/policies/policy-creation/introduction/request-workflow-block#api-parameters
—
Reply to this email directly, view it on GitHub
<#3270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2AORXMNIHPBIHC6P74WPPTYU53LHAVCNFSM6AAAAABDVGNA6KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNJZGUZDO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi All. I'm trying this, but with no success. Attached is a simple policy (just change the '.zip' extension back to '.policy' to import it into your Guardian instance). Steps:
But for some reason I keep on getting a 500 error with message "Invalid relationships". I've tried passing the value to "ref" without the "urn:" and without the "urn:uuid:", but it it also fails. I'm using Guardian version 2.21.1. Please help. |
Beta Was this translation helpful? Give feedback.
-
That's what I've been using, thank you, @anvabr. |
Beta Was this translation helpful? Give feedback.
To link the document via API you'd need to pass into the request block
ref
which contains the parent document together with the value of thedocument
, i.e. the body will look like this:{ document: ${credentialSubject}, ref: ${parentVCdoc} }
In the created VC document's
credentialSubject
the will appear aref
, which would contain thecredentialSubject.id
from the parentVCdoc (see above), and in the case where the parentVCdoc was published in Hedera in the created VC there will also be itsmessageId
in therelationships
.To check the correctness of relationships you could check this in the the created VC document and verify that it contains the messageID of the parent VC document.
https://…