Commit dda68fb7 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer

*** empty log message ***


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@137 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent a882c75b
......@@ -66,13 +66,19 @@ instance @>> SubPage // default: the *whole* page will be updated when a
singleUserTask :: iTask start function for defining tasks for one, single user
multiUserTask :: iTask start function for multi-users, with option in window to switch between [0..users - 1]
workFlowTask :: iTask start function for a real workflow, expects a login task and the actual task
workFlowTask :: iTask start function for a real workflow
- the first arument has to be an itask which is used for login purposes; it should yield
Bool: True, is the user a new one: if so the second argument is spawned as a separate task for that user
UserId: the id of that user
- the second argument is workflow that will spawned as a task
(True if we have new user,user id of the user, has ) :
- the second one is the actual function for that user
a predefined login task is defined in iTaskLogin.dcl
*/
singleUserTask :: ![StartUpOptions] !(Task a) !*HSt -> (!Bool,Html,*HSt) | iData a
multiUserTask :: ![StartUpOptions] !(Task a) !*HSt -> (!Bool,Html,*HSt) | iData a
workFlowTask :: ![StartUpOptions] !(Task (Bool,UserId,a))
!((Bool,UserId,a) -> Task b)!*HSt -> (!Bool,Html,*HSt) | iData b
workFlowTask :: ![StartUpOptions] !(Task ((Bool,UserId),a))
!(UserId a -> LabeledTask b) !*HSt -> (!Bool,Html,*HSt) | iData b
:: StartUpOptions = TraceOn | TraceOff // for single & multiUser: default = TraceOn
| ThreadStorage Lifespan // for Ajax: where to store threadinformation: default = TxtFile
......
......@@ -232,11 +232,11 @@ multiUserTask startUpOptions maintask hst
(if userOptions.traceOn (idform.changed,idform.form) (False,[])) userOptions maintask tst
= mkHtmlExcep "multiUser" exception html hst
workFlowTask :: ![StartUpOptions] !(Task (Bool,UserId,a)) !((Bool,UserId,a) -> Task b) !*HSt -> (!Bool,Html,*HSt) | iData b
workFlowTask startUpOptions taska iataskb hst
workFlowTask :: ![StartUpOptions] !(Task ((Bool,UserId),a)) !(UserId a -> LabeledTask b) !*HSt -> (!Bool,Html,*HSt) | iData b
workFlowTask startUpOptions taska userTask hst
# userOptions = determineUserOptions startUpOptions
# tst = initTst -1 userOptions.threadStorageLoc hst
# ((new,i,a),tst=:{activated,html,hst}) = taska tst // for doing the login
# (((new,i),a),tst=:{activated,html,hst}) = taska tst // for doing the login
| not activated
# iTaskHeader = [showHighLight "i-Task", showLabel " - Multi-User Workflow System ",Hr []]
# iTaskInfo = mkDiv "iTaskInfo" [showText "Login procedure... ", Hr []]
......@@ -244,7 +244,7 @@ workFlowTask startUpOptions taska iataskb hst
]] hst
# userOptions = determineUserOptions [TestModeOff, VersionCheck, ThreadStorage TxtFile:startUpOptions]
# tst = initTst i userOptions.threadStorageLoc hst
# (exception,body,hst) = startTstTask i True (False,[]) userOptions (iataskb (new,i,a)) tst
# (exception,body,hst) = startTstTask i True (False,[]) userOptions (newUserTask ((new,i),a) <<@ TxtFile) tst
= mkHtmlExcep "workFlow" exception body hst
where
noFilter :: HtmlTree -> HtmlCode
......@@ -255,6 +255,10 @@ where
noFilter (htmlL +|+ htmlR) = noFilter htmlL <|.|> noFilter htmlR
noFilter (DivCode str html) = noFilter html
newUserTask ((True,i),a) = (spawnWorkflow i True (userTask i a)) =>> \_ -> return_V Void
newUserTask _ = return_V Void
/*
workFlowTask :: ![StartUpOptions] !(Task (UserId,a)) !((UserId,a) -> Task b) !*HSt -> (!Bool,Html,*HSt) | iData b
workFlowTask startUpOptions taska iataskb hst
......
......@@ -16,9 +16,6 @@ mkDBid :: create a typed database identificator
only Database and TxtFile are currently supported
readDB :: read the database
writeDB :: write the database
readDB2 :: read the database, each and everytime the application is evaluated
dangerous: not referential transparent, only use it if you know what you are doing !
*/
mkDBid :: String Lifespan -> (DBid a)
......@@ -26,4 +23,3 @@ mkDBid :: String Lifespan -> (DBid a)
readDB :: (DBid a) -> Task a | iData a
writeDB :: (DBid a) a -> Task a | iData a
readDB2 :: (DBid a) -> Task a | iData a
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