w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
279 stars 61 forks source link

Result predicate inconsistently described or applied #430

Closed azaroth42 closed 1 year ago

azaroth42 commented 6 years ago

Please Indicate One:

Please Describe the Issue:

The definition of result says:

Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource. [source]

However the example given for the Create activity uses object to reference the newly created resource.

See: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create

result is not used in any of the defined activity types, and the definition implies it should be used where it isn't.

Suggested Remediation

Deprecate result or better define when it should be used.

gobengo commented 6 years ago

"Create" activities, once processed, could also have a corresponding result whose value is a Link to any resources that were created as a result of processing the Create activity.

object and result, in that case, would have very similar values, but the object is like input data. If taking in that object results in saving it somewhere that results in a new resource/uri being created, then include that newly resultant resource/uri in result.

Deprecate result or better define when it should be used.

I don't think there's reason to deprecate it. It is sufficiently defined when it should be used, it's just a bit rarer of a use case than the object of an Activity.

evanp commented 6 years ago

Example 148 has a much better result example.

evanp commented 1 year ago

I've captured this information on the Primer in the W3C wiki. Here's the text:

The result property definition says it "[d]escribes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource."

However, the result of a "Create" activity is typically represented in the "object" property.

Other examples in the Vocabulary document show "result" properties as by-products or indirect results of the activity. For example, the "Accept" activity in example 148 shows a list of additional activities that resulted from the acceptance.

In general, the "object" property should be used for Create, and the "result" property should be used for changes of state or indirect outcomes from an activity.