Skip to content

Commit ab643fc

Browse files
authored
flow: EDA support (#734)
* flow: fix * flow: eda support
1 parent c59d860 commit ab643fc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

backend/middlewares/flow/src/event.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,18 @@ pub async fn start_flow_event_service(config: &EventTopicConfig) -> TardisResult
4343
}
4444
});
4545
}
46-
Some(EVENT_POST_CHANGE) => {}
46+
Some(EVENT_POST_CHANGE) => {
47+
let Ok((inst_id, next_transition_id, ctx)) = TardisFuns::json.json_to_obj::<(String, String, _)>(msg) else {
48+
return None;
49+
};
50+
tokio::spawn(async move {
51+
let funs = get_tardis_inst();
52+
let result = FlowEventServ::do_post_change(&inst_id, &next_transition_id, &ctx, &funs).await;
53+
if let Err(err) = result {
54+
error!("[BIOS.Log] failed to do front change: {}, inst_id: {}", err, inst_id);
55+
}
56+
});
57+
}
4758
Some(unknown_event) => {
4859
warn!("[BIOS.Flow] event receive unknown event {unknown_event}")
4960
}

0 commit comments

Comments
 (0)