• Charly Jeganathan
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I'm working on the Apex Specialist Superbadge
I was able to complete Challenge 2: Implement an Apex class (called WarehouseCalloutService) that implements the queueable interface and makes a callout to the external service used for warehouse inventory management. 
-----------
public with sharing class WarehouseCalloutService implements Queueable, Database.AllowsCallouts {
    private static final String WAREHOUSE_URL = 'https://th-superbadge-apex.herokuapp.com/equipment';
    public static void execute(QueueableContext context)
    {
    ....
    }
}
------------
Challenge 3: Build scheduling logic that executes your callout and runs your code daily. The name of the schedulable class should be WarehouseSyncSchedule, and the scheduled job should be named WarehouseSyncScheduleJob.
=> I'm not sure how to schedule the queueable job 'WarehouseCalloutService' from the class 'WarehouseSyncSchedule'. Also not sure how to name the scheduled job 'WarehouseSyncScheduleJob'
I'm working on the Apex Specialist Superbadge
I was able to complete Challenge 2: Implement an Apex class (called WarehouseCalloutService) that implements the queueable interface and makes a callout to the external service used for warehouse inventory management. 
-----------
public with sharing class WarehouseCalloutService implements Queueable, Database.AllowsCallouts {
    private static final String WAREHOUSE_URL = 'https://th-superbadge-apex.herokuapp.com/equipment';
    public static void execute(QueueableContext context)
    {
    ....
    }
}
------------
Challenge 3: Build scheduling logic that executes your callout and runs your code daily. The name of the schedulable class should be WarehouseSyncSchedule, and the scheduled job should be named WarehouseSyncScheduleJob.
=> I'm not sure how to schedule the queueable job 'WarehouseCalloutService' from the class 'WarehouseSyncSchedule'. Also not sure how to name the scheduled job 'WarehouseSyncScheduleJob'
Tried doing a callout from an execute method in a queueable class and go the @future error -
Callout not allowed from this future method. Please enable callout by annotating the future method. eg: @Future(callout=true)
07:13:51.752 (8701449752265601)|SYSTEM_METHOD_EXIT|[1263]|System.Http.send(ANY)
Is there a way to annotate the execute with "(callout=true)".

I sounds like what i want to do may be doable if there's just some syntax to get the annotation.