Should activities include a "reason"

21 views
Skip to first unread message

James M Snell

unread,
Nov 4, 2013, 12:47:02 PM11/4/13
to activity...@googlegroups.com
For a number of scenarios I've come across, there's been a need for an
Activity statement to include an explanation about *why* the activity
occurred. For instance, when an actor flags a particular piece of
content as being inappropriate, or when an actor rejects an expense
report, or when an actor awards a badge to another user.

In the original Activity Streams 1.0 Core Schema document, I had
introduced the "context" property has a rather loosely defined
mechanism for expressing why an activity occurred by describing the
context within which it occurred, but that existing definitely is
rather loose and poorly defined.

So the question is: do we need a more well defined "reason" property.

For instance,

{
"actor": "acct:j...@example.org",
"verb": "flag-as-inappropriate",
"object": "http://example.org/posts/1",
"reason": "urn:example:codes:tos-violation"
}

Or,

{
"actor": "acct:j...@example.org",
"verb": "give",
"object": {
"objectType": "badge",
"displayName": "World Champions"
},
"target": "acct:red...@example.org",
"reason": {
"actor": "acct:red...@example.org",
"verb": "win",
"object": "http://example.org/world-series"
}
}

Or,

{
"actor": "acct:bo...@example.org",
"verb": "reject",
"object": "http://example.org/expenses/1",
"reason": "urn:example:codes:unapproved-expenses"
}

Because we already have the context property defined in the schema
draft, introducing the "reason" property is not strictly necessary but
I believe it would still be beneficial... at least as a standardized
extension to the core vocabulary.

Thoughts?

Melvin Carvalho

unread,
Nov 4, 2013, 12:54:50 PM11/4/13
to activity-streams
On 4 November 2013 18:47, James M Snell <jas...@gmail.com> wrote:
For a number of scenarios I've come across, there's been a need for an
Activity statement to include an explanation about *why* the activity
occurred. For instance, when an actor flags a particular piece of
content as being inappropriate, or when an actor rejects an expense
report, or when an actor awards a badge to another user.

In the original Activity Streams 1.0 Core Schema document, I had
introduced the "context" property has a rather loosely defined
mechanism for expressing why an activity occurred by describing the
context within which it occurred, but that existing definitely is
rather loose and poorly defined.

So the question is: do we need a more well defined "reason" property.

For instance,

{
  "actor": "acct:j...@example.org",
  "verb": "flag-as-inappropriate",
  "object": "http://example.org/posts/1",
  "reason": "urn:example:codes:tos-violation"
}

In tabulator we normally store quads, the first 3 (triple) show:

subject / predicate / object

very much like your

actor / verb / object

The fourth field is actually called "why".  It normally refers to a context of sorts, but in particular, where the statement came from.  E.g. it could be a web page that the triple was found, that is the most common 4th element in a quad.  But equally it's possible to have a person making that assertion.

Maybe helpful is: N-Quads: Extending N-Triples with Context

http://sw.deri.org/2008/07/n-quads/
 

Or,

{
  "actor": "acct:j...@example.org",
  "verb": "give",
  "object": {
    "objectType": "badge",
    "displayName": "World Champions"
  },
  "target": "acct:red...@example.org",
  "reason": {
    "actor": "acct:red...@example.org",
    "verb": "win",
    "object": "http://example.org/world-series"
  }
}

Or,

{
  "actor": "acct:bo...@example.org",
  "verb": "reject",
  "object": "http://example.org/expenses/1",
  "reason": "urn:example:codes:unapproved-expenses"
}

Because we already have the context property defined in the schema
draft, introducing the "reason" property is not strictly necessary but
I believe it would still be beneficial... at least as a standardized
extension to the core vocabulary.

Thoughts?

--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activity-strea...@googlegroups.com.
To post to this group, send email to activity...@googlegroups.com.
Visit this group at http://groups.google.com/group/activity-streams.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages