Can a user with ITIL roles or Fulfiller users execute a UI Action which calls a flow action

Anubhav24
Mega Sage
Mega Sage

Hi All,

 

I have a user with ITIL roles , my setup is I have a Flow Action which is getting triggered from a UI Action and this UI Action is presented to the itil/fulfiller user on RITM form. Now when I execute this UI Action as an admin it works fine but for itil users / fulfiller users in my case , it looks like that it does not have access to the sn_fd.FlowAPI and it fails to execute the Flow action getting triggered from the UI Action. I get the error of : "Method failed with code 403 : Forbidden username/password combo" is it the right error or the third party system is not behaving properly?

 

Is there a workaround for this scenario?

 

I can not write this action inside a flow as this flow action needs to be called repeatedly for the same record and it is making a call to a third party system to send some data. If I write this flow action inside a flow there will be multiple instances of this flow getting triggered or  may face the error of flow already executing for this record.

 

Can I use some API to set the user as system user and write this inside my UI Action before the flow action is called ? I saw it somewhere but I am not sure about the function call. Also will it be a good practice ?

 

And if we need to assign roles , what are the specific roles to make it work for fulfiller/itil users?

 

Thanks in advance.

 

11 REPLIES 11

@Anubhav24 

Flow action doesn't have Run as System user

You can do this

1) Create a subflow and configure it to Run as System User

2) then include your flow action in that Subflow

3) then call that subflow from your UI action instead of calling flow action

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 ,

Will the same record allow for the subflow to be called repeatedly ? WIll it not throw an error saying that the record already has a flow attached to it.

@Anubhav24 

Sorry didn't get it.

You are using UI action to call subflow and that subflow has action in it.

The subflow will trigger everytime the UI action is clicked.

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

@Anubhav24 

Did my reply answer your question?

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 ,

I am calling my custom flow action in my UI Action script like "sn_fd.FlowAPI.<flow_action_name>".

For this , on flow action properties we do not have run as system setting.