feat: evaluate built-in routing predicates and parameterized host conditions
Store transition when as JSON instead of a lookup key so designers can compose closed-set logic while hosts still supply complex refs with args. Match conditional edges before the unconditional default. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -153,7 +153,7 @@ class OrdoJdbcAutoConfigurationTest {
|
||||
withDataSourceRunner.withUserConfiguration(CustomRoutingConditionConfig.class)
|
||||
.run(context -> {
|
||||
assertThat(context).hasSingleBean(OrdoEngine.class);
|
||||
assertThat(context.getBean(RoutingCondition.class).matches("any", null)).isTrue();
|
||||
assertThat(context.getBean(RoutingCondition.class).matches("any", java.util.Map.of(), null)).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class OrdoJdbcAutoConfigurationTest {
|
||||
static class CustomRoutingConditionConfig {
|
||||
@Bean
|
||||
RoutingCondition ordoRoutingCondition() {
|
||||
return (key, context) -> true;
|
||||
return (key, args, context) -> true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{ "id": "hr", "name": "HR approval", "candidates": ["henry"], "policy": "ANY" }
|
||||
],
|
||||
"transitions": [
|
||||
{ "from": "manager", "to": "hr", "when": "days-gt-3", "priority": 0 },
|
||||
{ "from": "manager", "to": "hr", "when": { "gt": ["days", 3] }, "priority": 0 },
|
||||
{ "from": "manager", "to": null, "priority": 1 },
|
||||
{ "from": "hr", "to": null }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user