Challenge Overview
Introduction:
The goal of this challenge is to enhance a manager to schedule Batch Jobs.
It’s a common post deployment task for administrators to start , monitor and stop Schedule jobs . This challenge aims at giving administrators a tool to perform these tasks with ease as well as run jobs in a specified sequence.
Functionality:
Your aim would be to provide following new functionalities in the tool:
- Ability to create group of jobs
- Prioritize/sequence jobs within group
- Enhance the VF page to show Groups with nested jobs.
- Automatically start next job in sequence after the preceding Job Finished
IMP: we want this tool to be run as "plug and play". Meaning, the user should not need to make any changes to existing Batch jobs. So make sure that your code does not require user to implement any interface or write batch class in any specific manner to use this tool
Details:
1. Ability to create group of jobs:
- Create a new object named “Job Group”
- Fields :
- Name(Text),
- Active(checkbox)
- Fields :
- Create a new junction object, Job Group Member, between Job Group and Batch Job
- Fields:
- Job Group (lookup for Job group)
- Job (lookup for Job)
- Sequence (Integer): sequence of order of jobs within groups
- Fields:
2. VF Page to manage Group:
- Create a VF Page to Create/Edit a Group
- On this page provide a 2 listboxes
- Box 1 will have list of existing Jobs
- Box2 will have list of added Jobs
- Provide buttons to transfer jobs between the 2 boxes
- Against Box2 Provide buttons to order the jobs.
- Provide a button to create a new Job and it should be added to the group.
- Provide save cancel buttons.
3. Enhance the existing VF page that lists jobs to show Groups with nested jobs:
- Update the existing VF page to show Groups of Jobs.
- Add a button to start execution of Job Group. This should start the First job in sequence.
- The Member jobs should be shown nested below the Group
- Show status of each Member Job (Pending/ Running/ Complete)
- Show overall status of the Group (1 out of 5 job(s) complete, running job 2)
- You are free to change the current UI on the VF page as per your needs.
4. Automatically start next job in sequence after the preceding Job Finishes:
To attain this sequential execution you are free develop any solution you can.
But we do have a suggestion but you are free to try other ways.
Our suggestion is to create a master or daemon job that runs at every minute.
This job will check for all active groups and status of their member jobs. When a member job completes, the next in sequence will be started by the daemon.
You will also have to make sure that the Daemon Job is started automatically. This could be done via a trigger when the First Group Job is created.
IMP: we want this tool to be run as "plug and play". Meaning, the user should not need to make any changes to existing Batch jobs. So make sure that your code does not require user to implement any interface or write batch class in any specific manner to use the tool
Note: Code dump of existing solution will be provided separately in the forum.
Final Submission Guidelines
Submission details:
- Provide an SRC package (Ant or Unmanaged Package or both) of your code.
- Provide a detailed document of your solution including details for installation and setup.
- Provide any details about governor limits or any other limitations to your solution.
- Provide a simple video of you solution in action. If English is not your first language feel free to annotate your video with text.