CongoProcess.owl
type: Ontology
version info: $Id: CongoProcess.owl,v 1.88 2006/01/30 07:52:44 martin Exp $
comment: A B2C bookbuying example of OWL-S (Web Ontology Language for Services; see http://www.daml.org/services/owl-s) usage, illustrating a simple use of the process model. There are several otherowl files that instantiate the other areas of OWL-S (profile, grounding, and service declarations) for this same example. NOTE: This is a sketch; not a complete example. It is designed to illustrate the usage of the process model ontology. The service described here is a fictional book buying (or selling, depending on your perspective) service from www.congo.com. The normal usage scenario for these processes is as follows: they would be published by Congo, but executed by a software agent that wants to buy from Congo. We present two forms of the service. First, there's a one-step form, ExpressCongoBuy, with the service treated as ATOMIC; i.e., no interactions between buying and selling agents are required, apart from invocation of the service and receipt of its outputs by the buyer. Given certain inputs and preconditions, the service provides certain outputs and has specific effects. Second, a full-fledged version of the service is specified, showing its composition from its component services. The full-fledged version of the service, FullCongoBuy, includes an arrangement of subprocesses LocateBook, PutInCart, SignIn, CreateAcct, LoadUserProfile, SpecifyDeliveryDetails, FinalizeBuy each with its own specification of inputs and outputs. Note: Input, output, precondition, and result properties of *composite* processes can, in principle, be automatically generated by tools. Since such tools don't yet exist, they have been manually generated for this example. Original Congo example created by Srini Narayanan (srini@ai.sri.com). Major modifications by Mark Burstein, David Martin, Sheila McIlraith, Srini Narayanan, Terri Payne, Massimo Paolucci. Note: Starting with version 1.0, OWL-S views processes as instances of the Process class rather than as subclasses of it.
imports: time-entry.owl
imports: Service.owl
imports: Process.owl
imports: ProfileHierarchy.owl
imports: swrl.owl

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#16
type: Restriction
on property: shippedTo
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#17
type: Restriction
on property: shippedBook
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#18
type: Restriction
on property: deliveryType
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#19
type: Restriction
on property: packagingType
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#20
type: Restriction
on property: cardNumber
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#21
type: Restriction
on property: cardType
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#22
type: Restriction
on property: cardExpiration
cardinality: 1

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#23
type: Restriction
on property: validity
cardinality: 1

LocateBookOutputType
type: Class
comment: If successful, LocateBook returns an ISBN; otherwise, it returns a FailureNotification.
union of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#30

InStockBook
type: Class
comment: The set of books that are found in stock of Congo.
subclass of: Book

OutOfStockBook
type: Class
comment: The set of books that are NOT found in stock of Congo.
subclass of: Book
disjoint with: InStockBook

hasBook
type: ObjectProperty
comment: Inverse of hasISBN property, i.e. relate an ISBN number to a book.
inverse of: hasISBN

hasAcctID
type: ObjectProperty
comment: An account exists if there is an account ID associated with it.
type: FunctionalProperty
domain: AcctInfo
range: AcctID

NonExistingAcct
type: Class
comment: If there is no account ID for an account then that account simply does not exist
intersection of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#34

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#36
type: Restriction
on property: hasAcctID
max cardinality: 0

Cart
type: Class
comment: The Cart Class, which is simply a list of Books, is used to record books selected by a customer during a shopping session. Various processes like AddToCart, RemoveFromCart, itemInCart?, etc. can be defined using the Cart Class as the structure manipulated. So the output/effect of these processes would manipulate the cart to add, delete items. (These manipulations are not yet specified here.)
intersection of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#37

ExpressCongoBuy
type: AtomicProcess
comment: This is an express "one shot" service for buying a book with Congo. It takes as input a Book ISBN number and the customer's sign-in information, and has the effect of ordering the book if the book is in stock. In this case, the output of the service is a message saying the book is ordered. If the book is not in stock, the output says that the book is out of stock.
has input: ExpressCongoBuyBookISBN
has input: ExpressCongoBuySignInInfo
has input: ExpressCongoBuyCreditCardNumber
has input: ExpressCongoBuyCreditCardType
has input: ExpressCongoBuyCreditCardExpirationDate
has local: ExpressCongoBuyAcctID
has local: ExpressCongoBuyCreditCard
has precondition: hasAcctID(ExpressCongoBuySignInInfo, ExpressCongoBuyAcctID)
has precondition: cardNumber(ExpressCongoBuyCreditCard, ExpressCongoBuyCreditCardNumber) & validity(ExpressCongoBuyCreditCard, Valid)
has output: ExpressCongoBuyOutput
has result: ExpressCongoBuyPositiveResult
has result: ExpressCongoBuyNegativeResult

ExpressCongoBuyAcctID
type: Local
comment: This is a local variable that represents the associated account ID for the given sign-in info. The existence of this value indicates that the sign-in info is valid an account exists.
parameter type: http://www.daml.org/services/owl-s/1.2/CongoProcess.owl#AcctID

ExpressCongoBuyCreditCard
type: Local
comment: This is a local variable that represents the associated credit card for the given card number.
parameter type: http://www.daml.org/services/owl-s/1.2/CongoProcess.owl#CreditCard

hasAcctID(ExpressCongoBuySignInInfo, ExpressCongoBuyAcctID)
type: SWRL-Condition
expression language: SWRL
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#42

cardNumber(ExpressCongoBuyCreditCard, ExpressCongoBuyCreditCardNumber) & validity(ExpressCongoBuyCreditCard, Valid)
type: SWRL-Condition
comment: Typically this condition should also say that given credit card type and expiration date is also correct for the credit card. Those details are left out for this example.
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#44

ExpressCongoBuyPositiveResult
type: Result
comment: If the book is in stock, then the result is that the order was shipped and an appropriate acknowledgment is output.
has result var: ExpressCongoBuyBook
has result var: ExpressCongoBuyShipment
in condition: hasISBN(ExpressCongoBuyBook, ExpressCongoBuyISBN) & InStockBook(ExpressCongoBuyBook)
has effect: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#52
has effect: ExpressCongoOrderShippedEffect

ExpressCongoBuyBook
type: ResultVar
comment: Thee book identified by the given ISBN input
parameter type: http://www.daml.org/services/owl-s/1.2/ProfileHierarchy.owl#Book

ExpressCongoBuyShipment
type: ResultVar
comment: The shipment that gets generated on a successful purchase
parameter type: http://www.daml.org/services/owl-s/1.2/CongoProcess.owl#Shipment

hasISBN(ExpressCongoBuyBook, ExpressCongoBuyISBN) & InStockBook(ExpressCongoBuyBook)
type: SWRL-Condition
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#48

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#52
type: SWRL-Expression
comment: This expression says that the ExpressCongoBuyOutput will be of type OrderShippedAcknowledgment.
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#53

ExpressCongoOrderShippedEffect
type: SWRL-Expression
comment: This expression says that the selected book is shipped to the account
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#55

ExpressCongoBuyNegativeResult
type: Result
comment: If the book is out of stock, then the result is simply that an appropriate acknowledgment is output, indicating that the book is out of stock.
in condition: ExpressCongoBuyBookOutOfStock
has effect: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#64

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#64
type: SWRL-Expression
comment: This expression just says that the value of ExpressCongoBuyOutput will be NotifyBookOutOfStock.
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#65

FullCongoBuy
type: CompositeProcess
comment: This composite process is composed of a sequence that performs an atomic process, LocateBook, and a composite process, CongoBuyBook.
has input: FullCongoBuyBookName
has input: FullCongoBuyCreateAcctInfo
has input: FullCongoBuySignInData
has input: FullCongoBuyCreditCardNumber
has input: FullCongoBuyCreditCardType
has input: FullCongoBuyCreditCardExpirationDate
has input: FullCongoBuyDeliveryAddress
has input: FullCongoBuyPackagingSelection
has input: FullCongoBuyDeliveryTypeSelection
has output: FullCongoBuyCreateAcctOutput
has output: FullCongoBuyOutput
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#67
has result: FullCongoBuyPositiveResult
has result: FullCongoBuyNegativeResult
collapses to: AbstractCongoBuy

FullCongoBuyPositiveResult
type: Result
comment: When the book is in stock, return an instance of OrderShippedAcknowledgment, and the Acct ID (from CongoBuyBookCreateAcctOutput).
has result var: FullCongoBuyShipment
in condition: FullCongoBuyBookInStock
with output: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#95
has effect: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#97
has effect: FullCongoOrderShippedEffect

FullCongoBuyShipment
type: ResultVar
comment: The shipment that gets generated on a successful purchase
parameter type: http://www.daml.org/services/owl-s/1.2/CongoProcess.owl#Shipment

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#97
type: SWRL-Expression
comment: This expression just says that the FullCongoBuyOutput will be of type OrderShippedAcknowledgment.
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#98

FullCongoOrderShippedEffect
type: SWRL-Expression
comment: This expression says that the selected book is shipped to the account. (This expression is not complete yet, it needs to relate the shipment to the located book and user's account. See ExpressCongo for a more complete example)
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#100

FullCongoBuyNegativeResult
type: Result
comment: When the book is out-of-stock, return the value returned by LocateBook (an instance of FailureNotification). FullCongoBuyCreateAcctOutput is left unspecified (it will be a null value).
in condition: FullCongoBuyBookOutOfStock
with output: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#106

CongoBuyBook
type: CompositeProcess
comment: Control structure for CongoBuyBook: Perform composite process BuySequence Perform atomic process SpecifyDeliveryDetails Perform atomic process FinalizeBuy
has input: CongoBuyBookISBN
has input: CongoBuyBookCreateAcctInfo
has input: CongoBuyBookSignInData
has input: CongoBuyBookCreditCardNumber
has input: CongoBuyBookCreditCardType
has input: CongoBuyBookCreditCardExpirationDate
has input: CongoBuyBookDeliveryAddress
has input: CongoBuyBookPackagingSelection
has input: CongoBuyBookDeliveryTypeSelection
has output: CongoBuyBookCreateAcctOutput
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#108
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#130

BuySequence
type: CompositeProcess
comment: BuySequence is a sequence that performs an atomic process PutInCart, followed by a composite process SignInAlternatives, followed by an atomic process SpecifyPaymentMethod.
has input: BuySequenceBookISBN
has input: BuySequenceCreateAcctInfo
has input: BuySequenceSignInData
has input: BuySequenceCreditCardNumber
has input: BuySequenceCreditCardType
has input: BuySequenceCreditCardExpirationDate
has output: BuySequenceAcctID
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#133
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#149

SignInAlternatives
type: CompositeProcess
has input: SignInAlternativesCreateAcctInfo
has input: SignInAlternativesSignInData
has output: SignInAlternativesAcctID
comment: SignInAlternatives is a choice whose components are a composite process CreateAcctSequence and a composite process SignInSequence. In either case, the user's account ID is returned. It's a pre-existing ID in the case of SignInSequence; a new ID in the case of CreateAcctSequence.
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#152
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#159
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#164

hasAcctID(SignInAlternativesSignInData, SignInAlternativesAcctID)
type: SWRL-Condition
comment: If an account already exists, sign-in operation will be performed and returned acct ID willbe used
expression language: SWRL
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#160

SignInAlternativesNoAcctExists
type: SWRL-Condition
comment: If an account does not exist a new account will be create by the CreateAcct process and the ID of new account will be used.
expression language: SWRL
expression object: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#165

SignInSequence
type: CompositeProcess
comment: SignInSequence performs an atomic process SignIn, followed by an atomic process LoadUserProfile.
has input: SignInSequenceSignInInfo
comment: The output is a copy of the account ID from the input.
has output: SignInSequenceAcctID
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#169

CreateAcctSequence
type: CompositeProcess
comment: CreateAcctSequence performs atomic process CreateAcct followed by atomic process LoadUserProfile.
has input: CreateAcctSequenceCreateAcctInfo
has output: CreateAcctSequenceCreateAcctOutput
composed of: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#174
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#179

LocateBook
type: AtomicProcess
comment: If the book described by "bookName" is in Congo's catalogue, then the output of LocateBook is the description of the book and the prices. If the book is not in Congo's catalogues, then the output is a message to this effect.
has input: LocateBookBookName
has output: LocateBookOutput
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#182
has result: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#190

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#182
type: Result
comment: If the book is in stock, then the result is that that the book's ISBN is output.
has result var: LocatedBook
in condition: BookInStock
has effect: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#187

LocatedBook
type: ResultVar
comment: Thee book identified by the given name
parameter type: http://www.daml.org/services/owl-s/1.2/ProfileHierarchy.owl#Book

http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#190
type: Result
comment: If the book is out of stock, then an appropriate notification is returned.
in condition: BookOutOfStock
has effect: http://lodlaundromat.org/.well-known/genid/fd59786b59496d85490564764b3e63c6#195

PutInCart
type: AtomicProcess
comment: A very simple version of the put-in-cart process, in which the cart is a list of books (each item being a book).
has input: PutInCartBookISBN

SignIn
type: AtomicProcess
comment: Sign in is a process that requires input of signin info.
has input: SignInInfo

LoadUserProfile
type: AtomicProcess
comment: LoadUserProfile can only be invoked if a user profile already exists.