Re: Offer/Demand & potentialAction -> TradeAction/TransferAction

Having a more generic name is in general nice.
However, note that the dependencies in workflows (and thus between APIs / potential actions) are very, very complex - hundreds of researchers have worked on formalisms for expressing the logical or temporal preconditions of atomic activities in business process modeling and Web services composition.

See e.g.

W. M. P. van der Aalst / M. Pesic: DecSerFlow: Towards a Truly Declarative Service Flow Language
Lecture Notes in Computer Science Volume 4184, 2006, pp 1-23
http://link.springer.com/chapter/10.1007%2F11841197_1#page-1

Thus, I would be very careful with adding a very simple mechanism for dependencies in the Actions branch. I see the need for this for linking a potential action to a commercial offer, though.

Martin


On 19 Sep 2014, at 00:46, ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org> wrote:

> On 07/02/2014 04:23 PM, martin.hepp@ebusiness-unibw.org wrote:
>> As far as I understand, the red line between XYZ-Action and other schema.org elements is that the Action describes the access mechanism to the computational functionality (e.g. REST API) for executing the action, while the other elements describe the action itself. Not sure we already have the proper patterns for linking these two spheres properly.
>> Best wishes / Mit freundlichen Grüßen
> 
> Vicki's example of *contingentOnOffer* and my reaction to keep it
> generic *contigentOn* and later extend its rangeIncludes to Offer ||
> Action reminded me of this conversation.
> 
> ConsumeAction can also depend on previous TradeAction or TransferAction
> so once again observation that *subtypes of TradeAction and
> TransferAction match very closely Offer or Demand*. And as you can find
> in my examples from original email (copy below) it seems to make sense
> for many cases to use:
> 
> "@type": ["GiveAction", "Offer"]
> "@type": ["ReceiveAction", "Demand"]
> 
> "@type": ["LendAction", "Offer"]
> "@type": ["BorrowAction", "Demand"]
> 
> "@type": ["SellAction", "Offer"]
> "@type": ["BuyAction", "Demand"]
> 
> and coming back to *contingentOn*
> 
> {
>  "@type": "ReturnAction",
>  "contingentOn": {
>    "@type": "BorrowAction"
>  }
> }
> 
> now, how do I express:
> "I can Lend this bike if recipient Return it to me"?!?
> 
> *contingentOn* Action which happens after (in a future)
> 
> {
>  "@type": "LendAction",
>  "object": {
>    "@id": "/assets/bike-123",
>    "@type": "Bike",
>  }
>  "contingentOn": {
>    "@type": "ReturnAction",
>    "object": {
>      "@id": "/assets/bike-123"
>    }
>  }
> }
> 
> not before (in a past) as in Vicki's (modified by me slightly):
> 
> {
>  "@type": "WatchAction",
>  "target": "http://www.hulu.com/thedailyshowwithjonstewart",
>  "contingentOn": {
>    "@type": ["Offer", "BuyAction"]
>  }
> }
> 
> and to make it even more tough construct, how to express: "For me to
> Lend this bike to someone again, the person who Borrow(ed) it last, will
> need to Return it to me first" @|@
> 
> 
> 
>> On 02 Jul 2014, at 15:48, ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org> wrote:
>> 
>>> I struggle to understand how (if) Actions can work together with
>>> Offer/Demand. In particular TradeAction/TransferAction seem to have some
>>> potential to work together with Offer/Demand...
>>> 
>>> Looking at: Thing > Action > TransferAction > GiveAction
>>> http://schema.org/GiveAction
>>> "The act of transferring ownership of an object to a destination.
>>> Reciprocal of TakeAction."
>>> 
>>> 
>>> For example: https://gist.github.com/elf-pavlik/848d332d2259ffe9199e
>>> 
>>> *Jane Doe gave a Fairphone to elf Pavlik*
>>> 
>>> {
>>> "@id": "https://example.net/jane/actions/12345",
>>> "@type": "GiveAction",
>>> "recipient": {
>>>   "@id": "https://wwelves.org/perpetual-tripper",
>>>   "@type": "Person",
>>>   "name": "elf Pavlik"
>>> },
>>> "agent": {
>>>   "@id": "https://example.net/jane",
>>>   "@type": "Person",
>>>   "name": "Jane Doe"
>>> },
>>> "object": {
>>>   "@id": "https://example.net/jane/assets/231231",
>>>   "@type": "IndividualProduct",
>>>   "model": {
>>>     "@id": "http://fairphone.com/v1",
>>>     "@type": "ProductModel",
>>>     "name": "Fairphone V1"
>>> }
>>> }
>>> 
>>> To arrive at to this point in real world scenario, I would need to
>>> publish a Demand and/or Jane would need to publish an Offer. At the same
>>> time looking at Actions, using *potentialAction* seems an attractive
>>> option when publishing list of assets:
>>> 
>>> https://gist.github.com/elf-pavlik/f26562c3c1719bf06273
>>> {
>>> "@id": "https://example.net/jane/assets/231231",
>>> "@type": "IndividualProduct",
>>> "model": {
>>>   "@id": "http://fairphone.com/v1",
>>>   "@type": "ProductModel",
>>>   "name": "Fairphone V1"
>>> },
>>> "potentialAction": [
>>>   {
>>>     "@type": "GiveAction",
>>>     "object": "https://example.net/jane/assets/231231"
>>>   },
>>>   {
>>>     "@type": "BorrowAction",
>>>     "object": "https://example.net/jane/assets/231231"
>>>   },swee
>>>   {
>>>     "@type": "UseAction",
>>>     "object": "https://example.net/jane/assets/231231"
>>>   }
>>> ]
>>> }
>>> 
>>> I wonder how it could fit with Offer/Demand
>>> 
>>> {
>>> "@id": "https://example.net/jane/listings/5939304",
>>> "@type": "Offer",
>>> "seller": "https://example.net/jane",
>>> "itemOffered": {
>>>   "@id": "https://example.net/jane/assets/231231",
>>>   "@type": "IndividualProduct",
>>>   "model": {
>>>     "@id": "http://fairphone.com/v1",
>>>     "@type": "ProductModel",
>>>     "name": "Fairphone V1"
>>>   },
>>> }
>>> }
>>> 
>>> schema:TradeAction already enables schema:price (not sure why not
>>> schema:priceSpecification ?) which in a way suggests this possibility:
>>> 
>>> {
>>> "@type": ["GiveAction", "Offer"],
>>> "object": {
>>>   "@id": "https://example.net/jane/assets/231231",
>>>   "@type" "IndividualProduct"
>>> },
>>> "actionStatus": {"@type": "PotentialActionStatus"},
>>> "agent": {
>>>   "@type": "Person",
>>>   "@id": "https://example.net/jane",
>>>   "name": "Jane Doe"
>>> }
>>> }
>>> 
>>> I like schema:object here which also fits nicer then schema:itemOffered
>>> when used in schema:Demand
>>> Similar schema:agent provides generic alternative to schema:seller
>>> (which I find somehow confusing when used in Demand!)
>>> 
>>> {
>>> "@type": ["ReceiveAction", "Demand"],
>>> "object": {
>>>   "@id": "https://example.net/jane/assets/231231",
>>>   "@type" "IndividualProduct"
>>> },
>>> "actionStatus": {"@type": "PotentialActionStatus"},
>>> "agent": {
>>>   "@type": "Person",
>>>   "@id": "https://wwelves.org/perpetual-tripper",
>>>   "name": "elf Pavlik"
>>> }
>>> 
>>> Maybe also Offer/Demand could in a way 'mint' Trade/Transfer Actions...
>>> 
>>> I try lately to follow developments in Hydra CG[1], now together with
>>> Linked Data Fragments[2]. I see there strong emphasis on Hypermedia
>>> Controls[3] and building around Actions looks like a nice fit[4]
>>> 
>>> Any thoughts?
>>> :)
>>> 
>>> [1] http://www.hydra-cg.com/
>>> [2] http://linkeddatafragments.org/
>>> [3] https://sites.google.com/site/restframework/hypermedia-controls
>>> [4] http://www.hydra-cg.com/spec/latest/schema.org/
>>> 
>> 
>> 
> 

Received on Friday, 19 September 2014 08:36:23 UTC