Skip to content

Commit 32c7890

Browse files
authored
flow: fix post change error (#563)
1 parent 273eb92 commit 32c7890

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

middleware/flow/src/serv/flow_inst_serv.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ impl FlowInstServ {
938938
)
939939
.await?;
940940
if !resp.rel_bus_objs.is_empty() {
941-
let inst_ids = Self::find_inst_ids_by_rel_obj_ids(resp.rel_bus_objs.pop().unwrap().rel_bus_obj_ids, &change_info, funs, ctx).await?;
941+
let inst_ids = Self::find_inst_ids_by_rel_obj_ids(&current_model,resp.rel_bus_objs.pop().unwrap().rel_bus_obj_ids, &change_info, funs, ctx).await?;
942942
Self::do_modify_state_by_post_action(inst_ids, &change_info, updated_instance_list, funs, ctx).await?;
943943
}
944944
}
@@ -949,6 +949,7 @@ impl FlowInstServ {
949949
Ok(())
950950
}
951951
async fn find_inst_ids_by_rel_obj_ids(
952+
flow_model: &FlowModelDetailResp,
952953
rel_bus_obj_ids: Vec<String>,
953954
change_info: &FlowTransitionActionByStateChangeInfo,
954955
funs: &TardisFunsInst,
@@ -970,7 +971,7 @@ impl FlowInstServ {
970971
}
971972
let inst_id = Self::get_inst_ids_by_rel_business_obj_id(vec![rel_obj_id.clone()], funs, ctx).await?.pop().unwrap_or_default();
972973

973-
let resp = FlowExternalServ::do_fetch_rel_obj(&change_info.obj_tag, &inst_id, rel_obj_id, rel_tags, ctx, funs).await?;
974+
let resp = FlowExternalServ::do_fetch_rel_obj(&flow_model.tag, &inst_id, rel_obj_id, rel_tags, ctx, funs).await?;
974975
if !resp.rel_bus_objs.is_empty() {
975976
for rel_bus_obj in resp.rel_bus_objs {
976977
let condition = change_condition

0 commit comments

Comments
 (0)