@@ -707,6 +707,7 @@ impl FlowInstServ {
707
707
let mut params = vec ! [ ] ;
708
708
for ( var_name, value) in vars {
709
709
params. push ( FlowExternalParams {
710
+ rel_kind : None ,
710
711
rel_tag : None ,
711
712
var_name : Some ( var_name. clone ( ) ) ,
712
713
var_id : None ,
@@ -852,13 +853,8 @@ impl FlowInstServ {
852
853
}
853
854
let rel_tag = change_info. obj_tag . unwrap_or_default ( ) ;
854
855
if !rel_tag. is_empty ( ) {
855
- let obj_tag = if let Some ( obj_tag_rel_kind) = change_info. obj_tag_rel_kind . clone ( ) {
856
- String :: from ( obj_tag_rel_kind)
857
- } else {
858
- rel_tag. clone ( )
859
- } ;
860
856
let mut resp =
861
- FlowExternalServ :: do_fetch_rel_obj ( & current_model. tag , & current_inst. id , & current_inst. rel_business_obj_id , vec ! [ obj_tag ] , ctx, funs) . await ?;
857
+ FlowExternalServ :: do_fetch_rel_obj ( & current_model. tag , & current_inst. id , & current_inst. rel_business_obj_id , vec ! [ ( rel_tag . clone ( ) , change_info . obj_tag_rel_kind . clone ( ) ) ] , ctx, funs) . await ?;
862
858
if !resp. rel_bus_objs . is_empty ( ) {
863
859
for rel_bus_obj_id in resp. rel_bus_objs . pop ( ) . unwrap ( ) . rel_bus_obj_ids {
864
860
let inst_id = Self :: get_inst_ids_by_rel_business_obj_id ( vec ! [ rel_bus_obj_id. clone( ) ] , funs, ctx) . await ?. pop ( ) . unwrap_or_default ( ) ;
@@ -871,6 +867,7 @@ impl FlowInstServ {
871
867
None ,
872
868
None ,
873
869
vec ! [ FlowExternalParams {
870
+ rel_kind: None ,
874
871
rel_tag: None ,
875
872
var_id: None ,
876
873
var_name: Some ( change_info. var_name. clone( ) ) ,
@@ -893,6 +890,7 @@ impl FlowInstServ {
893
890
None ,
894
891
None ,
895
892
vec ! [ FlowExternalParams {
893
+ rel_kind: None ,
896
894
rel_tag: None ,
897
895
var_id: None ,
898
896
var_name: Some ( change_info. var_name. clone( ) ) ,
@@ -908,13 +906,8 @@ impl FlowInstServ {
908
906
}
909
907
FlowTransitionActionChangeKind :: State => {
910
908
if let Some ( change_info) = post_change. state_change_info {
911
- let obj_tag = if let Some ( obj_tag_rel_kind) = change_info. obj_tag_rel_kind . clone ( ) {
912
- String :: from ( obj_tag_rel_kind)
913
- } else {
914
- change_info. obj_tag . clone ( )
915
- } ;
916
909
let mut resp =
917
- FlowExternalServ :: do_fetch_rel_obj ( & current_model. tag , & current_inst. id , & current_inst. rel_business_obj_id , vec ! [ obj_tag] , ctx, funs) . await ?;
910
+ FlowExternalServ :: do_fetch_rel_obj ( & current_model. tag , & current_inst. id , & current_inst. rel_business_obj_id , vec ! [ ( change_info . obj_tag. clone ( ) , change_info . obj_tag_rel_kind . clone ( ) ) ] , ctx, funs) . await ?;
918
911
if !resp. rel_bus_objs . is_empty ( ) {
919
912
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 ?;
920
913
Self :: do_modify_state_by_post_action ( inst_ids, & change_info, updated_instance_list, funs, ctx) . await ?;
@@ -943,12 +936,7 @@ impl FlowInstServ {
943
936
let mut rel_tags = vec ! [ ] ;
944
937
for condition_item in change_condition. conditions . iter ( ) {
945
938
if condition_item. obj_tag . is_some ( ) && !condition_item. state_id . is_empty ( ) {
946
- let obj_tag = if let Some ( obj_tag_rel_kind) = condition_item. obj_tag_rel_kind . clone ( ) {
947
- String :: from ( obj_tag_rel_kind)
948
- } else {
949
- condition_item. obj_tag . clone ( ) . unwrap ( )
950
- } ;
951
- rel_tags. push ( obj_tag) ;
939
+ rel_tags. push ( ( condition_item. obj_tag . clone ( ) . unwrap ( ) , condition_item. obj_tag_rel_kind . clone ( ) ) ) ;
952
940
}
953
941
}
954
942
let inst_id = Self :: get_inst_ids_by_rel_business_obj_id ( vec ! [ rel_obj_id. clone( ) ] , funs, ctx) . await ?. pop ( ) . unwrap_or_default ( ) ;
0 commit comments