How to have Scripted REST API in flow designer ?

Thej1
Tera Expert

Hi,

 

How to incorporate the Scripted REST API in flow designer as we do it for Outbound REST message ?
In Flow Designer, We add REST message by creating new Action of REST and importing REST message. Then adding that into the flow.

 

We have Bidirectional integration of ServiceNow with BMC. After making 3 API REST calls, a ticket is created in BMC. Then after closing it manually in BMC they will call our Scripted REST API of Scripted Web service and send an ID as a parameter. Then we need to make 4th Outbound call by having the provided id and in response we will receive Incident number.
We are doing it all in flow designer.

 

Not getting how to incorporate the Scripted REST API in flow. Could you please help me on this ?

@Dr Atul G- LNG @Ankur Bawiskar @Mohit Kaushik @Harish Bainsla 


Thanks

14 REPLIES 14

@Ankur Bawiskar 

Thank you for the quick response. 
Does this approach will not cause any issue for multiple executions in flow ?

 

Thanks

@Thej1 

no because every time scripted rest api endpoint is consumed a new subflow will be invoked and it will consume some endpoint and do it's work

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

@Thej1 

Thank you for marking my response as helpful.

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

Hi @Ankur Bawiskar ,

 

Am able to trigger sub flow when ever scripted REST api is consumed and able to pass the inputs.
But when i incorporated this SF in main flow, it is not waiting to have Request of Scripted REST Api, as soon as RITM is created it executes SF with empty inputs.


How to solve this issue ?

@Thej1 

I believe I have answered your original question of how to invoke the subflow etc

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