Questions tagged [continuation]
Visualforce uses a Continuation callback pattern for handling asynchronous callouts to SOAP and REST web services
54 questions
19
votes
3
answers
3k
views
Continuation Apex Unit Testing - Lightning
With Summer'19 release continuation is available in Lightning. To make long running callouts.
Continuation - Aura Dev Guide:
https://developer.salesforce.com/docs/atlas.en-us.220.0.lightning.meta/...
8
votes
2
answers
1k
views
How to create controller class instance to pass it as argument of 'Test.invokeContinuationMethod' while Callback method is Static
Background:
VF remoting (@remoteAction) is being used to fetch data - this method is declared as Static (in order to make it available for @remoteAction). In this method, in order to make long ...
6
votes
1
answer
2k
views
Alternatives for handling a Long Running Transaction
I have logic inside an Apex Class that will be invoked from a Lightning Component. There are three sequential callouts that will be sent to an External System whenever its method is Called.
As per ...
6
votes
1
answer
2k
views
Lightning components and Continuations
I have a need to design components that are capable of performing a lot of simultaneous callouts. Platform limit is 20 per host.
Continuations are great way to avoid this limit.
Problem is, as per ...
6
votes
0
answers
2k
views
Safari support for iframing a visualforce page
Background: I have an API I wish to use from within my managed package which occasionally results in long running callouts. In order to ensure my users don't encounter errors with the limits to long ...
6
votes
0
answers
227
views
<apex:map> doesn't render when using continuation(asynchonous callout)
It seems like there's a bug rerendering an <apex:map> from asynchronous callout.
On my sample page below I have two <apex:commandbutton> one executing an asynchronous callout(action="{!...
5
votes
1
answer
2k
views
Continuation Error "Apex class 'ApexPage.ContinuationController' does not exist"
I am trying to use Continuation for the first time and am hitting a strange error. Below is a simple page I created with both a Synchronous Callout and a Continuation Callout button. When, in my ...
3
votes
1
answer
2k
views
@future method vs Async callout
Some days ago I imported a WSDL into Salesforce and (different of some years ago) it created an Async class (and of course the sync class). So I decided to search on Google how to use this Async class....
3
votes
2
answers
199
views
Code Duplication when using Continuation Framework
Continuation Framework allows us to make synchronous callout as async callout ,which allows to get rid of Concurrent Limit platform error.
For making continuation work, all the logic of callout and ...
3
votes
4
answers
5k
views
Asynchronous Callout from an Imported WSDL
I developed VisualForce page with asynchronous callouts to web service according to link.
It is working fine, my page is showing results after callback is returned.
I really like pattern with ...
3
votes
1
answer
2k
views
Making an Asynchronous Callout from another class
I have a question regarding Making an Asynchronous Callout from an adapter class that I made in apex.
Description:
So i followed the Making an Asynchronous Callouts from imported WSDL guide from ...
3
votes
1
answer
560
views
Callback method is not getting called in continuation object
I am getting invalid session Id when i try to perform callout using continuation api . If i remove continuation api code and perform a normal callout the the same code is working.
Below is the code
@...
3
votes
1
answer
2k
views
Refactoring Apex synchronous callout to asynchronous
I'm refactoring a Visualforce page, which currently gets data from a synchronous Apex callout, so that the callout will asynchronous. The Visualforce page downloads a .csv file with customer data in ...
3
votes
1
answer
1k
views
How to write test classes for Continuation Controller (using Async WSDL class)
I have implemented Continuation concept with the Asynchronous WSDL class, in a controller of page. So, I facing difficulties while writing test classes for the same.
For my requirement I have ...
3
votes
1
answer
2k
views
Concurrent Request Limit Exceeded - Possible Solutions
In the recent past we've replaced two very old s-control type and html mashups with visual force pages and web services. This changes along with a few other visual force pages built into our standard ...
3
votes
0
answers
1k
views
Callback not called on Continuation Object
I am trying to invoke SOAP service using continuation. While I am able to successfully hit the service, my callback function is not called. Please help me know if there is any issue with it. Thanks
...
2
votes
1
answer
1k
views
Continuation Object from Trigger
I have a requirement to invoke asynch Webservice callout whenever records is created or updated. I was planning to make a Continuation object callout form Trigger. But As I see in the documentation, ...
2
votes
1
answer
1k
views
"Cannot execute the continuation for Web Service calls" error when using an Asynchronous Callout
Working through a quick example of using a Continuation to make an async web service callout produced the following error after pressing the apex:commandButton that called the action returning the ...
2
votes
2
answers
1k
views
DML operations in the Apex callback method
An apex method that returns a continuation object can’t perform DML. The solution given by the Salesforce developer documentation is the “perform DML operations in the Apex callback method”.
https://...
2
votes
1
answer
831
views
Asynchronous Callouts/Continuations in Embedded Visualforce
Is there any limitations or issues with using Continuations from an embedded visualforce page? I'm attempting to make an asynchronous callout to the Google Calendar API. I have the callout working ...
2
votes
1
answer
635
views
Apex Continuation execution failed and did not start - LWC
I am trying to make a POST api callout from my LWC using Apex Continuation and followed similar code: example. I have created the respective Remote Site settings too. The error message I am getting is:...
2
votes
1
answer
988
views
LWC Continuation SOAP API does not seem to be working
I`m trying to execute Continuation from LWC action.
The thing is that I use it for SOAP API.
It is a long-time running request, but I have to show a loading spinner until the response will be ...
2
votes
0
answers
632
views
Test class for Continuation Chaining
Has anyone ever done a test class for continuation chaining (Multiple Asynchronous Callouts)?
2
votes
0
answers
1k
views
How to get the info on AsynCallouts made with Continuation framework(or Class)
I am using WSDL classes generated from the WSDL xml, to make the webservice callouts. I was making the callout synchronously, but later I want to change it to Asynchronous callouts. As we already know ...
1
vote
1
answer
452
views
Continuation: Constructor not defined
I would do some example with Continuation and I'm using Apex code on Apex Developer Guide.
When I click to save my code I receive this error message:
Constructor not defined: [Continuation].(...
1
vote
2
answers
415
views
Continuation Error: StatusCode=400
I am using Continuation for a callout in a VF page. I am getting a blank response body with StatusCode=400 . When i call the same service using normal HttpRequest, i am getting the proper response. ...
1
vote
2
answers
2k
views
LWC Continuation Issue: Apex methods for continuation can not be invoked from a non-continuation action
I`m trying to call Continuation method from Apex that has
@AuraEnabled(continuation=true cacheable=true)
but getting next error:
Apex methods for continuation can not be invoked from a non-...
1
vote
1
answer
716
views
Apex Continuation method that call service method
We have a a service class where we use as repository/factory for specific external endpoint. One of those endpoint has a method which takes sometime and for that reason we get a timeout exception ...
1
vote
1
answer
300
views
Resume logic after long-running service sends Platform event
I want to orchestrate logic distributed in Salesforce and in an External system in a scalable way using Platform events.
Functional requirements:
User in Salesforce triggers logic (Apex, Flow,...)
...
1
vote
1
answer
2k
views
Aura Component + HttpCallout + Large File Response
Trying to figure out how best to build interfaces that retrieve external files between 1-10 MB and display them in the UI.
Right now I have a Lightning Aura Component that calls a web service via ...
1
vote
1
answer
397
views
call out method is not called in a continuous class, call out from VF page
I was trying to do a callout from a VF page constructor. I'm using Continuation class. As I've to show the response in the Page. Yhe problem is the callout method is not called.
Below is the code, I ...
1
vote
1
answer
1k
views
Continuation obj null in setContinuationMethod
I'm currently working on covering code coverage for continuation pattern.
However, I receive an exception while testing. I have chained 3 webservices ie., service 1,2 and 3.
private static ...
1
vote
1
answer
654
views
Issue with testing callback of continuation - no method on provided controller type
I have an apex class that is using a chained continuation concept.
My class functions fine and appears to be making all of the callouts as expected. Now I am trying to write my test class for code ...
1
vote
0
answers
239
views
Calling Salesforce Rest Webservice url from vf controller
Hi I am trying to make a rest callout from controller and I am not been able to get response . I am using apex continution callout pattern for this to make call async.
This is controller class
...
1
vote
1
answer
3k
views
Concurrent requests limit exceeded [duplicate]
anyone can help me to understand this limit: Number of synchronous concurrent requests for long-running requests that last longer than 5 seconds for each organization
For Example,
If the Apex Class - ...
1
vote
0
answers
977
views
Callback method processResponse() not called if endpoint is an invalid website
I am using Apex Continuation which has 2 functions:
startRequest() - the starting function
processResponse() - the callback function.
Problem
processResponse() is being called OK either...
when I ...
1
vote
0
answers
366
views
Get PageReference returned by callback of continuation, and navigate to it
I've spent many hours scouring the net and trying different coding options to get a very simple function accomplished, with no luck. There are no examples anywhere that I can find, and SF's ...
1
vote
1
answer
127
views
Chaining Continuation call forImported wsdl
I have developed a VF page which needs to do 3 call outs to external system in a sequence. The wsdl has been shared for these web services. We have implemented the continuation pattern based for wsdl ...
0
votes
1
answer
361
views
Continuation not working for the endpoint which has Curly braces in it
I am using Continuation to make API calls from lightning component. And noticed that if endpoint contains Curly braces, callback method is not getting called and we get "Communication error, please ...
0
votes
1
answer
617
views
Using Continuation without Visualforce
I must check url statuses in scheduled job, but their amount is too big (exceeds limit, which is 100), so I tried to use Continuation object, but I'm not really sure if is it possible to use ...
0
votes
1
answer
405
views
Callout not happening from Continuations class(LWC)
I am trying to do a callout on a button click from my LWC comp using apex Continuations. In the debug log, I see no callout happened.
But when I do the callout using setTimeout(), then its working ...
0
votes
1
answer
420
views
not able to access the variable values after using the continuation class
private class StateInfo {
Account acc {get; set;}
StateInfo(Account acc){
this.acc = acc;
}
Contact cont {get; set;}
StateInfo(Account acc, ...
0
votes
1
answer
1k
views
Callback method not getting called in Continuation Object
I am having a requirement where in i am doing asynchronous calls using REST API. I am using Continuation method to perform the asynchronous calls,but here the callback method is not getting called.
...
0
votes
1
answer
500
views
Chaining Continuations - would each continuation be executed in separate transaction/limit scope?
When we are chaining Continuation objects in Apex controller, would it be right to assume that each continuation (and apex post processing method) is executed in separate transaction scope, e.g. I ...
0
votes
1
answer
399
views
will Continuation works in Visual Flow?
We had a existing functionality to get some information from service callout using rest. These information displayed in flow. Its pulling huge information and take little bit longer.
Is that ...
0
votes
1
answer
338
views
Testing chained continuations
Im wondering if anyone has figured out a way to test chained continuations? I followed the documentation for how to essentially make two asynchronous callouts in a synchronous pattern. I can test the ...
0
votes
0
answers
282
views
Issue rewriting @future method to using continuation class
Formerly, I built a callout using the @future(callout=true) to make asynchronous callouts.
@future(callout=true)
public static void exportReport(){
// create request
Http http = new ...
0
votes
1
answer
351
views
Getting Blank response when i return Array on continuation in Lightning component's Server side method
In my requirement, I have to make multiple callouts with the Lightning component's server-side page load method.
So here I have created multiple HTTP request(i.e: 20) objects and bind each 3 in ...
0
votes
1
answer
451
views
continuation method return null from the continuation method it self instead of call back method return
public with sharing class ContinuationClass {
// Action method
@AuraEnabled(continuation=true cacheable=true)
public static Object continuationCall() {
// Create continuation. ...
0
votes
0
answers
226
views
Lightning continuation callout pattern does not respect user permissions
I am working on a lightning application that uses the lightning apex continuation callout pattern found at this link:
https://developer.salesforce.com/blogs/2017/09/invoking-apex-continuations-...