- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi,
I have a scenario where i have two list collector catalog variables, Servers and Applications. Servers variable is pointing to cmdb_ci_server, while applications variable is pointing to the cmdb_ci_appl tables. Servers selection should autopopulate the Applications. It is working as expected. The requirement is once the manager of the Requested User approves, next is to get the approval from the owner of the Application (which was auto populated when i selected server) using Flow Designer. I tried the flow but it is giving me an error. Kindly help.
Error:
Encountered error executing instruction: IteratorCreateInstruction{id=29, loopSourceAlias=c7, itemsKey=c1o.application}
java.lang.RuntimeException: Unable to create serializable iterator for items: 3a6cc784c0a8ce01009df43d8f23100d,3a6cadc1c0a8ce01001f1e5d0d7d68fa of class: class java.lang.String
at com.snc.process_flow.v2.exec.IteratorCreateInstructionExecutor.execute(IteratorCreateInstructionExecutor.java:52)
Regards
Suman P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @ServiceNow Use6 ,
Apply split transform on for each item step where you are looing through list collector field.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @ServiceNow Use6 ,
Apply split transform on for each item step where you are looing through list collector field.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @ServiceNow Use6 , 'For Each' requires an array to iterate thru, but the error message indicates that catalog variable you are trying to iterate thru is of type String, since 'Get Catalog Variable' returns a String on 'List Collector'.
you'll need to covert that to an array. you can use Split function (once you take your mouse over for each action, you can see the functions available) in your step #7 to solve this problem.
Regards,
Nishant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @ Anand2799 and @Nishant8,
I have created the Client Script and Script Include to autopopulate the servers. Maybe is it possible to modify anything to get my output? If this doesn't work, I will ask more questions about Applied Transforms
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var gr = new GlideAjax('cmdbServer');
gr.addParam('sysparm_name', 'cmdbFunction');
gr.addParam('sysparm_id', newValue);
gr.getXML(callBackFunction);
function callBackFunction(response){
var answer = response.responseXML.documentElement.getAttribute('answer');
alert(answer);
g_form.setValue('application', answer);
}
}
var cmdbServer = Class.create();
cmdbServer.prototype = Object.extendsObject(AbstractAjaxProcessor, {
cmdbFunction: function() {
var childCIs = [];
var abc = this.getParameter('sysparm_id');
var gr = new GlideRecord('cmdb_rel_ci');
gr.addQuery('parent', 'IN', abc);
gr.addQuery('type.name', 'Runs on::Runs');
gr.query();
while (gr.next()) {
childCIs.push(gr.child.toString());
}
return childCIs.join(',');
},
type: 'cmdbServer'
});
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @ServiceNow Use6, No, you can't get the flow problem sorted here in CS + SI. You are doing an automation in the Flow after a catalog item is submitted while you are just populating the field using CS + SI before submission.
Regards,
Nishant