Replace the Deprecated Bundle
First, replace cleverage/process-ui-bundle with the active fork:
composer require cleverage/ui-process-bundle
Import Routes
Add the bundle’s routes to config/routes.yaml:
process_ui:
resource: '@CleverAgeUiProcessBundle/Resources/config/routes.yaml'
Run Migrations Execute the migrations to set up the required database tables:
php bin/console doctrine:migrations:migrate
Create a Process UI User Generate an admin user via the CLI:
php bin/console cleverage:ui-process:user-create
Access the UI
Visit /process in your browser to see the Process UI dashboard.
Integrating with EasyAdmin Extend the bundle’s CRUD functionality into your existing EasyAdmin dashboard:
use CleverAge\UiProcessBundle\EasyAdmin\ProcessCrudController;
class CustomProcessCrudController extends ProcessCrudController {
public static function getEntityFqcn(): string {
return YourProcessEntity::class;
}
}
Register it in your EasyAdmin config:
# config/packages/easy_admin.yaml
easy_admin:
crud:
- CleverAge\UiProcessBundle\EasyAdmin\ProcessCrudController
Customizing Process Views
Override Twig templates in templates/CleverAgeUiProcessBundle/ to modify:
Async Log Indexing Configure Messenger for background log indexing (as shown in README) to avoid UI lag during searches.
Process Entities
Ensure your ProcessEntity implements CleverAge\ProcessBundle\Model\ProcessInterface:
use CleverAge\ProcessBundle\Model\ProcessInterface;
class YourProcess implements ProcessInterface {
// Required methods: getId(), getState(), etc.
}
Event Listeners
Hook into process lifecycle events (e.g., ProcessStartedEvent) to update UI dynamically:
use CleverAge\ProcessBundle\Event\ProcessStartedEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProcessUiSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents() {
return [
ProcessStartedEvent::class => 'onProcessStarted',
];
}
public function onProcessStarted(ProcessStartedEvent $event) {
// Trigger UI refresh or log indexing
}
}
Security
Restrict access to /process via firewall rules or role-based ACLs:
# config/packages/security.yaml
access_control:
- { path: ^/process, roles: ROLE_PROCESS_ADMIN }
Deprecation Warning
The original cleverage/process-ui-bundle is archived. Always use cleverage/ui-process-bundle to avoid broken dependencies.
Messenger Configuration
messenger:consume for log_index will block log searches.supervisorctl reread
supervisorctl update
supervisorctl start cleverage_log_indexer
EasyAdmin Version Conflicts
The bundle targets EasyAdmin 3.x. If using EasyAdmin 4+, check for compatibility or patch the bundle’s ProcessCrudController.
Log Indexing Overhead
Indexing large log files synchronously may time out. Use async messaging and monitor memory limits (--memory-limit=256M if needed).
Process Not Appearing in UI? Verify:
ProcessInterface.Blank UI Pages Clear cache and check for Twig errors:
php bin/console cache:clear
php bin/console debug:twig
Permission Issues
Ensure the user created via cleverage:ui-process:user-create has the correct roles (e.g., ROLE_PROCESS_ADMIN).
Custom Process States
Extend the bundle’s state machine by overriding the process_state table or using Doctrine extensions:
// src/Entity/ProcessStateExtension.php
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class ProcessStateExtension {
#[ORM\Column(type: 'string', nullable: true)]
private ?string $customMetadata = null;
}
Dynamic UI Filters
Add custom filters to the Process > History page by extending the ProcessCrudController:
public function configureFields(string $pageName): iterable {
yield FilterField::new('customField')
->setFormTypeOption('placeholder', 'Filter by custom field...');
}
Webhook Triggers
Use Symfony’s HttpClient to notify external systems when processes transition:
use CleverAge\ProcessBundle\Event\ProcessTransitionEvent;
public function onProcessTransition(ProcessTransitionEvent $event) {
$client = new Client();
$client->request('POST', 'https://external-api.com/webhook', [
'json' => ['process_id' => $event->getProcess()->getId()]
]);
}
->paginate(20) to queries in ProcessCrudController to limit loaded processes.fetch: 'LAZY' for process relationships in Doctrine mappings to reduce N+1 queries.How can I help you explore Laravel packages today?