nerdexam
Salesforce

PDII · Question #218

A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run…

The correct answer is C. Use Queueable Apex to chain the jobs to run sequentially. See the full explanation below for the reasoning.

Question

A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially. How should the developer write this Apex code without running into running into governor limits and system limitations?

Options

  • AUse multiple @future methods for each process and callout
  • BUse Apex Scheduler to schedule each process
  • CUse Queueable Apex to chain the jobs to run sequentially
  • DUse Limits class to stop entire process once governor limits are reached

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    4% (1)
  • C
    74% (17)
  • D
    13% (3)

Community Discussion

No community discussion yet for this question.

Full PDII Practice