It is possible to represent the same sequence using the Valueflows terms without increasing the number of activities and overall complexity?
@silverpill sorry for the delay. Here’s one possibility, although I’m having trouble understanding exactly how the marketplace would work in ActivityPub thinking. And how a pattern of more tightened up messaging between actors should work for economic activity, vs social activity. Might open a more general issue for that after my partner @bhaugen thinks more about it, he has the distributed transaction background and I don’t.
I have more messages, but I think that is not added complexity, just more for completeness of the use case.
First the Seller posts the product offered in the marketplace. (Happened before your sequence.) This potentially could be an as:Offer, not an as:Create.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"vf": "https://w3id.org/valueflows/",
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"summary": "Alice posts an offer of a bike in the Fedi Market.",
"type": "Create",
"actor": {
"id": "https://social.example/alice",
"type": "Person",
"name": "Alice"
},
"to": {
"id": "https://fedi.example/market",
"type": "Group",
"name": "Fedi Market"
},
"object": {
"type": "vf:Proposal",
"id": "https://alice.example/proposal/1",
"vf:name": "Offering used bike",
"vf:publishes": {
"type": "vf:Intent",
"id": "https://alice.example/intent/11",
"vf:action": "transfer"
"vf:resourceInventoriedAs": "https://alice.example/resource/bike1"
"content": "Blue one-speed bike, 15 years old, some rust.",
"vf:provider": "https://social.example/alice",
},
"vf:reciprocal": {
"type": "vf:Intent",
"id": "https://alice.example/intent/12",
"vf:action": "transfer"
"vf:resourceConformsTo": "https://www.wikidata.org/wiki/Q4917", # US Dollar
"vf:resourceQuantity": {
"type": "om2:Measure",
"om2:hasNumericalValue": "30",
"om2:hasUnit": "each"
},
"vf:receiver": "https://social.example/alice",
},
}
}
The Buyer sees the offer, and responds. This corresponds to your first bullet, except that I am thinking of this more like an order, which maybe is like an offer to buy, or seems more definite? I’m imagining some level of marketplace fediverse instance. But there are certainly other ways to imagine it.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"vf": "https://w3id.org/valueflows/",
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"summary": "Bob orders bike from Alice.",
"type": "Create",
"actor": {
"id": "https://pub.example/bob",
"type": "Person",
"name": "Bob"
},
"to": {
"id": "https://social.example/alice",
"type": "Person",
"name": "Alice"
},
"cc": {
"id": "https://fedi.example/market",
"type": "Group",
"name": "Fedi Market"
},
"object": {
"type": "vf:Agreement",
"id": "https://fedi.example/agreement/1",
"vf:clauses": [ {
"type": "vf:Commitment",
"id": "https://fedi.example/commitment/5",
"vf:satisfies": "https://alice.example/intent/11",
"vf:action": "transfer",
"vf:resourceInventoriedAs": "https://alice.example/resource/bike9",
"vf:provider": "https://social.example/alice",
"vf:receiver": "https://pub.example/bob"
},
{
"type": "vf:Commitment",
"id": "https://fedi.example/commitment/6",
"vf:satisfies": "https://alice.example/intent/12",
"vf:action": "transfer",
"vf:resourceConformsTo": "https://www.wikidata.org/wiki/Q4917", # US Dollar
"vf:resourceQuantity": {
"type": "om2:Measure",
"om2:hasNumericalValue": "30",
"om2:hasUnit": "each"
},
"vf:provider": "https://pub.example/bob",
"vf:receiver": "https://social.example/alice"
},
]
}
}
Then there is something like your bullet point 2, because the order needs confirmation from the Seller. Unless this isn’t really needed unless there is a problem and the order can’t be fulfilled? If so, that would save a step.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"vf": "https://w3id.org/valueflows/",
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"summary": "Alice confirms order for bike to Bob.",
"type": "Accept",
"actor": {
"id": "https://social.example/alice",
"type": "Person",
"name": "Alice"
},
"to": {
"id": "https://pub.example/bob",
"type": "Person",
"name": "Bob"
},
"cc": {
"id": "https://fedi.example/market",
"type": "Group",
"name": "Fedi Market"
},
"object": {
"type": "vf:Agreement",
"id": "https://fedi.example/agreement/1"
}
}
Then the exchange actually happens. I’ve recorded both sides of this, the order would depend on how the marketplace operates. Seems like most e-commerce wants payment first, but also seems like that could depend on the level of trust within the group. The payment is your bullet 3, the bike transfer is just for completeness. I don’t know if we would need some kind of accept
or countersign kind of thing so that both parties on each transfer explicitly say it happened? For now, I’m assuming not, and that since the receiver is recording the economic events, that is good enough. Or, the provider could be recording the events, and if something doesn’t arrive, that is an exception that gets handled.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"vf": "https://w3id.org/valueflows/",
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"summary": "Alice receives US Dollars from Bob.",
"type": "Create",
"actor": {
"id": "https://social.example/alice",
"type": "Person",
"name": "Alice"
},
"to": {
"id": "https://pub.example/bob",
"type": "Person",
"name": "Bob"
},
"cc": {
"id": "https://fedi.example/market",
"type": "Group",
"name": "Fedi Market"
},
"object": {
"type": "vf:EconomicEvent",
"id": "https://fedi.example/event/1",
"vf:fulfills": "https://fedi.example/commitment/6",
"vf:action": "transfer",
"vf:resourceConformsTo": "https://www.wikidata.org/wiki/Q4917", # US Dollar
"vf:resourceQuantity": {
"type": "om2:Measure",
"om2:hasNumericalValue": "30",
"om2:hasUnit": "each"
},
"vf:provider": "https://pub.example/bob",
"vf:receiver": "https://social.example/alice",
}
}
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"vf": "https://w3id.org/valueflows/",
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/"
}
],
"summary": "Bob receives bike from Alice.",
"type": "Create",
"actor": {
"id": "https://pub.example/bob",
"type": "Person",
"name": "Bob"
},
"to": {
"id": "https://fedi.example/market",
"type": "Group",
"name": "Fedi Market"
},
"cc": {
"id": "https://social.example/alice",
"type": "Person",
"name": "Alice"
},
"object": {
"type": "vf:EconomicEvent",
"id": "https://fedi.example/event/2",
"vf:fulfills": "https://fedi.example/commitment/5",
"vf:action": "transfer",
"vf:resourceInventoriedAs": "https://alice.example/resource/bike9",
"vf:resourceQuantity": {
"type": "om2:Measure",
"om2:hasNumericalValue": "1",
"om2:hasUnit": "each"
},
"vf:provider": "https://social.example/alice",
"vf:receiver": "https://pub.example/bob"
}
}