Commit 21230095 authored by Bas Lijnse's avatar Bas Lijnse
Browse files

Migrated the shop example

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/branches/fancyTasks@501 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 73e0b4dd
......@@ -11,6 +11,7 @@ import TravelBooking
import Coffeemachine
import Newsgroups
import ExceptionHandling
import WebShop
Start :: *World -> *World
Start world = startEngine workflows world
......@@ -21,4 +22,5 @@ where
, coffeemachineExample
, newsgroupsExample
, exceptionHandlingExample
, webShopExample
]
\ No newline at end of file
definition module ExceptionHandling
import iTasks
exceptionHandlingExample :: [Workflow]
\ No newline at end of file
definition module WebShop
import iTasks
webShopExample :: [Workflow]
\ No newline at end of file
module shop
implementation module WebShop
import StdClass, StdList
from StdFunc import o, flip
import iTasks, iDataTrivial
import StdListExt, database, iTaskCombinatorsExt, ShopDSL
Start :: *World -> *World
Start world = startEngine flows world
where
flows = [ { name = "Examples/Shop/Manage catalog"
, label = "Manage catalog"
, roles = []
, mainTask = manageCatalog defaultProduct catalogPrompt #>> return Void
}
, { name = "Examples/Shop/Browse shop"
, label = "Browse shop"
, roles = []
, mainTask = browseShop defaultCart shopPrompt cartPrompt
}
]
webShopExample :: [Workflow]
webShopExample
= [ { name = "Examples/Miscellaneous/Webshop/Manage catalog"
, label = "Manage catalog"
, roles = []
, mainTask = manageCatalog defaultProduct catalogPrompt #>> return Void
}
, { name = "Examples/Miscellaneous/Webshop/Browse shop"
, label = "Browse shop"
, roles = []
, mainTask = browseShop defaultCart shopPrompt cartPrompt
}
]
shopPrompt = ruleText "Welcome to My Shop"
cartPrompt = ruleText "My Shop Shopping Cart"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment