Presented by Scott Covert / @scottbcovert
global class MyFutureClass {
@future
static void myMethod(String a, Integer i) {
System.debug('Method called with: ' + a + ' and ' + i);
// Perform long-running code
}
}
Allows you to kick-off long-running processes asynchronously to prevent CPU timeout
@future (callout=true)
public static void doCalloutFromFuture() {
//Add code to perform callout
}
* Slides taken from Dan Appleman's DF13 Session on Asynchronous Apex (Presentation) (Slides)