99from converter .cisu .resources_info .resources_info_cisu_helper import (
1010 enrich_rs_ri_with_rs_srs ,
1111 get_latest_state ,
12+ log_cisu_to_rs_converted_messages_ids ,
1213)
1314from converter .repositories .message_repository import (
1415 get_last_rc_ri_by_case_id ,
@@ -175,6 +176,9 @@ def from_cisu_to_rs(cls, edxl_json: Dict[str, Any]) -> List[Dict[str, Any]]:
175176 converted_messages .append (
176177 cls ._build_rs_sr_from_resource (edxl_json , resource , case_id )
177178 )
179+ log_cisu_to_rs_converted_messages_ids (
180+ edxl_json , converted_messages [0 ], converted_messages [1 :]
181+ )
178182 return converted_messages
179183
180184 # Known caseId — compare resources and emit only what changed
@@ -191,6 +195,7 @@ def from_cisu_to_rs(cls, edxl_json: Dict[str, Any]) -> List[Dict[str, Any]]:
191195 ]
192196
193197 messages : List [Dict [str , Any ]] = []
198+ rs_ri = None
194199
195200 if engaged_resources_updated :
196201 logger .info (
@@ -200,17 +205,20 @@ def from_cisu_to_rs(cls, edxl_json: Dict[str, Any]) -> List[Dict[str, Any]]:
200205 rs_ri = cls ._build_rs_ri_from_cisu (edxl_json )
201206 messages .append (rs_ri )
202207
208+ rs_sr_messages : List [Dict [str , Any ]] = []
203209 for resource in modified_status_resources :
204210 logger .info (
205211 "Resource %s has a modified status — adding RS-SR to output." ,
206212 resource .get ("resourceId" ),
207213 )
208214 rs_sr = cls ._build_rs_sr_from_resource (edxl_json , resource , case_id )
209215 messages .append (rs_sr )
216+ rs_sr_messages .append (rs_sr )
210217
211218 if not messages :
212219 logger .info ("No resource changes detected for caseId %s." , case_id )
213220
221+ log_cisu_to_rs_converted_messages_ids (edxl_json , rs_ri , rs_sr_messages )
214222 return messages
215223
216224 @classmethod
0 commit comments