Questions tagged [continuation]
Visualforce uses a Continuation callback pattern for handling asynchronous callouts to SOAP and REST web services
54 questions
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:...
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 ...
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 ...
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
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,...)
...
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
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 ...
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
@...
-1
votes
1
answer
288
views
Continuous integration using REST api in vf page
I have been asked a question in continuous integration. First let me give some background.
In continuous integration api call we can call 3 webservice urls at a time and process response in another ...
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, ...
2
votes
1
answer
987
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 ...
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 ...
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://...
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 ...
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.
...
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/...
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-...
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
...
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 ...
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 ...
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
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 - ...
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 ...
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 ...
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 ...
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 ...
0
votes
1
answer
796
views
Callback fails to get HTTP response from Continuation
I have a working version of using an apex continuation in a VF page for parallel and chained callouts.
Now I need to use a continuation from a Lightning Component so I implemented the Continuation ...
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 ...
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].(...
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="{!...
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 ...
2
votes
0
answers
632
views
Test class for Continuation Chaining
Has anyone ever done a test class for continuation chaining (Multiple Asynchronous Callouts)?
0
votes
2
answers
980
views
Continuation pattern and JavaScript Remoting - corrupted file in the response
My current solution is working with following logic:
system is calling remote action from vf page
in the method there is a HttpRequest, system is calling external system, is sending file which will ...
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 ...
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 ...
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
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
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 ...
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 ...
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....
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 ...
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 ...
0
votes
0
answers
55
views
Apex Continuations: what happens when user navigates from his session?
As Continuation only works from VisualForce, what happens when user navigates from that session?
Does the users loose the process?
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. ...
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
...