Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
df85b918
Commit
df85b918
authored
Sep 16, 2019
by
Mart Lubbers
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve on UI handling in steps
parent
bc3b83a1
Pipeline
#29673
passed with stage
in 4 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
29 deletions
+18
-29
Libraries/iTasks/WF/Combinators/Core.icl
Libraries/iTasks/WF/Combinators/Core.icl
+18
-29
No files found.
Libraries/iTasks/WF/Combinators/Core.icl
View file @
df85b918
...
@@ -119,12 +119,10 @@ where
...
@@ -119,12 +119,10 @@ where
(
ExceptionResult
e
,
iworld
)
=
(
ExceptionResult
e
,
iworld
)
(
ExceptionResult
e
,
iworld
)
=
(
ExceptionResult
e
,
iworld
)
(
ValueResult
_
_
_
_,
iworld
)
=
(
ExceptionResult
(
exception
"Failed destroying lhs in step"
),
iworld
)
(
ValueResult
_
_
_
_,
iworld
)
=
(
ExceptionResult
(
exception
"Failed destroying lhs in step"
),
iworld
)
//Execute lhs
//Execute lhs
evalleft
(
Task
lhs
)
prevEnabledActions
leftTaskId
event
evalOpts
=:{
lastEval
,
taskId
=
taskId
=:(
TaskId
ino
tano
)}
iworld
evalleft
lhs
prevEnabledActions
leftTaskId
event
evalOpts
=:{
lastEval
,
taskId
=
taskId
=:(
TaskId
ino
tano
)}
iworld
#
mbAction
=
matchAction
taskId
event
=
case
(
unTask
lhs
)
event
{
TaskEvalOpts
|
evalOpts
&
taskId
=
leftTaskId
}
iworld
of
#
(
res
,
iworld
)
=
lhs
event
{
TaskEvalOpts
|
evalOpts
&
taskId
=
leftTaskId
}
iworld
(
ValueResult
val
info
rep
lhs
,
iworld
)
// Right is a step
#
mbAction
=
matchAction
taskId
event
#
(
mbCont
,
iworld
)
=
case
res
of
ValueResult
val
info
rep
lhs
=
case
searchContValue
val
mbAction
conts
of
=
case
searchContValue
val
mbAction
conts
of
//No match
//No match
Nothing
Nothing
...
@@ -133,32 +131,23 @@ where
...
@@ -133,32 +131,23 @@ where
#
actions
=
contActions
taskId
val
conts
#
actions
=
contActions
taskId
val
conts
#
curEnabledActions
=
[
actionId
action
\\
action
<-
actions
|
isEnabled
action
]
#
curEnabledActions
=
[
actionId
action
\\
action
<-
actions
|
isEnabled
action
]
#
sl
=
wrapStepUI
taskId
evalOpts
event
actions
prevEnabledActions
val
rep
#
sl
=
wrapStepUI
taskId
evalOpts
event
actions
prevEnabledActions
val
rep
=
(
Left
(
ValueResult
=
(
ValueResult
value
info
sl
(
Task
(
evalleft
lhs
curEnabledActions
leftTaskId
))
value
,
iworld
)
info
sl
(
Task
(
evalleft
lhs
curEnabledActions
leftTaskId
))
)
,
iworld
)
//A match
//A match
Just
rewrite
Just
(_,
rewrite
,
_)
//Send a destroyevent to the lhs
//Send a destroyevent to the lhs
#
(_,
iworld
)
=
(
unTask
lhs
)
DestroyEvent
{
TaskEvalOpts
|
evalOpts
&
taskId
=
leftTaskId
}
iworld
#
(_,
iworld
)
=
(
unTask
lhs
)
DestroyEvent
{
TaskEvalOpts
|
evalOpts
&
taskId
=
leftTaskId
}
iworld
=
(
Right
(
rewrite
,
info
.
TaskEvalInfo
.
lastEvent
,
info
.
TaskEvalInfo
.
removedTasks
),
iworld
)
#
info
=
{
TaskEvalInfo
|
lastEvent
=
info
.
TaskEvalInfo
.
lastEvent
,
removedTasks
=
info
.
TaskEvalInfo
.
removedTasks
}
ExceptionResult
e
//Continue with the rhs and force the first event to be a Reset, it would've been the queued refresh
=
(
ValueResult
NoValue
info
rep
(
Task
(\_->(
unTask
rewrite
)
ResetEvent
))
,
queueEvent
ino
(
RefreshEvent
('
DS
'.
singleton
taskId
)
"step"
)
iworld
)
(
ExceptionResult
e
,
iworld
)
=
case
searchContException
e
conts
of
=
case
searchContException
e
conts
of
//No match
//No match, re-throw exception
Nothing
=
(
Left
(
ExceptionResult
e
),
iworld
)
Nothing
=
(
ExceptionResult
e
,
iworld
)
//A match
//A match, rewrite
Just
rewrite
=
(
Right
(
rewrite
,
lastEval
,
[]),
iworld
)
Just
(_,
rewrite
,
_)
=
case
mbCont
of
=
(
ValueResult
NoValue
(
mkTaskEvalInfo
lastEval
)
NoChange
rewrite
,
iworld
)
//No match, just pass through
Left
res
=
(
res
,
iworld
)
//A match, continue with the matched rhs
Right
((_,
(
Task
rhs
),
_),
lastEval
,
removedTasks
)
#
info
=
{
TaskEvalInfo
|
lastEvent
=
lastEval
,
removedTasks
=
removedTasks
}
=
(
ValueResult
NoValue
info
NoChange
(
Task
(\_->
rhs
ResetEvent
))
,
queueEvent
ino
(
RefreshEvent
('
DS
'.
singleton
taskId
)
"step"
)
iworld
)
wrapStepUI
taskId
evalOpts
event
actions
prevEnabled
val
change
wrapStepUI
taskId
evalOpts
event
actions
prevEnabled
val
change
|
actionUIs
=:
[]
|
actionUIs
=:
[]
...
@@ -167,7 +156,7 @@ where
...
@@ -167,7 +156,7 @@ where
=
ReplaceUI
(
UI
type
(
addClassAttr
"step"
attributes
)
items
)
=
ReplaceUI
(
UI
type
(
addClassAttr
"step"
attributes
)
items
)
_
_
=
change
=
change
|
otherwise
//Wrap in a container
|
otherwise
//Wrap in a container
=
case
(
event
,
change
)
of
=
case
(
event
,
change
)
of
(
ResetEvent
,
ReplaceUI
ui
)
//On reset generate a new step UI
(
ResetEvent
,
ReplaceUI
ui
)
//On reset generate a new step UI
=
ReplaceUI
(
uiac
UIContainer
(
classAttr
[
"step-actions"
])
[
ui
:
actionUIs
])
=
ReplaceUI
(
uiac
UIContainer
(
classAttr
[
"step-actions"
])
[
ui
:
actionUIs
])
...
...
Bas Lijnse
@baslijns
mentioned in issue
#344 (closed)
·
Sep 18, 2019
mentioned in issue
#344 (closed)
mentioned in issue #344
Toggle commit list
Write
Preview
Markdown
is supported
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