0

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 could have 100 SOQL statements in processing method for each continuation? Or does the whole continuation chain share the same execution context and should obey to similar limits as ordinary web request processing?

I would assume that it should be separate transaction context per continuation, since request is getting back to VF page after each piece of chain is processed, sort of ping-pong between VF page and apex controller (up to 3 times - max number of continuation in chain).

Any help would be appreciated.

1

Asynchronous Callout Limits: When a continuation is executing, the continuation-specific limits apply. When the continuation returns and the request resumes, a new Apex transaction starts. All Apex and Visualforce limits apply and are reset in the new transaction, including the Apex callout limits.

The following are Apex and Visualforce limits that are specific to a continuation.

enter image description here

  • 1
    Great, thanks! So basically we may triple SOQL/DML limits this way. Is it possible not to do http request from continuation at all? In other words just use continuation to start new transaction scope keeping VF page still waiting for results. – wesaw Nov 12 '18 at 12:35
  • @wesaw Honestly I'm not sure about not doing http part but continuations are ment for asynchronous callouts! – codeyinthecloud Nov 12 '18 at 13:24
  • @wesaw did you ever find out if you can chain Continuation objects without using http requests? Is there a reason why you were trying to avoid using http requests in the Continuation object? – Peter Noges Mar 8 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.