How to execute scheduled import in flow designer??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 10:43 PM - edited 01-30-2023 10:52 PM
Hello all,
I want to execute the scheduled import 3 times in the flow. And if it has given error then incident will be created. I have tried this below is screen shots and script using custom action.
But by doing it. It is creating execution records multiply one by one any assistance on this...
Input is rec ref - scheduled import record
(function execute(inputs, outputs) {
var rec = new GlideRecord('scheduled_import_set');
rec.addQuery('name','Example LDAP User Import');
rec.query();
if(rec.next()){
count++;
SncTriggerSynchronizer.executeNow(rec);
}
})(inputs, outputs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 06:57 AM
since you want to run it 3 times one by one then why not use Do Until in flow
Also remember to keep track of the error in some flow variable which acts like a global variable for the entire flow execution
If any error then set that flow variable and then after the Do Until ends check value of this flow variable and based on that create incident
How are you determining the error?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2023 11:08 PM
@Ankur Bawiskar Thanks for reply I want to run scheduled import 3 times and if it occured with error then will create incident. But how to design it in flow...!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 12:01 AM
Hi @martin63 , may i know how you created a trigger point for scheduled data import? could pls give me the steps ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 02:48 AM
Hii Ramesh i am triggering on daily at 12:00pm and executing scheduled import in flow designer using custom action.
Thankyou