Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Verification for Decision Model and Notation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Blatt
Verification for Decision Model and Notation
Commits
470a9dbe
Commit
470a9dbe
authored
5 years ago
by
Jonas Blatt
Browse files
Options
Downloads
Patches
Plain Diff
#9
Add Action for Missing Input Column -> Delete Output Column
parent
b180bc52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dmnverifierapi/src/main/java/de/unikoblenz/fgbks/core/dmn/verification/verifier/impl/MissingInputColumnVerifier.java
+21
-2
21 additions, 2 deletions
...erification/verifier/impl/MissingInputColumnVerifier.java
with
21 additions
and
2 deletions
dmnverifierapi/src/main/java/de/unikoblenz/fgbks/core/dmn/verification/verifier/impl/MissingInputColumnVerifier.java
+
21
−
2
View file @
470a9dbe
package
de.unikoblenz.fgbks.core.dmn.verification.verifier.impl
;
import
static
de
.
unikoblenz
.
fgbks
.
base
.
domain
.
Name
.
NO_NAME
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
domain
.
vdmn
.
utils
.
VDmnFunctions
.
getDecisionStringName
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
VerificationResultEntry
.
VerificationClassification
.
WARNING
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
Action
.
ACTION_SHOW_DECISION
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
Action
.
ACTION_SHOW_INPUT_DATA
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
ActionScope
.
INPUT_COLUMN
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
ActionScope
.
INPUT_DATA
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
ActionScope
.
OUTPUT_COLUMN
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
ActionType
.
CREATE
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
ActionType
.
DELETE
;
import
static
de
.
unikoblenz
.
fgbks
.
core
.
dmn
.
verification
.
result
.
actions
.
VerificationFix
.
DEFAULT_SHOW_NAME
;
...
...
@@ -105,10 +107,12 @@ public class MissingInputColumnVerifier extends AbstractVerifier {
for
(
VDmnOutputColumn
outputColumn
:
((
VDmnDecision
)
inputDataNode
).
getVDmnDecisionTable
().
getVDmnOutputColumns
())
{
if
(
outputColumn
.
getName
().
isPresent
())
{
// add input Column
vreFactory
.
addVerificationFix
(
VerificationFix
.
getBuilder
()
.
withFixName
(
new
Name
(
"Add Input Column "
+
outputColumn
.
getName
().
get
().
getValue
()))
new
Name
(
"Add Input Column \""
+
outputColumn
.
getName
().
get
().
getValue
())
+
"\""
)
.
addAction
(
Action
.
getBuilder
()
.
withActionType
(
CREATE
)
...
...
@@ -119,6 +123,21 @@ public class MissingInputColumnVerifier extends AbstractVerifier {
.
build
())
.
build
());
}
vreFactory
.
addVerificationFix
(
VerificationFix
.
getBuilder
()
.
withFixName
(
new
Name
(
"Delete Output Column \""
+
outputColumn
.
getName
().
orElse
(
NO_NAME
).
getValue
())
+
"\""
)
.
addAction
(
Action
.
getBuilder
()
.
withActionType
(
DELETE
)
.
withActionScope
(
OUTPUT_COLUMN
)
.
addIdValue
(
outputColumn
.
getVDmnDecision
().
getDecisionId
())
.
addIdValue
(
outputColumn
.
getOutputId
())
.
build
())
.
build
());
}
}
...
...
@@ -126,7 +145,7 @@ public class MissingInputColumnVerifier extends AbstractVerifier {
WARNING
,
(
inputDataNode
.
isInputData
()
?
"Input data"
:
"Decision"
)
+
" node \"%s\" has no corresponding input column in decision \"%s\""
,
inputDataNode
.
getName
().
orElse
(
Name
.
NO_NAME
),
inputDataNode
.
getName
().
orElse
(
NO_NAME
),
getDecisionStringName
(
decision
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment