- How do I install the digitalstate/bpm-camunda-sdk in a Laravel project?
- Run `composer require digitalstate/bpm-camunda-sdk` in your Laravel project directory. The SDK is a standalone PHP library and doesn’t require additional Laravel-specific setup beyond Composer autoloading. Ensure your Laravel app uses PHP 8.0+ for full compatibility.
- Does this SDK support both Camunda 7 and Camunda 8 (Zeebe) workflows?
- Yes, the SDK supports Camunda 7 via REST APIs and Camunda 8 (Zeebe) via its event-driven protocol. Check the SDK’s documentation for version-specific configurations, as Camunda 8 may require additional setup like Zeebe client adapters or OAuth2 for cloud deployments.
- Can I use this SDK in a Laravel microservice architecture?
- Absolutely. The SDK is designed to work independently of Laravel’s monolithic structure, making it ideal for microservices. Wrap it in a Laravel Service Provider or facade to inject the Camunda client into your service containers, ensuring clean separation of concerns.
- How do I handle authentication between Laravel and Camunda?
- The SDK supports Basic Auth, OAuth2, and Camunda’s built-in security headers. Configure your Camunda client with credentials via the SDK’s constructor or environment variables. For cloud deployments, use OAuth2 tokens or API keys stored securely in Laravel’s `.env` file.
- Will this SDK work with Laravel’s queue system for async workflows?
- Yes, pair the SDK with Laravel Queues (Redis, Database) to offload heavy or long-running tasks. For example, dispatch a Laravel job when a Camunda process starts or a task is completed. Use Camunda’s event listeners to trigger queue jobs for async processing.
- Can I customize task handling to interact with Laravel controllers?
- Yes, extend the SDK to call Laravel controllers from Camunda tasks. Use the SDK’s task listeners to capture task events, then route them to Laravel routes or service methods. For example, listen for a `taskCreated` event and trigger a controller action to update UI or send notifications.
- What Laravel versions are officially supported by this SDK?
- The SDK is compatible with Laravel 8, 9, and 10, as it relies on PHP 8.0+ features. No Laravel-specific dependencies are required, so it integrates smoothly with modern Laravel apps. Test thoroughly if using Laravel 11 or future versions, as breaking changes may occur.
- How do I monitor and correlate logs between Laravel and Camunda?
- Use Laravel’s logging system to record SDK interactions, and correlate logs with Camunda’s audit logs via process instance IDs. Tools like Laravel Horizon or Camunda Operate can help visualize workflows. For advanced tracing, implement custom logging middleware to tag events with both Laravel and Camunda IDs.
- Are there alternatives to this SDK for Laravel-Camunda integration?
- Yes, alternatives include the official [Camunda BPM PHP SDK](http://camunda.github.io/camunda-bpm-php-sdk/) or building a custom wrapper using Laravel’s HTTP client. This SDK stands out for its Laravel-friendly helpers, facades, and event-driven integration, reducing boilerplate for common workflows.
- How do I handle errors or failed API calls to Camunda?
- Implement custom exceptions for Camunda-specific errors (e.g., `ProcessNotFoundException`) and use Laravel’s exception handling to log or retry failed requests. The SDK provides basic error responses, but you can extend it with retry logic using Laravel’s `retry` helper or queue-based retries for resilience.