by default, flow is synchronous or asynchronous ??

KM SN
Tera Expert

In BR we synchronous as well asynchronous rule when it comes to flow how it behaves by default??Inside as per the logic it will be obviously synchronous.

 

But if want to write a script on business rule, I would write async as it is asynchronous. in the same manner what about flow.... when it comes to same logic if I want implement using flow designer?? How it acts synchronously or asynchronously?

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron

@KM SN 

always in background by default asynchronous

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

View solution in original post

Medi C
Giga Sage

Hi @KM SN 

Flows are Async by default.

//Async:
sn_fd.FlowAPI.getRunner().flow('flow_name').inBackground().withInputs(inputs).run();

//Sync
sn_fd.FlowAPI.getRunner().flow('flow_name').inForeground().withInputs(inputs).run();

 


Thanks & Best regards,
Medi

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@KM SN 

always in background by default asynchronous

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

Medi C
Giga Sage

Hi @KM SN 

Flows are Async by default.

//Async:
sn_fd.FlowAPI.getRunner().flow('flow_name').inBackground().withInputs(inputs).run();

//Sync
sn_fd.FlowAPI.getRunner().flow('flow_name').inForeground().withInputs(inputs).run();

 


Thanks & Best regards,
Medi