Comments (6)
Unfortunately, the error System.CalloutException: Callout loop not allowed is behaving as designed by Salesforce.
Per their documentation, the scenario occurs when a Salesforce org makes a callout to a Salesforce org, and then that Salesforce org makes a callout.
Salesforce A ----Callout----> Salesforce B ----Callout----> Webservice
With Mass Action Scheduler, the app invokes your process/flow via a callout to the REST API, so that's the Salesforce org makes a callout to a Salesforce org first part of the scenario. Your org makes a callout back to itself. Then, if your process/flow/apex makes another synchronous callout or uses external services, that is the and then that Salesforce org makes a callout second part of the scenario.
As a workaround, you might try having your invoked process/flow/apex perform its callout or use of external services asynchronously via batch or queueable apex.
There isn't anything I can change here for now until Salesforce provides a way for invocable processes and headless flows to be initiated from apex natively rather than having to go through the REST API. I have brought up this limitation to Salesforce product management and awaiting prioritization.
Note, in Spring 18 release, autolaunched flows can be started from apex natively, but the REST API that Mass Action Scheduler uses to know which flows/processes you want to invoke does not distinguish between invocable processes and autolaunched flows, and so the app cannot reliably know which code path to go down once you've made a a selection.
If/when apex supports starting invocable processes, then I'll revisit this feature request. Please consider submitting this idea on IdeaExchange too.
Thanks!
from sfdx-mass-action-scheduler.
from sfdx-mass-action-scheduler.
Thanks for the kind feedback @bruceleestewart.
Since this is blocked by Salesforce's architecture, and I'm not sure if that limitation will change, I'm going to close this issue for now. I've added to the FAQ.
Thanks
from sfdx-mass-action-scheduler.
This may be a limitation in how Mass Action Scheduler works. The app uses the Salesforce REST API to invoke the chosen action (flow). So what I understand in that help article is that the callout from the flow itself is being blocked because apex code already made a callout.
For grins to see if this workaround helps, could you try adding a flow Wait element before the flow calls the external service? That might cause a new apex transaction to occur and so reset the http callout limit. I’m not saying that is or isn’t a good thing to do, but something to try.
from sfdx-mass-action-scheduler.
@bruceleestewart I'm going to escalate to the Apex and Flow teams to see if this is "by design" or "fixable".
from sfdx-mass-action-scheduler.
Hi @bruceleestewart, could you please share a simple code sample for invoking the External Service I could use to build a reproduction of your issue? Thanks
from sfdx-mass-action-scheduler.
Related Issues (20)
- Error getting named credentials LC_API Timeout trying to establish connection to iframe HOT 2
- Timeout Error HOT 1
- Error Occurred During Flow "MAS: Mass Action Configuration": Unsupported action type: CUSTOM_NOTIFICATION_... HOT 1
- Configuration stuck in 'batch job preparing' status HOT 1
- Mass Action Scheduler Error
- Errors on all Configs
- Anonymous Apex Error: compileProblem: Script too large HOT 1
- Mapping Literal Values
- Apex CPU Time Limit Exceeded
- Invalid id: 000000000000000 dca_mass_action
- Send Chatter error message HOT 1
- Run a configuration from Apex HOT 1
- Unable to install in Sandbox HOT 1
- MAS picking up records from List view to process which do not match criteria HOT 1
- OAuth Error when resaving the Named Credential HOT 2
- Problem during Named Credential OAuth on Spring'23 HOT 2
- Apex source causing unhandled exception HOT 1
- 📣 Seeking maintainers for Mass Action Scheduler HOT 2
- Timeout when loading Mass Scheduler Configuration for an job HOT 1
- Invalid Session ID
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfdx-mass-action-scheduler.