[Oslc-Automation] Synchronous execution

Martin P Pain martinpain at uk.ibm.com
Thu May 23 12:29:39 EDT 2013


Synchronous execution was mentioned in today's meeting. I read through 
that section of the spec recently, to see if it would be useful in the 
emails I was writing. My interpretation of what the spec says is different 
from what people seemed to be saying in the meeting today.

The spec says "When a provider creates an automation request, it can also 
include an automation result, which might or might not yet be finished at 
the point in time when the provider responds to the create request". To me 
this sounds like "when a consumer POSTs a new automation request to a 
creation factory, the HTTP RDF response can contain a description of the 
automation result in addition to the description of the automation 
request".

In the call it was mentioned that the request and result can be the same 
resource. While this is not incompatible with what is said in the spec, 
and would certainly fulfil the sentence above, it is not exactly what is 
said. (I was aware of the possibility of the same resource being of both 
types when I first read the spec, but dismissed it as it is not mentioned 
explicitly.)

For example, it sounds like the HTTP response could be:
<rdf:RDF>
<oslc_auto:AutomationRequest rdf:about="http://example.com/autoRequests/1
">
    ...
</oslc_auto:AutomationRequest>
<oslc_auto:AutomationResult rdf:about="http://example.com/autoResults/1">
    <oslc_auto:producedByAutomationRequest
        rdf:resource="http://example.com/autoRequests/1" />
    ...
</oslc_auto:AutomationResult>
</rdf:RDF>


Is this as intended?

Secondly, if the response is of the form mentioned in the meeting today 
(where the request and result are the same resource):
<rdf:RDF>
<rdf:Description rdf:about="http://example.com/autoResources/1">
    <rdf:rtpe rdf:resource="oslc_auto:AutomationRequest"/>
    <rdf:rtpe rdf:resource="oslc_auto:AutomationResult"/>
    <oslc_auto:producedByAutomationRequest
        rdf:resource="http://example.com/autoResources/1" />
    <oslc_auto:state rdf:resource="oslc_auto:complete" />
    ...
</rdf:Description>
</rdf:RDF>

If the state is "complete" straight away (i.e. the action was synchronous) 
then am I correct in interpreting that the URI of that resource never 
needs to be able to return it? i.e. it can always return a 404? (Because 
before the HTTP response is returned the consumer is not aware of the URI 
so cannot look it up before the result has completed, at which time the 
provider is free to delete it?)

If that is true, then is the URI still needed in the RDF in order to have 
a value to set for the oslc_auto:producedByAutomationRequest property, or 
if an automation request also has an rdf:type property set to 
oslc_auto:AutomationResult, is it valid to assume that that is the result 
for that request? (I can't see it being any other result, but the spec 
doesn't define that explicitly.)

Either way, I think it might be useful to explicitly mention the situation 
where the request and response are the same resource, and probably include 
an example too.

If my understanding is correct and there is agreement on making this more 
explicit, then I can submit a proposed rewording (perhaps just for v3 - 
but if it was the intention for v2 then we may or may not want to change 
it there too - what do you think?)

Martin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://open-services.net/pipermail/oslc-automation_open-services.net/attachments/20130523/0390f8ee/attachment.html>


More information about the Oslc-Automation mailing list