Skip to content

Commit 8f90950

Browse files
committed
workflows: add timeout transition
Signed-off-by: Matt Klein <mklein@bitdrift.io>
1 parent 5717e66 commit 8f90950

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/bitdrift_public/protobuf/workflow/v1/workflow.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ message Workflow {
5353
repeated Transition transitions = 2;
5454
}
5555

56+
message TransitionTimeout {
57+
// The identifier of the state to transition to.
58+
string target_state_id = 1 [(validate.rules).string = {min_len: 1}];
59+
uint64 timeout_ms = 2 [(validate.rules).uint64.gt = 0];
60+
// An optional array of actions to be executed upon performing this transition.
61+
repeated Action actions = 3;
62+
}
63+
5664
// A transition used to describe the connection between two states. Specifies
5765
// a rule for the change of state and provides actions that to be performed
5866
// upon executing the transition.
@@ -68,6 +76,9 @@ message Workflow {
6876
// An optional array of extensions that act as configuration points for actions attached
6977
// to the current transition or transitions further down the line.
7078
repeated TransitionExtension extensions = 4;
79+
// An optional timeout transition that will occur if the rule match above does not match before
80+
// the specified timeouts. Timeouts are persisted across app restarts in the workflow state.
81+
TransitionTimeout timeout = 5;
7182
}
7283

7384
// A predicate that must be satisfied for a transition to happen.

0 commit comments

Comments
 (0)