mService.owl
type: Ontology
imports: InheritanceProfile.owl
imports: BravoAirService.owl
version info: $Id: BravoAirProcess.owl,v 1.48 2005/02/03 22:43:43 martin Exp $
comment: OWL-S Coalition: BravoAir Example for OWL-S Process Model
imports: Service.owl
imports: Process.owl
imports: Profile.owl
imports: Concepts.owl
imports: ObjectList.owl

Specification
adopt service model: BravoAir Process
leave out groundings: false
contains altering: Renaming
  old ID: BravoAir_Process
  new ID: m

This is the top level process for BravoAir
type: CompositeProcess
comment: BravoAir_Process is a composite process. It is composed of a sequence whose components are 2 atomic processes, GetDesiredFlightDetails and SelectAvailableFlight, and a composite process, BookFlight.
invocable: true
has input: DepartureAirport
has input: ArrivalAirport
has input: OutboundDate
has input: InboundDate
has input: RoundTrip
has input: AcctName
has input: Password
has input: Confirm
has output: FlightsFound
has output: PreferredFlightItinerary
has output: ReservationID
has result: HaveSeatResult
composed of: Sequence
  components: ControlConstructList
    first: PerformGetDesiredFlightDetails
    rest: ControlConstructList
      first: PerformSelectAvailableFlight
      rest: ControlConstructList
        first: PerformBookFlight
        rest: nil

HaveSeatResult
type: Result
in condition: Always True
with output: OutputBinding
  to param: FlightsFound
  value source: ValueOf
    the var: GetDesiredFlightDetails FlightsFound
    from process: PerformGetDesiredFlightDetails
with output: OutputBinding
  to param: PreferredFlightItinerary
  value source: ValueOf
    the var: BookFlight PreferredFlightItinerary
    from process: PerformBookFlight
with output: OutputBinding
  to param: ReservationID
  value source: ValueOf
    the var: BookFlight ReservationID
    from process: PerformBookFlight
has effect: SWRL-Condition
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="#hasFlightItinerary"></swrl:propertyPredicate> <swrl:argument1 rdf:resource="http://www.daml.org/services/owl-s/1.1/Process.owl#TheClient"></swrl:argument1> <swrl:argument2 rdf:resource="#PreferredFlightItinerary"></swrl:argument2> </swrl:IndividualPropertyAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>

BookFlight (Composite)
type: CompositeProcess
comment: Log into account and confirm reservation It is composed of a sequence whose components are 2 atomic processes, LogIn and ConfirmReservation.
has input: BookFlight AcctName
has input: BookFlight Password
has input: BookFlight SelectedFlight
has output: BookFlight PreferredFlightItinerary
has output: BookFlight ReservationID
has result: Result
  in condition: Always True
  with output: OutputBinding
    to param: BookFlight PreferredFlightItinerary
    value source: ValueOf
      the var: CompleteReservation PreferredFlightItinerary
      from process: PerformCompleteReservation
  with output: OutputBinding
    to param: BookFlight ReservationID
    value source: ValueOf
      the var: CompleteReservation ReservationID
      from process: PerformCompleteReservation
invocable: true
composed of: Sequence
  components: ControlConstructList
    first: PerformLogin
    rest: ControlConstructList
      first: PerformCompleteReservation
      rest: nil

CompleteReservation (Composite)
type: CompositeProcess
comment: Check whether the login succeeded This if-statement is used to verify whether the user is logged in.
has input: CompleteReservation AcctName
has input: CompleteReservation SelectedFlight
has output: CompleteReservation PreferredFlightItinerary
has output: CompleteReservation ReservationID
has result: Result
  in condition: Always True
  with output: OutputBinding
    to param: CompleteReservation PreferredFlightItinerary
    value source: ValueOf
      the var: ConfirmReservation PreferredFlightItinerary
      from process: PerformConfirmReservation
  with output: OutputBinding
    to param: CompleteReservation ReservationID
    value source: ValueOf
      the var: ConfirmReservation ReservationID
      from process: PerformConfirmReservation
invocable: true
composed of: If-Then-Else
  if condition: LoggedIn(AcctName)
    type: SWRL-Condition
    comment: This condition will be true if the previous PerformLogIn operation was succesful
    expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:ClassAtom> <swrl:classPredicate rdf:resource="#LoggedIn"></swrl:classPredicate> <swrl:argument1 rdf:resource="#CompleteReservation_AcctName"></swrl:argument1> </swrl:ClassAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>
  then: PerformConfirmReservation

GetDesiredFlightDetails
type: AtomicProcess
comment: Get details such as airports, prefered time, roundtrip etc
has input: GetDesiredFlightDetails DepartureAirport
has input: GetDesiredFlightDetails ArrivalAirport
has input: GetDesiredFlightDetails OutboundDate
has input: GetDesiredFlightDetails InboundDate
has input: GetDesiredFlightDetails RoundTrip
has output: GetDesiredFlightDetails FlightsFound

SelectAvailableFlight (ATOMIC)
type: AtomicProcess
comment: Get users prefered flight choice from available itineraries
has input: SelectAvailableFlight FlightsAvailable
has output: SelectAvailableFlight SelectedFlight

LoggedIn
type: Class
comment: A simple class to indicate that the user has logged into an account. If an AcctName instance belongs to this class it means that the user has logged in to the account with the correct password. Invoking LogIn process may result in this situtation. Normally, the account would become NotLoggedIn after a period of time but it is not reflected in this simple description
subclass of: AcctName

NotLoggedIn
type: Class
comment: The complement of being logged in. If an incorrect password is supplied for an account name that account would be in the state of NotLoggedIn to indicate failure.
complement of: LoggedIn

LogIn (ATOMIC)
type: AtomicProcess
comment: LogIn process accepts two inputs AcctName and PassWord and returns a boolean value to indicate if the login operation succeeded or not.
has input: LogIn AcctName
has input: LogIn Password
has output: LogIn Output
has result: LogIn Succeeded Result
has result: LogIn Failed Result

LogIn Succeeded Result
type: Result
comment: This result simply says that when the correct password has been supplied for the given account name then the service returns the xsd:boolean value true and the user is logged in to the system as the effect of invoking this service.
with output: OutputBinding
  to param: LogIn Output
  value data: true
in condition: hasPassword(AcctName, Password)
  type: SWRL-Condition
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="#hasPassword"></swrl:propertyPredicate> <swrl:argument1 rdf:resource="#LogIn_AcctName"></swrl:argument1> <swrl:argument2 rdf:resource="#LogIn_Password"></swrl:argument2> </swrl:IndividualPropertyAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>
has effect: LoggedIn(AcctName)
  type: SWRL-Condition
  comment: If the correct account name, password pair is supplied then the given account name will be logged in as the effect of this operation
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:ClassAtom> <swrl:classPredicate rdf:resource="#LoggedIn"></swrl:classPredicate> <swrl:argument1 rdf:resource="#LogIn_AcctName"></swrl:argument1> </swrl:ClassAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>

LogIn Failed Result
type: Result
comment: This result simply says that when given password was not correct for the account and as a result the account is in NotLoggedIn state. Note that, there is a a result variable defined Correct_Password to stand for the correct password for the given account. The client does not need to know the exact value of the correct password to evaluate/validate the inCondition. When the service returns xsd:boolean value false, the client should infer that there exists another Password instance (this could be represented as a bnode) which is different from the given input value LogIn_Password.
has result var: Correct Password
with output: OutputBinding
  to param: LogIn Output
  value data: false
in condition: SWRL-Condition
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="#hasPassword"></swrl:propertyPredicate> <swrl:argument1 rdf:resource="#LogIn_AcctName"></swrl:argument1> <swrl:argument2 rdf:resource="#Correct_Password"></swrl:argument2> </swrl:IndividualPropertyAtom> </rdf:first> <rdf:rest> <swrl:AtomList> <rdf:first> <swrl:DifferentIndividualsAtom> <swrl:argument1 rdf:resource="#Correct_Password"></swrl:argument1> <swrl:argument2 rdf:resource="#LogIn_Password"></swrl:argument2> </swrl:DifferentIndividualsAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList> </rdf:rest> </swrl:AtomList>
has effect: NotLoggedIn(AcctName)
  type: SWRL-Condition
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:ClassAtom> <swrl:classPredicate rdf:resource="#NotLoggedIn"></swrl:classPredicate> <swrl:argument1 rdf:resource="#LogIn_AcctName"></swrl:argument1> </swrl:ClassAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>

ConfirmReservation (ATOMIC)
type: AtomicProcess
comment: Confirm selected reservation
has input: ConfirmReservation SelectedFlight
has input: ConfirmReservation Confirm
has output: ConfirmReservation PreferredFlightItinerary
has output: ConfirmReservation ReservationID
has result: ConfirmReservation HaveSeatResult

ConfirmReservation HaveSeatResult
type: Result
in condition: Always True
has effect: SWRL-Condition
  expression body: <swrl:AtomList xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="#hasFlightItinerary"></swrl:propertyPredicate> <swrl:argument1 rdf:resource="http://www.daml.org/services/owl-s/1.1/Process.owl#TheClient"></swrl:argument1> <swrl:argument2 rdf:resource="#ConfirmReservation_PreferredFlightItinerary"></swrl:argument2> </swrl:IndividualPropertyAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"></rdf:rest> </swrl:AtomList>

Always True
type: SWRL-Condition
comment: An empty AtomList always evaluates to true. Note that this is not equivalent to specifiying no precondition. Due to open-world semantics of OWL, it would not be possible to distinguish having no precondition from not knowing the precondition. We would need to specify a cardinality 0 restriction on precondition property to indicate that there is no precondition which would be also valid.
expression language: SWRL
expression body: <swrl:AtomList rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" xmlns:swrl="http://www.w3.org/2003/11/swrl#"></swrl:AtomList>