Flow not loading, shows - There was an error loading the execution details for this flow context

subhajit1993
Tera Contributor

I have a requirement to create multiple RITMs based multiple values selected in the list collector of a catalog item.

I am achieving it as below:

var helper = new GlideappCalculationHelper();
      helper.addItemToExistingRequest(inputs.request, inputs.cat_item, "1");
      helper.rebalanceRequest(inputs.request);
 
var ritm = new GlideRecord("sc_req_item");
   ritm.addQuery("request", inputs.request);
   ritm.addQuery("cat_item", inputs.cat_item);
   ritm.orderBy("number");
   ritm.query();

   var flag = 0;
   while (ritm.next()) {
      ritm.variables.request_access = inputs.request_access;
      ritm.variables.config_item_server = ciArr[flag];
      ritm.variables.config_item_workstation = ciArr[flag];
     
      ritm.variables.ci = ciArr[flag];
      if (flag > 0) {
         ritm.variables.divert_flow = "no";
      }
      ritm.update();
      flag++;
   }
This designed in an action within a flow. The flow is associated with the catalog item.
As a result I can see the correct number of RITMs created and the list collector is updated with an individual value for the RITM.
 
I need the flow also to get triggered individually for these RITMs as based on each list collector value different RITMs will have different approvals.
I can see the flow context link for all the RITMs. But only in the main RITM which gets automatically created, the flow context link works and shows the flow execution details. For the rest, I get an error when I click on flow context:
subhajit1993_0-1700207537720.png

 

 

I am completely stuck here. Can anyone point out, what might be missing or what more needs to be configured.

6 REPLIES 6

GlideFather
Tera Patron

It seems that your flow is deleted. Can you check it from the Home icon?

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @subhajit1993 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0859622

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1002669

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi Atulya,

Thanks for responding back. I had already gone through these links. My issue is different than these. I have accomplished this now my enclosing the rest of the activities in a subflow and calling that subflow for the custom RITMs created. Now, the flow is triggered once and it automatically triggers one subflow for the default RITM. For the rest of the RITMs, I can also see separate subflow executions. But now, for any custom RITM, when I click on flow context, it doesnt load the subflow which got executed for that RITM, which is expected I think, because I am just passing an input parameter. But then I have to figure out how to the execution record on click of Flow context related link.

Sandeep Rajput
Tera Patron
Tera Patron

@subhajit1993 It seems that the context associated with your flow no longer exists hence you are seeing this error.