Open jrhender opened 2 weeks ago
In short, an exchange has two IDs, a fully qualified one (full URL) and a relative one (just the "slug" or "path" part). I don't think we want two different properties in the data model of exchanges for this -- and that we just want the relative value to be returned, i.e., exchange.id == '<relative exchange ID>'
.
We will need a separate name to describe the relative ID when talking about it as a URL path parameter, however, because it needs to be distinguished from other slugs/path params like the relative workflow ID (which appears in the full exchange ID URL).
We do need to fix up the YAML files that describe what information is returned when creating an exchange. I believe there should be an id
field that holds the relative ID only (slug only, i.e., "localExchangeId" or the relative "path" parameter value) and that we should remove the exchangeId
property. We should only use the name exchangeId
, I think, if we're expressing information that isn't in an exchange itself. This would be consistent with how we use credentialId
to refer to a fully qualified (full URL) to identify a credential, but the ID doesn't appear in the credential.
We need to settle on a name for what we're calling the "slug"/"path" thing that appears in the URL / routes as a local/relative identifier for the exchange. Maybe we even want to use "relative" in name for that.
Ok, thanks for the clarification @dlongley . Your points make sense to me 👍 .
I think then that the exchange example should adjusted to have the same localExchangeId
for both of the participate
calls. PR here to implement this: https://github.com/w3c-ccg/vc-api/pull/427
When calling Create Exchange, an
exchangeId
is returned. However, the Participate in an Exchange endpoint has alocalExchangeId
URL path parameter.Looking at the Exchange Example, my assumption is that the
Create Exchange
endpoint was only called once. I think this must be the case as there is a single workflowId123
and a workflow can only have single possible starting step. Therefore, on might expect there to be a singleexchangeId
for the interactions in the example. However, thelocalExchangeId
changes in the example from123
toabc
. I see the following possible explanations:localExchangeId
is intended to be different from theexchangeId
. In other words, a "local exchange" is essentially an instance of workflow step which is associated with the parent exchange. If this the case, it is unclear how thelocalExchangeId
is determined (e.g. by the Owner Coordinator to pass to the client of the exchange).localExchange
is the same asexchangeId
and the change from123
toabc
is a mistake.I think that further discussion and explanatory text on this point would be helpful for implementors of the workflow features.