function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vineet GoelVineet Goel 

Continuation callback method is not getting invoked

The actual code is very big, I tried to simplify it as much as possible.
The design is such we cannot call the continuation method directly. So looking for ways of invoking it.
VF page

VF page

Controller:

controller


Is it True , Continuation callback is invoked only when a continuation is initialized from Visualforce only. It will not work if continuation is initiated by any Apex.If yes, then how can we use Continuation in this scenario. Many Thanks
Raghu NaniRaghu Nani
You can make up to three asynchronous callouts in a single continuation. Add these callout requests to the same continuation by using the addHttpRequest method of the Continuation class. The callouts run in parallel for this continuation and suspend the Visualforce request. Only after the external service returns all callouts, the Visualforce process resumes.
Asynchronous callouts are supported only through a Visualforce page. Making an asynchronous callout by invoking the action method outside a Visualforce page, such as in the Developer Console, isn’t supported.
Asynchronous callouts are available for Apex controllers and Visualforce pages saved in version 30.0 and later. If JavaScript remoting is used, version 31.0 or later is required.
Vineet GoelVineet Goel
I am trying to find a way so that Continuation can be initiated through Apex as mentioned in the code indirectly.