The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Flow Designer Question List Control Variable for Approval of the Owner of Application

ServiceNow Use6
Tera Guru

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.

 

 

1.png

 

2.png

 

3.png

 

4.png

 

5.jpg

 

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)

 

6.jpg

 

7.jpg

 

Regards

Suman P.

 

 

 

 

 

1 ACCEPTED SOLUTION

Anand2799
Giga Guru

Hi @ServiceNow Use6 ,

 

Apply split transform on for each item step where you are looing through list collector field.

Anand2799_0-1758699065965.png

 

Thanks

Anand

View solution in original post

7 REPLIES 7

Hi @Nishant8,

I have never heard or see about applied transform. Can you please tell me how to where to apply it? Should I apply after the forEach or before forEach step.

Regards

Suman P.

Ankur Bawiskar
Tera Patron
Tera Patron

@ServiceNow Use6 

the issue is with the List collector and For Each requires array of string.

You can do this

1) Use Lookup Records on cmdb_ci_appl table with condition as this

SysId [IS ONE OF] Get Catalog Variables -> Application

2) Then use For Each to iterate over those Lookup Records from previous step

3) Then use Ask for Approval

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

ServiceNow Use6
Tera Guru

Hi All,

I got this completed. I have some other issue now. This thread will be closed.

Regards

Suman P.