- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2021 04:33 AM
Hi experts,
I am using flow designer , in which I need to wait until all the existing response tasks are completed and then move further.
I am using wait for condition action in flow designer ad have written a script for it. But when I check flow execution it shows an error- java.lang.Boolean cannot be cast to java.lang.String
This is how the flow looks like currently.
script in wait for condition is -
var cnt_task;
Solved! Go to Solution.
- Labels:
-
Security Incident Response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2021 10:55 PM
Hi,
As suggested by Muhammad you will have to change the logic.
You will have to write after update BR on sn_si_task table and mimic an update on sn_si_incident so that flow proceeds once wait for condition evaluates to true
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2021 10:16 PM
this means there is a parameter that needs to be string and you are providing it as object, please make sure all the parameters that you are providing in your script for GlideRecord addQuery must be in string format.
try adding .toString(); after the sys_ids that you providing.
let me know if the problem still persists.
please mark this as helpful or correct if this solves your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2021 10:55 PM
Hi,
As suggested by Muhammad you will have to change the logic.
You will have to write after update BR on sn_si_task table and mimic an update on sn_si_incident so that flow proceeds once wait for condition evaluates to true
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2021 11:06 PM
Hi Ankur,
Do you mean that I need to create a field on sn_si_incident table to validate if there are any pending tasks and instead of checking it on sn_si_task table (through script in flow).
Can you please elaborate bit more.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2021 12:16 AM
Hi,
Yes somewhat like that.
But I would suggest to use after update BR on "sn_si_task" table and after closure of SI Task do your processing on "sn_si_incident" parent record
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader