When a flow/subflow configured to "run as" System" is executed in the foreground thread from a user which does not hold the admin role, they are unable to "Run As" System.
An exception such as ""Unable to load connection with alias ID: xxxxx"" could be observed when the flow/subflow required to access a connection alias.
Steps to Reproduce
"Unable to load connection with alias ID: xxxxx" error when i am trying to access a docusign spoke action "Get Embedded Signing URL" through a subflow.
The subflow is marked to run as "System User," the issue is seen when accessing the subflow through a non admin user.
- Create a flow which runs as system on the foreground thread
- Have the flow execute an action which contains a REST Step
- Configure the rest step to use a connection alias for the instance
- Point the rest step to some Table API endpoint back to the instance
- Create a UI Action which is visible by abel.tuter on a form which triggers synchronously the Flow using script
- Login as Abel.Tuter and execute the UI Action
- Log back in as the admin user to observe the execution details, which will show "Unable to load connection with alias ID: xxxxx"
Run the flow in a background Thread:
If the Flow is not triggered through script in the advanced options of the trigger "Where to run the flow" adjust it to 'background'.
If the Flow/Subflow is triggered through script, then trigger the flow/subflow using the asynchronous API's which will run the flow/subflow in a background thread
Related Problem: PRB1332221