340 likes | 593 Views
batch apex scheduled apex the bulk API. Those *!#? Governor limits!. Execution Context. Actual person?. Session!. Person spoofing a person?. Some else’s session. Machine spoofing a person?. No Session! What the heck?. Batch Apex.
E N D
Execution Context Actual person? Session! Person spoofing a person? Some else’s session. Machine spoofing a person? No Session! What the heck?
Batch Apex • long-running database operations on the force.com platform • Abstracts the developer from batching • Fresh contexts to avoid governor limits!
More Batch Options! global class SuperBatch implements Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts { } • Database.Stateful • Maintain state across transactions. • If you don't specify Database.Stateful, all static and instance member variables are set back to their original values. • Database.AllowsCallouts • Allow HTTP requests
Scheduling Options • Cron Job Style or • User Interface
Schedulable Context • Set as the user who schedules the job • Records say “last modified by” that user • No session id! • Sessions have expiration • Executed in future • No authentication
Schedulable Limits • 100 jobs on the schedule at a time.
Bulk API client options • Wizard Demo
Bulk API client options cont… • Data Loader
Bulk API Formats • CSV or XML
Bulk API Binary Attachments Zip File Containing: