-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconstraints-decision-tree.pu
95 lines (80 loc) · 2.3 KB
/
constraints-decision-tree.pu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
' Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
'
' See the AUTHORS file(s) distributed with this work for additional information regarding authorship.
'
' This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
' If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/
' SPDX-License-Identifier: MPL-2.0
@startuml
skinparam shadowing false
skinparam activity {
BackgroundColor White
BorderColor Black
FontName Roboto Condensed
FontSize 16
ArrowColor Black
}
skinparam activityDiamond {
BackgroundColor White
BorderColor Black
FontName Roboto Condensed
FontSize 16
ArrowColor Black
}
(*) --> "Is the value\na collection?"
if "" then
-->[yes] "Is there a known\nminimum and/or\nmaximum length?" as CollectionMinMax
else
-->[no] "Is the value\na number?" as NumberKind
endif
CollectionMinMax --> if "" then
-->[yes] "Length Constraint" as CollectionLengthConstraint #b7c9e3
else
-->[no] "No Constraint\nneeded" as NoConstraint
endif
NumberKind --> if "" then
-->[yes] "Is the value a fixed point number?" as FixedPointNumber
else
-->[no] "Is there a known\nminimum and/or\nmaximum length?" as StringMinMax
endif
FixedPointNumber --> if "" then
-->[yes] "Fixed Point Constraint" #b7c9e3
--> "Is there a known\nminimum and/or\nmaximum value?" as NumberMinMax
else
-->[no] NumberMinMax
endif
NumberMinMax --> if "" then
-->[yes] "Range Constraint" #b7c9e3
else
-->[no] NoConstraint
endif
StringMinMax --> if "" then
-->[yes] "Length Constraint" as StringLengthConstraint #b7c9e3
--> "Does the value\nuse UTF-8 encoding?" as Utf
else
-->[no] Utf
endif
Utf --> if "" then
-left->[no] "Encoding Constraint" #b7c9e3
--> "Is the value a text\nin a specific\nlanguage?" as Language
else
-->[yes] Language
endif
Language --> if "" then
-->[yes] "How is the language\nspecified?" as LangSpec
else
-->[no] "Can the value be\nconstrained using a\nregular expression?" as Regex
endif
LangSpec --> if "" then
-->[ISO 639,\ne.g., 'en'] "Language Constraint" #b7c9e3
--> Regex
else
-->[BCP 47,\ne.g., 'en-US'] "Locale Constraint" #b7c9e3
--> Regex
endif
Regex --> if "" then
-left->[yes] "Regular Expression Constraint" #b7c9e3
else
-right->[no] "No more Constraints\nneeded"
endif
@enduml