Commit febcf10b authored by Rinus Plasmeijer's avatar Rinus Plasmeijer

Heb aan email alle voorbeeldjes mogelijkheid toegevoegd om aan meerdere...

Heb aan email alle voorbeeldjes mogelijkheid toegevoegd om aan meerdere personen de email te sturen via een cc.
Kwam het volgende tegen:
- Een group in de context van parallel wordt soms behandeld als een parallel (bij de manager);
- De manager ziet momenteel wel heel erg veel: alle subtaken die iemand doet. Dat geeft wel heel veel detail informatie.
Is het niet beter alleen de hoofdtaken te laten zien?

Groetjes,

Rinus


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@942 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent b85e07a6
......@@ -15,7 +15,7 @@ import ExceptionHandling
//Miscellaneous examples
import SmallExamples
import GUIDemo
import BugReport
//import BugReport
import Coffeemachine
import Newsgroups
import ChangeHandling
......@@ -47,7 +47,7 @@ where
, reviewTaskExample
, smallExamples
, guiDemoExample
, bugReportExample
// , bugReportExample
, coffeemachineExample
, textEditor
, newsgroupsExample
......
......@@ -3,6 +3,8 @@ implementation module FlowData
import iTasks, TaskContainer
from FormFlowStorage import findValue, findFlow
// import get_dictionary
derive gPrint Flow, FlowShape, AssignInfo, CleanExpr
derive gParse Flow, FlowShape, AssignInfo, CleanExpr
......
......@@ -117,6 +117,7 @@ where
// mail handling, to be put in sepparate icl file
:: EMail = { to :: !UserName
, cc :: ![UserName]
, subject :: !String
, message :: !Note
, attachements :: ![Document]
......@@ -149,30 +150,34 @@ internalEmail :: (Task EMail)
internalEmail
= enterInformation "Type your email message ..."
>>= \msg -> getCurrentUser
>>= \me -> spawnProcess msg.to True
(showMessageAbout ("You have received the following message from " <+++ me.displayName) msg <<@ msg.EMail.subject)
>>= \me -> allProc [{user = who, task = spawnProcess msg.to True (mailMess me msg) <<@ msg.EMail.subject} \\ who <- [msg.to:msg.cc]] Closed
>>| return msg
mailMess :: User EMail -> Task Void
mailMess me msg = showMessageAbout ("Mail from " <+++ me.displayName <+++ ":") msg
internalEmailConf :: (Task EMail)
internalEmailConf
= enterInformation "Type your email message ..."
>>= \msg -> getCurrentUser
>>= \me -> msg.to @: (msg.EMail.subject, showMessageAbout ("You have received the following message from " <+++ me.displayName) msg)
>>| showMessage ("Your mail has been read by " <+++ getUserName msg.to)
>>= \me -> allProc [{user = who, task = mailMess me msg <<@ msg.EMail.subject} \\ who <- [msg.to:msg.cc]] Closed
>>| return msg
getUserName (UserName id name) = name
getUserId (UserName id name) = id
internalEmailReply :: (Task (EMail,Reply)) // crashes ?? group
internalEmailReply :: (Task (EMail,[Reply]))
internalEmailReply
= enterInformation "Type your email message ..."
>>= \msg -> getCurrentUser
>>= \me -> msg.to @: (msg.EMail.subject, (showStickyMessageAbout ("You have received the following message from " <+++ me.displayName) msg
||-
enterInformation "The sender requested a reply..."))
>>= \reply-> showMessageAbout ("Your mail has been read by " <+++ getUserName msg.to) reply
>>| return (msg,reply)
>>= \me -> allProc [{user = who, task = mailMess2 me msg <<@ msg.EMail.subject} \\ who <- [msg.to:msg.cc]] Closed
>>= \reply -> return (msg,reply)
mailMess2 :: User EMail -> Task Reply
mailMess2 me msg = (showStickyMessageAbout ("Mail from " <+++ me.displayName <+++ ":") msg
||-
enterInformation "The sender requested a reply...")
<<@ msg.EMail.subject
// newsgroup handling
......
......@@ -117,13 +117,13 @@ where
anyProc :: ![AssignedTask a] !TaskParallelType -> Task a | iTask a
anyProc [] type = getDefaultValue
anyProc tasks type = parallel type "any" "Done if any subtask is finished." anyfunc hd [] tasks
anyProc tasks type = parallel type "any" "Done when any subtask is finished." anyfunc hd [] tasks
where
anyfunc (val,_) [] = ([val],Stop)
anyfunc (val,_) _ = abort "Multiple results in ANY"
allProc :: ![AssignedTask a] !TaskParallelType -> Task [a] | iTask a
allProc tasks type = parallel type "all" "Done if all subtasks are finished." (allfunc (length tasks)) sortByIndex [] tasks
allProc tasks type = parallel type "all" "Done when all subtasks are finished." (allfunc (length tasks)) sortByIndex [] tasks
where
allfunc tlen (val,idx) st
# st = st ++ [(idx,val)]
......
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