- From: David Buttler <e003457@popcorn.llnl.gov>
- Date: Fri, 22 Jun 2001 17:47:14 -0700
- To: www-ws@w3.org
Hi, I really appreciate the feedback to my previous question. I hope that my questions are not too simple... I have another question regarding conditions in a DAML-S process (an IF-THEN-ELSE condition or a Repeat-While condition). Since they are specified as a type rather than an instance they seem somewhat vague to me. For instance, if I want to specify which process branch to take based on the type of the output of a process, how does that differ if I want to make the decision based on the value of the output? From the Yahoo example on the DAML-S page: ... <rdfs:Class rdf:ID="TripType"> <daml:oneOf rdf:parseType="daml:collection"> <TripType rdf:ID="RoundTrip"/> <TripType rdf:ID="OneWayTrip"/> </daml:oneOf> </rdfs:Class> <rdf:Property rdf:ID="selectTripType"> <rdfs:subPropertyOf rdf:resource="process:input"/> <rdfs:range rdf:resource="#TripType"/> </rdf:Property> ... <!-- determine the trip is one-way or two-way. --> <rdfs:Class rdf:ID="DetermineTripType"> <rdfs:subClassOf rdf:resource="process:Condition"/> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:about="#DetermineTripTypeInput" /> <daml:hasValue rdf:resource="#OneWayTrip"/> </daml:Restriction> </rdfs:subClassOf> </rdfs:Class> ... <rdfs:Class rdf:ID="BookFlight"> <rdfs:subClassOf rdf:resource="process:CompositeProcess"/> <daml:sameClassAs> <process:Sequence> <daml:item> <rdfs:Class rdfs:about="#LocateAirportCode"/> </daml:item> <daml:item> <process:If-Then-Else> <process:IfCondition> <rdfs:Class rdfs:about="#DetermineTripType"/> </process:IfCondition> <process:ThenCondition> <rdfs:Class rdfs:about="#SearchFlightOneWay"/> </process:ThenCondition> <process:ElseCondition> <rdfs:Class rdfs:about="#SearchFlightTwoWay"/> </process:ElseCondition> </process:If-Then-Else> ... Besides being extremely verbose, it is not quite clear to me if the condition is on a value or on a type. It looks like a value, but an object value rather than a data value. How would the condition be specified over a type? What about a data value (is this equivalent to an object value)? For example, if there are two types: ResultType, and WaitType and I want the process to loop on the Wait type but continue on a Result type, how would this be specified? To me it seems like it should look something like: <rdfs:Class rdf:ID="BookFlight"> <rdfs:subClassOf rdf:resource="process:CompositeProcess"/> <daml:sameClassAs> <process:Sequence> <daml:item> <rdfs:Class rdfs:about="#Request"/> </daml:item> <daml:item> <process:Repeat-Until> <process:UntilCondition> <rdfs:Class rdfs:about="#DetermineResultType"/> </process:UntilCondition> <process:untilProcess> <rdfs:Class rdfs:about="#Request"/> </process:untilProcess> </process:Repeat-Until> </daml:item> </process:Sequence> </daml:sameClassAs> </rdfs:Class> However, I am not sure how DetermineResultType should be defined. Thank you for any light you might shed on this for me, David Buttler
Received on Friday, 22 June 2001 20:47:18 UTC