## Overview

The Batch Job Quick Access widget provides a brief overview of a selected job. The job can be started or configured directly from within the widget. It displays the status of the most recent execution of a selected batch job and offers action buttons to start, configure, suspend, or resume the job.

This widget serves as a quick-access interface for jobs that run asynchronously in the background, without requiring users to navigate to dedicated job management pages.

## Use Cases

### Administrative Dashboards
Display status of critical system jobs (data synchronization, cleanup tasks, exports) on admin overview pages. Multiple widget instances can be placed on a single page to monitor several jobs at once.

### Department/Team Pages
Allow department managers to monitor and trigger department-specific jobs (e.g., employee data exports) directly from their department page.

### Configuration Pages
Embed on pages related to job configuration to provide immediate execution capability and status feedback after making configuration changes.

### Operational Monitoring
Create dedicated monitoring pages that aggregate multiple batch jobs using multiple widget instances, providing a single view of all background processing activities.

## Design Considerations

### Extension-Based Architecture
The widget requires a corresponding `BatchJobQuickGlanceExtension` implementation in a plugin. This means:
- Widget can only be embedded where at least one extension is selectable
- Extensions control where they can be used via `isSelectableIn()` method
- Extensions define which buttons are shown (configuration, download, suspend/resume)

### Real-Time Updates
The widget automatically polls for updates every 5 seconds when a job is running:
- Stops polling when job completes
- Restarts on new job creation
- Provides loading indicators during operations

### Single Job Focus
Each widget instance monitors only one batch job and shows only the most recent execution. For job history, users need to navigate to the detailed job view.

### Security Model
Access control is delegated to extension implementations. Default behavior allows anyone who can view the page to start the job, but extensions can implement custom permission checks.

## When NOT to Use

- For real-time operations that don't use the batch job infrastructure
- When jobs don't create persistent job records in the system
- For simple actions that complete immediately (use regular action handlers instead)
- When you need to show job execution history (use Embedded Search widgets configured to show PersistentJob entities)

## Related Widgets

- **Attributes Widget**: Often used alongside to show job configuration settings on the same page
- **Comments Widget**: Useful for team communication about job issues or results
- **Embedded Search Widgets**: Can display a list of all historical job executions if configured to search PersistentJob entities
