PHPackages                             rapidkit/laravel-camunda-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rapidkit/laravel-camunda-client

ActiveLibrary[API Development](/categories/api)

rapidkit/laravel-camunda-client
===============================

High level model, something like Eloquent, to interact with Camunda resources via REST API.

v1.1.1(1y ago)06[1 PRs](https://github.com/RapidKit/laravel-camunda-client/pulls)MITPHPPHP ^8.1

Since Sep 3Pushed 1y agoCompare

[ Source](https://github.com/RapidKit/laravel-camunda-client)[ Packagist](https://packagist.org/packages/rapidkit/laravel-camunda-client)[ Docs](https://github.com/rapidkit/laravel-camunda-client)[ RSS](/packages/rapidkit-laravel-camunda-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (15)Versions (6)Used By (0)

This is my package laravel-camunda-client
=========================================

[](#this-is-my-package-laravel-camunda-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2ed6e50d7faf1388dd10b336792757e9225a6a3142ebe169d88bc4796ad5c444/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72617069646b69742f6c61726176656c2d63616d756e64612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rapidkit/laravel-camunda-client)[![GitHub Tests Action Status](https://camo.githubusercontent.com/145a69fc0570faf02e686ffcc46e67cb21a9cbf33e8b7bb3127faa7853b921b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72617069646b69742f6c61726176656c2d63616d756e64612d636c69656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rapidkit/laravel-camunda-client/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Static Analysis Action Status](https://camo.githubusercontent.com/a0b7d902d67ddce8de0018aefc2b48efc091a4f4c5da297576308d40be865637/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72617069646b69742f6c61726176656c2d63616d756e64612d636c69656e742f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d737461746963253230616e616c79736973267374796c653d666c61742d737175617265)](https://github.com/rapidkit/laravel-camunda-client/actions?query=workflow%3Aphpstan+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/21afe819dc4574e8f4de514830d0f34fd621dbfe1f27858fca0d85679caaf38c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72617069646b69742f6c61726176656c2d63616d756e64612d636c69656e742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rapidkit/laravel-camunda-client/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d796a4980cb8af5c8344b3b5a554c7977c707ab1696aac3e84c5fc44ea0f7777/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72617069646b69742f6c61726176656c2d63616d756e64612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rapidkit/laravel-camunda-client)

Introducing a convenient Laravel HTTP client wrapper designed to streamline your interactions with the Camunda REST API. This specialized tool simplifies the process of connecting your Laravel application to Camunda, allowing you to effortlessly send requests and retrieve data. With this wrapper, you can efficiently integrate Camunda's powerful workflow automation capabilities into your Laravel projects, making it easier than ever to orchestrate complex business processes and manage tasks seamlessly. Say goodbye to the hassles of manual API calls and hello to a smoother, more efficient workflow integration with Camunda.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rapidkit/laravel-camunda-client
```

You can publish the config file with:

```
php artisan vendor:publish --tag='laravel-camunda-client-config'
```

This is the contents of the published config file:

```
return [
    'url' => env('CAMUNDA_URL', 'http://127.0.0.1:8080/engine-rest'),
    'user' => env('CAMUNDA_USER', 'demo'),
    'password' => env('CAMUNDA_PASSWORD', 'demo'),
    'tenant_id' => env('CAMUNDA_TENANT_ID', ''),
];
```

Usage
-----

[](#usage)

### Process Definition

[](#process-definition)

```
use RapidKit\LaravelCamundaClient\Http\ProcessDefinitionClient;

$variables = ['title' => ['value' => 'Sample Title', 'type' => 'string']];

// Start new process instance
$instance = ProcessDefinitionClient::start(key: 'process_1', variables: $variables);

// Start new process instance with some business key
$instance = ProcessDefinitionClient::start(key: 'process_1', variables: $variables, businessKey: 'somekey');

// Get BPMN definition in XML format
ProcessDefinitionClient::xml(key: 'process_1');
ProcessDefinitionClient::xml(id: 'process_1:xxxx');

// Get all definition
ProcessDefinitionClient::get();

// Get definitions based on some parameters
$params = ['latestVersion' => true];
ProcessDefinitionClient::get($params);
```

Reference:

- [Camunda API: Process Definition](https://docs.camunda.org/manual/latest/reference/rest/process-definition)

### Process Instance

[](#process-instance)

```
use RapidKit\LaravelCamundaClient\Http\ProcessInstanceClient;

// Find by ID
$processInstance = ProcessInstanceClient::find(id: 'some-id');

// Get all instances
ProcessInstanceClient::get();

// Get instances based on some parameters
$params = ['businessKeyLike' => 'somekey'];
ProcessInstanceClient::get($params);

ProcessInstanceClient::variables(id: 'some-id');
ProcessInstanceClient::delete(id: 'some-id');
```

### Message Start Event

[](#message-start-event)

```
use RapidKit\LaravelCamundaClient\Http\MessageEventClient;

MessageEventClient::start(messageName: 'testing',  businessKey: 'businessKey');
```

### Message Event

[](#message-event)

```
use Laravolt\Camunda\Http\MessageEventClient;
// Start processinstance with message event
// Required
// messageName : message event name
// businessKey : Busniess key for process instance

// Rerturn Process insntance from message event

MessageEventClient::start(messageName: "testing",  businessKey: "businessKey")

$vars = ['title' => ['type' => 'String', 'value' => 'Sample Title']];
MessageEventClient::start(messageName: 'testing',  businessKey: 'businessKey', variables: $vars);
```

### Task

[](#task)

```
use RapidKit\LaravelCamundaClient\Http\TaskClient;

$task = TaskClient::find(id: 'task-id');
$tasks = TaskClient::getByProcessInstanceId(id: 'process-instance-id');
$tasks = TaskClient::getByProcessInstanceIds(ids: 'arrayof-process-instance-ids');
TaskClient::submit(id: 'task-id', variables: ['name' => ['value' => 'Foo', 'type' => 'String']]); // will return true or false
$variables = TaskClient::submitAndReturnVariables(id: 'task-id', variables: ['name' => ['value' => 'Foo', 'type' => 'String']]) // will return array of variable

// Claim a Task
$tasks = TaskClient::claim($task_id,  $user_id);
// Unclaim a Task
$tasks = TaskClient::unclaim($task_id);
// Assign a Task
$tasks = TaskClient::assign($task_id,  $user_id);
```

### External Task

[](#external-task)

```
use RapidKit\LaravelCamundaClient\Http\ExternalTaskClient;

$topics = [['topicName' => 'pdf', 'lockDuration' => 600_000]];
$externalTasks = ExternalTaskClient::fetchAndLock('worker1', $topics);
foreach ($externalTasks as $externalTask) {
    // do something with $externalTask
    // Mark as complete after finished
    ExternalTaskClient::complete($externalTask->id);
}

// Release some task
ExternalTaskClient::unlock($task->id)

// Get task locked
$externalTaskLocked = ExternalTaskClient::getTaskLocked();
```

### Consume External Task

[](#consume-external-task)

Create a new job to consume external task via `php artisan make:job ` and modify the skeleton:

```
use RapidKit\LaravelCamundaClient\Data\ExternalTaskData;
use RapidKit\LaravelCamundaClient\Http\ExternalTaskClient;

public function __construct(
    public string $workerId,
    public ExternalTaskData $task
) {
}

public function handle()
{
    // Do something with $this->task, e.g: get the variables and generate PDF
    $variables = \RapidKit\LaravelCamundaClient\Http\ProcessInstanceClient::variables($this->task->processDefinitionId);
    // PdfService::generate()

    // Complete the task
    $status = ExternalTaskClient::complete($this->task->id, $this->workerId);
}
```

Subscribe to some topic:

```
// AppServiceProvider.php
use RapidKit\LaravelCamundaClient\Http\ExternalTaskClient;

public function boot()
{
    ExternalTaskClient::subscribe('pdf', GeneratePdf::class);
}
```

Register the scheduler:

```
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    $schedule->command('camunda:consume-external-task --workerId=worker1')->everyMinute();
}
```

If you need shorter pooling time (sub-minute frequency), please check [Laravel Short Schedule](https://github.com/spatie/laravel-short-schedule).

References:

-
-
-

### Task History (Completed Task)

[](#task-history-completed-task)

```
use RapidKit\LaravelCamundaClient\Http\TaskHistoryClient;

$completedTask = TaskHistoryClient::find(id: 'task-id');
$completedTasks = TaskHistoryClient::getByProcessInstanceId(id: 'process-instance-id');
```

### Deployment

[](#deployment)

```
use RapidKit\LaravelCamundaClient\Http\DeploymentClient;

// Deploy bpmn file(s)
DeploymentClient::create('test-deploy', '/path/to/file.bpmn');
DeploymentClient::create('test-deploy', ['/path/to/file1.bpmn', '/path/to/file2.bpmn']);

// Get deployment list
DeploymentClient::get();

// Find detailed info about some deployment
DeploymentClient::find($id);

// Truncate (delete all) deployments
$cascade = true;
DeploymentClient::truncate($cascade);

// Delete single deployment
DeploymentClient::delete(id: 'test-deploy', cascade: $cascade);
```

### Raw Endpoint

[](#raw-endpoint)

You can utilize `RapidKit\LaravelCamundaClient\CamundaClient` to call any Camunda REST endpoint.

```
use RapidKit\LaravelCamundaClient\CamundaClient;

$response = CamundaClient::make()->get('version');
echo $response->status(); // 200
echo $response->object(); // sdtClass
echo $response->json(); // array, something like ['version' => '7.14.0']
```

> `CamundaClient::make()` is a wrapper for [Laravel HTTP Client](https://laravel.com/docs/master/http-client) with base URL already set based on your Camunda services configuration. Take a look at the documentation for more information.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [rama](https://github.com/ramaID)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

References
----------

[](#references)

- [Deployment](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/Deployment)
- [External Task](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/External-Task)
- [Message](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/Message)
- [Process Definition](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/Process-Definition)
- [Task](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/Task)
- [Task History](https://docs.camunda.org/rest/camunda-bpm-platform/7.19/#tag/Historic-Task-Instance)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~107 days

Total

4

Last Release

659d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9410e344b661fcb0319264467446384423df023307920369de706cd7fd34b469?d=identicon)[rapidkit](/maintainers/rapidkit)

---

Top Contributors

[![uyab](https://avatars.githubusercontent.com/u/149716?v=4)](https://github.com/uyab "uyab (75 commits)")[![qisthidev](https://avatars.githubusercontent.com/u/34129273?v=4)](https://github.com/qisthidev "qisthidev (70 commits)")[![purwadarozatun](https://avatars.githubusercontent.com/u/8139599?v=4)](https://github.com/purwadarozatun "purwadarozatun (22 commits)")[![faderik](https://avatars.githubusercontent.com/u/55375390?v=4)](https://github.com/faderik "faderik (2 commits)")[![marshallia](https://avatars.githubusercontent.com/u/12694360?v=4)](https://github.com/marshallia "marshallia (2 commits)")[![rizqi-111](https://avatars.githubusercontent.com/u/58018241?v=4)](https://github.com/rizqi-111 "rizqi-111 (2 commits)")

---

Tags

laravellaravoltcamundacamunda client

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rapidkit-laravel-camunda-client/health.svg)

```
[![Health](https://phpackages.com/badges/rapidkit-laravel-camunda-client/health.svg)](https://phpackages.com/packages/rapidkit-laravel-camunda-client)
```

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[laravolt/camunda

High level model, something like Eloquent, to interact with Camunda resources via REST API

2115.5k1](/packages/laravolt-camunda)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

106.1k](/packages/codebar-ag-laravel-zammad)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
