Skip to content

Commit 06e85a8

Browse files
Merge pull request #350 from code0-tech/#269-action-flow
Reapply "action flow"
2 parents 17b9132 + b1af7f3 commit 06e85a8

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

proto/aquila/aquila.action.proto

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ package aquila;
77
import "shared.module.proto";
88
import "shared.execution_result.proto";
99
import "shared.struct.proto";
10+
import "shared.flow.proto";
11+
import "shared.translation.proto";
12+
import "shared.errors.proto";
13+
14+
message ActionFlow {
15+
int64 flow_id = 1;
16+
int64 project_id = 2;
17+
18+
repeated shared.FlowSetting settings = 3;
19+
shared.Struct input_schema = 4;
20+
shared.Struct output_schema = 5;
21+
string project_slug = 6;
22+
23+
string name = 7;
24+
}
1025

1126
// Event that gets admitted by an action
1227
message ActionEvent {
@@ -36,13 +51,36 @@ message ActionExecutionRequest {
3651
int64 project_id = 4;
3752
}
3853

54+
message ActionFlowExecutioRequest {
55+
string execution_identifier = 1;
56+
string flow_id = 2;
57+
shared.Value payload = 3;
58+
}
59+
3960
message ActionExecutionResponse {
40-
// Execution identifier of execution
61+
// Execution identifier of execution
4162
string execution_identifier = 1;
4263
// Result of execution
4364
shared.NodeExecutionResult node_result = 2;
4465
}
4566

67+
message ActionFlowExecutionResponse {
68+
// Execution identifier of execution
69+
string execution_identifier = 1;
70+
oneof result {
71+
shared.Value success = 2;
72+
shared.Error failure = 3;
73+
}
74+
}
75+
76+
message ActionFlowUpdate {
77+
oneof data {
78+
ActionFlow updated_flow = 1;
79+
int64 deleted_flow = 2;
80+
}
81+
}
82+
83+
// Messages sent by the Action
4684
message ActionTransferRequest {
4785
oneof data {
4886
// Identification of the action
@@ -54,15 +92,20 @@ message ActionTransferRequest {
5492
ActionEvent event = 2;
5593
// Result of execution that was triggered by a execution request
5694
ActionExecutionResponse result = 3;
95+
// Result of an flow execution
96+
ActionFlowExecutionResponse flow_execution_response = 4;
5797
}
5898
}
5999

100+
// Messages sent by Aquila
60101
message ActionTransferResponse {
61102
oneof data {
62103
// Execution request
63104
ActionExecutionRequest execution = 1;
64105
// ModuleConfigurations that have been configured by the user
65106
shared.ModuleConfigurations module_configurations = 2;
107+
// An Action Flow update
108+
ActionFlowUpdate flow_update = 3;
66109
}
67110
}
68111

proto/shared/shared.flow.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package shared;
66

77
import "shared.struct.proto";
88
import "shared.data_type.proto";
9+
import "shared.translation.proto";
910

1011
message ValidationFlow {
1112
// Database ID -> req. for Aquila to identify in FlowStore
@@ -21,6 +22,12 @@ message ValidationFlow {
2122
string project_slug = 8;
2223
optional string disable_reason = 9;
2324
string signature = 10;
25+
26+
optional string definition_source = 11;
27+
shared.Struct input_schema = 12;
28+
shared.Struct output_schema = 13;
29+
30+
string name = 14;
2431
}
2532

2633
message ExecutionFlow {

0 commit comments

Comments
 (0)