Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
1a1f5173
Commit
1a1f5173
authored
Oct 31, 2006
by
Rinus Plasmeijer
Browse files
*** empty log message ***
parent
ab4bee7b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
libraries/htmlGEC/Examples/Conf Management System/ConfManager.prj
View file @
1a1f5173
This diff is collapsed.
Click to expand it.
libraries/htmlGEC/Examples/Simple Workflows/workflowExamples.icl
View file @
1a1f5173
...
...
@@ -24,15 +24,36 @@ where
twotasks2
tst
#
((
tboss
,
tsecr
),
tst
)
=
mkLTaskRTC2
"name"
25
tst
// split name task
#
((
tboss
,
tsecr
),
tst
)
=
mkLTaskRTC2
"name"
0
tst
// split name task
=
PTasks
[(
"
employee1
"
,
tsecr
)
// assign name task
,(
"boss"
,
STask
"
ervoor"
0
`
bind`
\
bi
->
tboss
(
STask
"DoIt"
bi
)
`
bind`
\
si
->
STask
"
erna"
si
[(
"
secretary
"
,
tsecr
)
// assign name task
,(
"boss"
,
STask
"
Choose"
Easy
`
bind`
\
situation
->
tboss
(
handle
situation
)
`
bind`
\
result
->
STask
"
accept"
result
)
]
tst
where
handle
Easy
tst
#
tst
=
returnF
[
Txt
(
"Handle easy case"
)]
tst
=
STask
"Damage"
0
tst
handle
(
Difficult
upperbound
)
tst
#
tst
=
returnF
[
Txt
(
"Handle difficult case with limit "
+++
(
toString
upperbound
)
+++
" Euro's"
)]
tst
=
checktask
upperbound
tst
where
checktask
limit
tst
#
(
amount
,
tst
)
=
STask
"Damage"
0
tst
|
amount
>
limit
#
tst
=
returnF
[
Txt
(
"amount "
+++
toString
amount
+++
" exceeds limit set"
)]
tst
=
mkTask
(
checktask
limit
)
tst
=
returnTask
amount
tst
::
Situation
=
Difficult
Int
|
Easy
derive
gForm
Situation
derive
gUpd
Situation
derive
gParse
Situation
derive
gPrint
Situation
derive
gerda
Situation
::
RecForm
=
{
name
::
String
,
number
::
Int
}
...
...
libraries/htmlGEC/htmlTask.icl
View file @
1a1f5173
...
...
@@ -51,17 +51,20 @@ where
#
(
boss
,
hst
)
=
mkStoreForm
(
Init
,
sFormId
(
"bossStore"
<+++
mkTaskNr
j
)
initBoss
)
settask
hst
#
(
bdone
,
encbtask
)
=
boss
.
value
#
btask
=
case
string_to_dynamic`
encbtask
of
(
mytask
::
Task
a
^
)
->
mytask
_
->
STask
"Default2"
a
(
mytask
::
*
TSt
->
*(
a
^,*
TSt
)
)
->
mytask
_
->
STask
"Default2"
a
=
({
boss
&
value
=
(
bdone
,
btask
)},
hst
)
where
initBoss
=
(
False
,
dynamic_to_string
(
dynamic
defaulttask
))
settask
=
if
set
(\_
->
(
True
,
dynamic_to_string
(
dynamic
task
)))
id
initBoss
=
(
False
,
convertTask
defaulttask
)
settask
=
if
set
(\_
->
(
True
,
convertTask
task
))
id
convertTask
task
=
dynamic_to_string
(
dynamic
task
::*
TSt
->
*(
a
^,*
TSt
))
string_to_dynamic`
s
=
string_to_dynamic
(
{
s`
\\
s`
<-:
s
})
defaulttask
=
STask
"Default"
a
::
*
TSt
:==
(([
Int
],
Bool
,[
BodyTag
]),
HSt
)
// Task State: task nr, has this task to be done?, html code accumulator
::
Niks
=
Niks
// to make an empty task
...
...
@@ -316,4 +319,38 @@ where
#
(_,((
i
,
adone
,
ahtml
),
hst
))
=
STask
"Done"
Niks
((
i
,
True
,[]),
hst
)
=
(
idata
.
value
,((
i
,
adone
,
html
<|.|>
if
adone
idata
.
form
(
idata
.
form
<|.|>
ahtml
)),
hst
))
// debugging code
print_graph
::
!
a
->
Bool
;
print_graph
a
=
code {
.d
1
0
jsr
_print_graph
.o
0
0
pushB
TRUE
}
my_dynamic_to_string
::
!
Dynamic
->
{#
Char
};
my_dynamic_to_string
d
|
not
(
print_graph
d
)
=
abort
""
#!
s
=
dynamic_to_string
d
;
|
not
(
print_graph
(
tohexstring
s
))
=
abort
""
#
d2
=
string_to_dynamic
{
c
\\
c
<-:
s
};
|
not
(
print_graph
d2
)
=
abort
""
=
s
;
tohexstring
::
{#
Char
}
->
{#
Char
};
tohexstring
s
=
{
tohexchar
s
i
\\
i
<-[
0
..
2
*
size
s
-1
]};
tohexchar
::
{#
Char
}
Int
->
Char
;
tohexchar
s
i
#
c
=((
toInt
s
.[
i
>>
1
])
>>
((
1
-(
i
bitand
1
))<<
2
))
bitand
15
;
|
c
<
10
=
toChar
(
48
+
c
);
=
toChar
(
55
+
c
);
//K:: !x y -> y | iData, TC y
K
x
y
=
y
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment