-
Notifications
You must be signed in to change notification settings - Fork 17
Generalize workflow system. #1061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
14ea632
to
e7162c8
Compare
We need the migration to convert the old column-based workflows into the new system. Luckily, it should be quite straightforward side there weren't lots of options. |
f6000c8
to
4fac571
Compare
FYI @siiick @Pascal-Delange. |
88fc4ef
to
786c597
Compare
86440db
to
214dc58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first review done !
"github.com/google/uuid" | ||
) | ||
|
||
type Workflow struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pure naming thing but to be in line with my understanding of what we want to call them, how about workflow=>workflowRule and workflowRule=>workflowRuleMetadata in this file ?
0f6c919
to
1351cbe
Compare
fc47410
to
93f037e
Compare
93f037e
to
a0970b0
Compare
Before this commit, workflows would only perform the actions listed under the first matching rule. While this is still the default, a new option on a rule, `fallthrough`, allows defining that workflow evaluation should continue even if this rules matches. All the actions of of the matching rules up until the first failing or not-fallthrough rule will be executed, in order. As we can only add a decision to a case once, only the first action of this kind will be executed, the other ones will be noops.
…io rule versions.
1b06474
to
01080c3
Compare
This PR improves the decision workflow feature to make it more expandable and useful. It allows the user to create an ordered series of
rules
on a scenario, of which the first one whichconditions
all evaluate to true will execute allactions
.This first version does not implement any further actions than those that were already there, so we have
CREATE_CASE
andADD_TO_CASE_IF_POSSIBLE
and three conditions,always
,never
andoutcome_in
.So far, it only implement actual executions, not the management API or any kind of validation for the conditions and actions.
Outstanding TODOs: