SlideShare a Scribd company logo
Apex Liberation : The evolution
of Flex Queue
​ Carolina Ruiz Medina
​ Principal Developer, Product Innovation team
​ cruiz@financialforce.com
​ @CarolEnLaNube
​ @CodeCoffeeCloud
​ Stephen Willcock
​ Director, Product Innovation
​ swillcock@financialforce.com
​ @stephenwillcock
Carolina Ruiz Medina
Principal Developer, Product Innovation Team at
FinancialForce.com
cruiz@financialforce.com
@CarolEnLaNube
@CodeCoffeeCloud
Stephen Willcock
Director, Product Innovation at FinancialForce.com
swillcock@financialforce.com
@stephenwillcock
foobarforce.com
About
GREAT ALONE. BETTER TOGETHER.
•  Native to Salesforce1™ Platform
since 2009
•  Investors include Salesforce Ventures
•  650+ employees, San Francisco based
4
Heavy lifting
•  Normal Execution limited by Apex
Governors
•  Number of records to process
•  CPU Time
•  Heap Size
Working Synchronously
Making light work
Making light work
Higher limits in Asynchronous
•  @future
• Queueable
•  Batch
• Pipeline (pilot)
Execute when there are
available resources
@future
​ Process a higher
number of records
​ Increased Governor
Limits in Async
We don’t have job id for @future jobs
as @future does not return anything
The method does not necessarily execute in
the same order is called
We can’t monitor @future jobs
Parameters must be primitive data types
@future - show me the code!
​ public with sharing class FutureClass {
​  @future
​ static void myMethod(String a, Integer i) {
​  System.debug(’Primitive variable' + a + ' and ' + i+’But I run ASYNCHROUNOUSLY');
​  // ALL THE LOGIC HERE
​  }
​ }
We can track/monitor the batch jobs:
DataBase.executeBatch returns Id
​ We can only run 5 concurrent jobs
Batch Apex
We can chain batch jobs
Possibility to use iterator and process
different objects (or none)
We cannot reorder or set priorities
Process up to 50M records
Batch Apex - show me the code!
public class UpdateAccountFields implements Database.Batchable<sObject>{
​  public final String Query; public final String Entity;
​  public final String Field; public final String Value;
​  public UpdateAccountFields(String q, String e, String f, String v){
​  Query=q; Entity=e; Field=f;Value=v;
​  }
​  public Database.QueryLocator start(Database.BatchableContext BC){
​  return Database.getQueryLocator(query);
​  }
​  public void execute(Database.BatchableContext BC,
​  List<sObject> scope){
​  for(Sobject s : scope){s.put(Field,Value);
​  } update scope;
​  }
​  public void finish(Database.BatchableContext BC){
​  }
​ }
Simple Batch Apex Examples
Async Limits
​ Execution Governors
Batch start
Batch execute
Batch finish
@future
Queueable
250,000 method
calls in a 24 hour
period
Scheduled
The Evolution… of Async Apex
The evolution of @future - Queueable
​ public class AsyncExecutionExample implements Queueable, Database.AllowsCallouts {
​  public void execute(QueueableContext context) {
​  Account a = new Account(Name='Acme',Phone='(415) 555-1212');
​  insert a;
​  }
​ }
ID jobID = System.enqueueJob(new AsyncExecutionExample());
AsyncApexJob jobInfo = [SELECT Status,NumberOfErrors FROM AsyncApexJob WHERE
Id=:jobID];
The evolution of @future - Queueable
​ public class AsyncExecutionExample implements Queueable, Database.AllowsCallouts {
​  public void execute(QueueableContext context) {
​  Account a = new Account(Name='Acme',Phone='(415) 555-1212');
​  insert a;
​  }
​ }
ID jobID = System.enqueueJob(new AsyncExecutionExample());
AsyncApexJob jobInfo = [SELECT Status,NumberOfErrors FROM AsyncApexJob WHERE
Id=:jobID];
Supported but
undocumented
The evolution of @future – Enhanced Futures (pilot)
@future (limits=2xHEAP)
public static void myMemoryHog() { }
@future (limits=3xCPU)
public static void myIntenseLogicalProcessing() { }
Blogged June 2014: Bigger Apex Limits with Enhanced Futures
The evolution of Batch Apex…
The evolution of Batch Apex - Flex Queue
Spring 15
Flex Queue
introduced
95 Batch Apex jobs
in the Flex Queue
waiting to be
processed + 5
concurrent Batch
Apex processes
Reorder Flex Queue
items via a Flex
Queue UI
Summer 15
Reorder Flex Queue
items
programmatically
(pilot)
Winter 16
Reorder Flex Queue
items
programmatically
GA
​ Reordering Flex Queue items programmatically
​ Summer 15:
​ Boolean isSuccess = System.moveFlexQueueJob(jobId, positionNumber);
​ Winter 16:
​ Boolean isSuccess = FlexQueue.moveBeforeJob(jobToMoveId, jobInQueueId);
​ Boolean isSuccess = FlexQueue.moveAfterJob(jobToMoveId, jobInQueueId);
​ Boolean isSuccess = FlexQueue.moveJobToEnd(jobId);
​ Boolean isSuccess = FlexQueue.moveJobToFront(jobId);
The evolution of Batch Apex - Flex Queue
Show me the code!
Release Notes:
FlexQueue Class
New Methods
​ Abort Flex Queue jobs and processing jobs in the same way:
​ system.abortJob(jobId);
The evolution of Batch Apex - Flex Queue
Show me the code!
•  Proof of Concept
•  Manage Flex Queue jobs
•  Lightning Components
​ 
Introducing…
BatchMan
Brad Slater
@innovativebrad
Demo
The further evolution of Batch Apex
Spring 15
Flex Queue
introduced
95 Batch Apex jobs
in the Flex Queue
waiting to be
processed + 5
concurrent Batch
Apex processes
Reorder Flex Queue
items via a Flex
Queue UI
Summer 15
Reorder Flex Queue
items
programmatically
(pilot)
Winter 16
Reorder Flex Queue
items
programmatically
GA
???
Programmatically
determine current
Flex Queue order
Queueable jobs in
Flex Queue
What can Flex Queue
Do for us?
1.  Queue up to 100 jobs rather than killing any more than 5
2.  Batch Apex no longer limited to admins – if you build an App for your users
3.  We can implement our own prioritization mechanism
…. Rememeber, with a great power, comes great
responsibility
…. Remember, with great power, comes great responsibility
1.  Consider the effect of new job status value on existing Batch management
code
2.  Consider the possibility of jobs never being processed
3.  Processes may be dependent on one another - strategy for chaining jobs in
the Flex Queue
4.  Multiple processes managing the Flex Queue (currently no ability to read
the current order)
Recap
1.  Having Several Async Processes
1.  @future
2.  Queueable
3.  Batch Jobs
2.  What to do now? Which one to use? Always batch?
1.  You should use the one that better fits to your necessity …. The power is now
in your hands!!
Thank you

More Related Content

PPTX
Apex Liberation - the evolution of Flex Queue (DF15)
PDF
Moving from app services to azure functions
PPTX
Deploying Machine Learning in production without servers - #serverlessCPH
PDF
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
PPTX
What's new in c# 8.0
PDF
2019-05-16 aOS Luxembourg - 6 - Flow avancé - Serge Luca
PDF
Infrastructure as Code
PPTX
Application Monitoring in a Post-Server World: Why Data Context is Critical
Apex Liberation - the evolution of Flex Queue (DF15)
Moving from app services to azure functions
Deploying Machine Learning in production without servers - #serverlessCPH
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
What's new in c# 8.0
2019-05-16 aOS Luxembourg - 6 - Flow avancé - Serge Luca
Infrastructure as Code
Application Monitoring in a Post-Server World: Why Data Context is Critical

What's hot (20)

PDF
AtlasCamp 2013: Bring your own Stack
PDF
Plaλ!
PPTX
Automating Application over OpenStack using Workflows
PPTX
State in stateless serverless functions
PDF
Scaling Your First 1000 Containers with Docker
PDF
OpenStack Heat slides
PPTX
Application Monitoring in a Post-Server World: Why Data Context is Critical
PPTX
2020.02.15 DelEx - CI/CD in AWS Cloud
PDF
Manage any AWS resources with Terraform 0.12 - April 2020
PPTX
Provisioning SPFx Solutions to SharePoint Online using PnP, ALM APIs and more!
PDF
Nils Rhode - Does it always have to be k8s - TeC Day 2019
PDF
Infrastructure as code
PDF
Infrastructure as Code
PDF
Terraform Code Reviews: Supercharged with Conftest
PDF
Redefining Plattform "Openness" with OpenFaaS
PDF
Presentation tim numann
PDF
Frail & Cast Iron tools - a Postman Case Study
PDF
AWS Connect 2017 - Container (feat. AWS)
PPTX
Eric Williams (Rackspace) - Using Heat on OpenStack
PDF
Spca2014 chris o brien modern share-point development - techniques for off-...
AtlasCamp 2013: Bring your own Stack
Plaλ!
Automating Application over OpenStack using Workflows
State in stateless serverless functions
Scaling Your First 1000 Containers with Docker
OpenStack Heat slides
Application Monitoring in a Post-Server World: Why Data Context is Critical
2020.02.15 DelEx - CI/CD in AWS Cloud
Manage any AWS resources with Terraform 0.12 - April 2020
Provisioning SPFx Solutions to SharePoint Online using PnP, ALM APIs and more!
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Infrastructure as code
Infrastructure as Code
Terraform Code Reviews: Supercharged with Conftest
Redefining Plattform "Openness" with OpenFaaS
Presentation tim numann
Frail & Cast Iron tools - a Postman Case Study
AWS Connect 2017 - Container (feat. AWS)
Eric Williams (Rackspace) - Using Heat on OpenStack
Spca2014 chris o brien modern share-point development - techniques for off-...
Ad

Viewers also liked (20)

PPT
Salesforce1 Platform for programmers
PPTX
Force.com Canvas - Admin-approved, User-approved, and Personal Apps Unlocked
POTX
Hands-on Workshop: Intermediate Development with Heroku and Force.com
PPTX
Security Boundaries in Apex
PDF
Angular-ifying Your Visualforce Pages
PDF
Apex Connector for Lightning Connect: Make Anything a Salesforce Object
PDF
Building High-Performance Force.com Applications in React
PDF
Build Better Data-Driven Insights
PDF
10 Principles of Apex Testing
PPTX
Go Faster with Lightning Process Builder
PPTX
Integrate with External Systems using Apex Callouts
PPTX
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
PPTX
Salesforce CSI: Uncover What Was Previously Built
PPTX
Visualizing Your Business Data... in Minecraft!
PPTX
Final user provisioning webinar draft 2
PPTX
The Power of Study Groups
PPTX
10 Essential Dreamforce '15 Tips for Admins & Developers
PDF
Batch Jobs: Beyond the Basics
POTX
Using the Google SOAP API
PDF
Architecting Packages with Lightning Components
Salesforce1 Platform for programmers
Force.com Canvas - Admin-approved, User-approved, and Personal Apps Unlocked
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Security Boundaries in Apex
Angular-ifying Your Visualforce Pages
Apex Connector for Lightning Connect: Make Anything a Salesforce Object
Building High-Performance Force.com Applications in React
Build Better Data-Driven Insights
10 Principles of Apex Testing
Go Faster with Lightning Process Builder
Integrate with External Systems using Apex Callouts
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Salesforce CSI: Uncover What Was Previously Built
Visualizing Your Business Data... in Minecraft!
Final user provisioning webinar draft 2
The Power of Study Groups
10 Essential Dreamforce '15 Tips for Admins & Developers
Batch Jobs: Beyond the Basics
Using the Google SOAP API
Architecting Packages with Lightning Components
Ad

Similar to Apex Liberation: The Evolution of FlexQueues (20)

PPTX
Apex Flex Queue: Batch Apex Liberated
PPTX
Asynchronous Apex Salesforce World Tour Paris 2015
PPTX
WinOps Conf 2016 - Michael Greene - Release Pipelines
PPTX
End to-end async and await
PDF
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
ODP
Scala Future & Promises
PDF
Spring Batch Performance Tuning
PPTX
Salesforce Summer 14 Release
PDF
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
PDF
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
PPTX
slides.pptx
ODP
Intro To Spring Python
PDF
Building a Complex, Real-Time Data Management Application
PPTX
ServerLess by usama Azure fuctions.pptx
PPT
내꺼내꺼
PPTX
Salesforce asynchronous apex
PPTX
DF12 - Process Orchestration using Streaming API and Heroku
PDF
Heat up your stack
PPT
Simple tools to fight bigger quality battle
PDF
Apex Enterprise Patterns: Building Strong Foundations
Apex Flex Queue: Batch Apex Liberated
Asynchronous Apex Salesforce World Tour Paris 2015
WinOps Conf 2016 - Michael Greene - Release Pipelines
End to-end async and await
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Scala Future & Promises
Spring Batch Performance Tuning
Salesforce Summer 14 Release
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
Kubo (Cloud Foundry Container Platform): Your Gateway Drug to Cloud-native
slides.pptx
Intro To Spring Python
Building a Complex, Real-Time Data Management Application
ServerLess by usama Azure fuctions.pptx
내꺼내꺼
Salesforce asynchronous apex
DF12 - Process Orchestration using Streaming API and Heroku
Heat up your stack
Simple tools to fight bigger quality battle
Apex Enterprise Patterns: Building Strong Foundations

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PPTX
TrailheaDX India : Developer Highlights
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
Lightning web components - Episode 4 : Security and Testing
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
TrailheaDX India : Developer Highlights
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
Lightning web components - Episode 4 : Security and Testing
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
Approach and Philosophy of On baking technology
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Encapsulation theory and applications.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Tartificialntelligence_presentation.pptx
Hybrid model detection and classification of lung cancer
Approach and Philosophy of On baking technology
A novel scalable deep ensemble learning framework for big data classification...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
1 - Historical Antecedents, Social Consideration.pdf
A comparative study of natural language inference in Swahili using monolingua...
Zenith AI: Advanced Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Group 1 Presentation -Planning and Decision Making .pptx
NewMind AI Weekly Chronicles - August'25-Week II
MIND Revenue Release Quarter 2 2025 Press Release
Accuracy of neural networks in brain wave diagnosis of schizophrenia
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf

Apex Liberation: The Evolution of FlexQueues

  • 1. Apex Liberation : The evolution of Flex Queue ​ Carolina Ruiz Medina ​ Principal Developer, Product Innovation team ​ cruiz@financialforce.com ​ @CarolEnLaNube ​ @CodeCoffeeCloud ​ Stephen Willcock ​ Director, Product Innovation ​ swillcock@financialforce.com ​ @stephenwillcock
  • 2. Carolina Ruiz Medina Principal Developer, Product Innovation Team at FinancialForce.com cruiz@financialforce.com @CarolEnLaNube @CodeCoffeeCloud
  • 3. Stephen Willcock Director, Product Innovation at FinancialForce.com swillcock@financialforce.com @stephenwillcock foobarforce.com
  • 4. About GREAT ALONE. BETTER TOGETHER. •  Native to Salesforce1™ Platform since 2009 •  Investors include Salesforce Ventures •  650+ employees, San Francisco based 4
  • 5. Heavy lifting •  Normal Execution limited by Apex Governors •  Number of records to process •  CPU Time •  Heap Size Working Synchronously
  • 7. Making light work Higher limits in Asynchronous •  @future • Queueable •  Batch • Pipeline (pilot)
  • 8. Execute when there are available resources @future ​ Process a higher number of records ​ Increased Governor Limits in Async We don’t have job id for @future jobs as @future does not return anything The method does not necessarily execute in the same order is called We can’t monitor @future jobs Parameters must be primitive data types
  • 9. @future - show me the code! ​ public with sharing class FutureClass { ​  @future ​ static void myMethod(String a, Integer i) { ​  System.debug(’Primitive variable' + a + ' and ' + i+’But I run ASYNCHROUNOUSLY'); ​  // ALL THE LOGIC HERE ​  } ​ }
  • 10. We can track/monitor the batch jobs: DataBase.executeBatch returns Id ​ We can only run 5 concurrent jobs Batch Apex We can chain batch jobs Possibility to use iterator and process different objects (or none) We cannot reorder or set priorities Process up to 50M records
  • 11. Batch Apex - show me the code! public class UpdateAccountFields implements Database.Batchable<sObject>{ ​  public final String Query; public final String Entity; ​  public final String Field; public final String Value; ​  public UpdateAccountFields(String q, String e, String f, String v){ ​  Query=q; Entity=e; Field=f;Value=v; ​  } ​  public Database.QueryLocator start(Database.BatchableContext BC){ ​  return Database.getQueryLocator(query); ​  } ​  public void execute(Database.BatchableContext BC, ​  List<sObject> scope){ ​  for(Sobject s : scope){s.put(Field,Value); ​  } update scope; ​  } ​  public void finish(Database.BatchableContext BC){ ​  } ​ } Simple Batch Apex Examples
  • 12. Async Limits ​ Execution Governors Batch start Batch execute Batch finish @future Queueable 250,000 method calls in a 24 hour period Scheduled
  • 13. The Evolution… of Async Apex
  • 14. The evolution of @future - Queueable ​ public class AsyncExecutionExample implements Queueable, Database.AllowsCallouts { ​  public void execute(QueueableContext context) { ​  Account a = new Account(Name='Acme',Phone='(415) 555-1212'); ​  insert a; ​  } ​ } ID jobID = System.enqueueJob(new AsyncExecutionExample()); AsyncApexJob jobInfo = [SELECT Status,NumberOfErrors FROM AsyncApexJob WHERE Id=:jobID];
  • 15. The evolution of @future - Queueable ​ public class AsyncExecutionExample implements Queueable, Database.AllowsCallouts { ​  public void execute(QueueableContext context) { ​  Account a = new Account(Name='Acme',Phone='(415) 555-1212'); ​  insert a; ​  } ​ } ID jobID = System.enqueueJob(new AsyncExecutionExample()); AsyncApexJob jobInfo = [SELECT Status,NumberOfErrors FROM AsyncApexJob WHERE Id=:jobID]; Supported but undocumented
  • 16. The evolution of @future – Enhanced Futures (pilot) @future (limits=2xHEAP) public static void myMemoryHog() { } @future (limits=3xCPU) public static void myIntenseLogicalProcessing() { } Blogged June 2014: Bigger Apex Limits with Enhanced Futures
  • 17. The evolution of Batch Apex…
  • 18. The evolution of Batch Apex - Flex Queue Spring 15 Flex Queue introduced 95 Batch Apex jobs in the Flex Queue waiting to be processed + 5 concurrent Batch Apex processes Reorder Flex Queue items via a Flex Queue UI Summer 15 Reorder Flex Queue items programmatically (pilot) Winter 16 Reorder Flex Queue items programmatically GA
  • 19. ​ Reordering Flex Queue items programmatically ​ Summer 15: ​ Boolean isSuccess = System.moveFlexQueueJob(jobId, positionNumber); ​ Winter 16: ​ Boolean isSuccess = FlexQueue.moveBeforeJob(jobToMoveId, jobInQueueId); ​ Boolean isSuccess = FlexQueue.moveAfterJob(jobToMoveId, jobInQueueId); ​ Boolean isSuccess = FlexQueue.moveJobToEnd(jobId); ​ Boolean isSuccess = FlexQueue.moveJobToFront(jobId); The evolution of Batch Apex - Flex Queue Show me the code! Release Notes: FlexQueue Class New Methods
  • 20. ​ Abort Flex Queue jobs and processing jobs in the same way: ​ system.abortJob(jobId); The evolution of Batch Apex - Flex Queue Show me the code!
  • 21. •  Proof of Concept •  Manage Flex Queue jobs •  Lightning Components ​  Introducing… BatchMan Brad Slater @innovativebrad
  • 22. Demo
  • 23. The further evolution of Batch Apex Spring 15 Flex Queue introduced 95 Batch Apex jobs in the Flex Queue waiting to be processed + 5 concurrent Batch Apex processes Reorder Flex Queue items via a Flex Queue UI Summer 15 Reorder Flex Queue items programmatically (pilot) Winter 16 Reorder Flex Queue items programmatically GA ??? Programmatically determine current Flex Queue order Queueable jobs in Flex Queue
  • 24. What can Flex Queue Do for us? 1.  Queue up to 100 jobs rather than killing any more than 5 2.  Batch Apex no longer limited to admins – if you build an App for your users 3.  We can implement our own prioritization mechanism
  • 25. …. Rememeber, with a great power, comes great responsibility
  • 26. …. Remember, with great power, comes great responsibility 1.  Consider the effect of new job status value on existing Batch management code 2.  Consider the possibility of jobs never being processed 3.  Processes may be dependent on one another - strategy for chaining jobs in the Flex Queue 4.  Multiple processes managing the Flex Queue (currently no ability to read the current order)
  • 27. Recap 1.  Having Several Async Processes 1.  @future 2.  Queueable 3.  Batch Jobs 2.  What to do now? Which one to use? Always batch? 1.  You should use the one that better fits to your necessity …. The power is now in your hands!!