@@ -11,28 +11,34 @@ message Flow {
11
11
// Database ID -> req. for Aquila to identify in FlowStore
12
12
int64 flow_id = 1 ;
13
13
int64 project_id = 2 ;
14
+ // The FlowType´s identifier
14
15
string type = 3 ;
16
+ // All custom data types used in this flow
15
17
repeated shared.DataType data_types = 4 ;
18
+ // These reference data_types by its identifiers, which is are string
16
19
optional string input_type_identifier = 5 ;
17
20
optional string return_type_identifier = 6 ;
18
21
repeated FlowSetting settings = 7 ;
19
22
NodeFunction starting_node = 8 ;
20
23
}
21
24
22
25
message FlowSetting {
26
+ // The database id from sagittarius
23
27
int64 database_id = 1 ;
24
28
string flow_setting_id = 2 ;
25
29
shared.Struct object = 3 ;
26
30
}
27
31
28
32
message NodeFunction {
33
+ // The database id from sagittarius
29
34
int64 database_id = 1 ;
30
35
string runtime_function_id = 2 ;
31
36
repeated NodeParameter parameters = 3 ;
32
37
optional NodeFunction next_node = 4 ;
33
38
}
34
39
35
40
message NodeParameter {
41
+ // The database id from sagittarius
36
42
int64 database_id = 1 ;
37
43
string runtime_parameter_id = 2 ;
38
44
oneof value {
@@ -44,9 +50,85 @@ message NodeParameter {
44
50
45
51
message ReferenceValue {
46
52
DataTypeIdentifier type_identifier = 1 ;
53
+
54
+ /*
55
+ {primary}:{secondary}:{tertiary}
56
+
57
+ 0:0 0:1 0:2 0:3
58
+ Node1 -> Node2 -> Node3 -> Node4
59
+
60
+ all executed after each other (horizontal):
61
+ - Secondary level
62
+
63
+ 0:1 0:1:0
64
+ Node2(NodeA):
65
+
66
+ 1:0 1:0:0 1:0:1 1:1
67
+ NodeA(NodeX, b) -> NodeB
68
+
69
+ 2:0 2:0:0
70
+ NodeX( x )
71
+
72
+ Vertical -> primary level
73
+
74
+ tertiary level is optional and references parameter in a node
75
+ {vertical}:{horizontal}:{parameter}
76
+ */
47
77
int32 primary_level = 2 ;
48
78
int32 secondary_level = 3 ;
49
79
optional int32 tertiary_level = 4 ;
80
+
81
+ /*
82
+ User:
83
+ name: string
84
+ email: string
85
+ housing_locations: Array[Location]
86
+
87
+ Location:
88
+ street: string
89
+ number: integer
90
+
91
+ 0:1
92
+ Node2:
93
+ 1:0 1:0:0
94
+ NodeA(user)
95
+
96
+ user is the reference 1:0:0
97
+
98
+ To reference fields in the referenced object we use reference paths.
99
+
100
+ To reference the email:
101
+
102
+ {
103
+ "primary_level": 1,
104
+ "secondary_level": 0,
105
+ "tertiary_level": 0,
106
+ paths: [
107
+ {
108
+ "path": ".email",
109
+ }
110
+ ]
111
+ }
112
+
113
+ ----
114
+
115
+ To reference the first street:
116
+
117
+ {
118
+ "primary_level": 1,
119
+ "secondary_level": 0,
120
+ "tertiary_level": 0,
121
+ paths: [
122
+ {
123
+ "path": ".housing_locations",
124
+ "array_index": 0
125
+ },
126
+ {
127
+ "path": ".street"
128
+ }
129
+ ]
130
+ }
131
+ */
50
132
repeated ReferencePath paths = 5 ;
51
133
}
52
134
@@ -55,6 +137,8 @@ message ReferencePath {
55
137
optional int64 array_index = 2 ;
56
138
}
57
139
140
+ // Used in sagittarius´s FlowService because oneof can only
141
+ // take in a single message type and not a repeated one
58
142
message Flows {
59
143
repeated Flow flows = 1 ;
60
144
}
0 commit comments