mirror of
https://github.com/gorules/zen.git
synced 2026-10-05 00:02:26 +00:00
update model
This commit is contained in:
@@ -261,14 +261,14 @@ impl<L: DecisionLoader + 'static, A: CustomNodeAdapter + 'static> DecisionGraph<
|
||||
});
|
||||
walker.set_node_data(nid, res.output);
|
||||
}
|
||||
DecisionNodeKind::DecisionNode { .. } => {
|
||||
DecisionNodeKind::DecisionNode { content } => {
|
||||
let node_request = NodeRequest {
|
||||
node: node.clone(),
|
||||
iteration: self.iteration,
|
||||
input: walker.incoming_node_data(&self.graph, nid, true),
|
||||
};
|
||||
|
||||
let res = DecisionHandler::new(
|
||||
let mut res = DecisionHandler::new(
|
||||
self.trace,
|
||||
self.max_depth,
|
||||
self.loader.clone(),
|
||||
@@ -285,6 +285,11 @@ impl<L: DecisionLoader + 'static, A: CustomNodeAdapter + 'static> DecisionGraph<
|
||||
node_request.input.dot_remove("$nodes");
|
||||
res.output.dot_remove("$nodes");
|
||||
|
||||
if content.pass_through {
|
||||
let mut base = node_request.input.clone();
|
||||
res.output = base.merge(&res.output)
|
||||
}
|
||||
|
||||
trace!({
|
||||
input: node_request.input,
|
||||
output: res.output.clone(),
|
||||
@@ -312,6 +317,7 @@ impl<L: DecisionLoader + 'static, A: CustomNodeAdapter + 'static> DecisionGraph<
|
||||
|
||||
node_request.input.dot_remove("$nodes");
|
||||
res.output.dot_remove("$nodes");
|
||||
res.output.dot_remove("$");
|
||||
|
||||
if content.pass_through {
|
||||
let mut base = node_request.input.clone();
|
||||
|
||||
@@ -75,6 +75,8 @@ pub struct FunctionContent {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DecisionNodeContent {
|
||||
pub key: String,
|
||||
#[serde(default)]
|
||||
pub pass_through: bool,
|
||||
#[serde(flatten)]
|
||||
pub transform_attributes: TransformAttributes,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user