PHPackages                             processmaker/nayra - 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. processmaker/nayra

ActiveLibrary

processmaker/nayra
==================

BPMN compliant engine

1.12.4(5mo ago)13697.8k↓31%39[19 issues](https://github.com/ProcessMaker/nayra/issues)2Apache-2.0PHPCI passing

Since Apr 4Pushed 5mo ago29 watchersCompare

[ Source](https://github.com/ProcessMaker/nayra)[ Packagist](https://packagist.org/packages/processmaker/nayra)[ RSS](/packages/processmaker-nayra/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (175)Used By (2)

ProcessMaker Nayra
==================

[](#processmaker-nayra)

ProcessMaker Nayra is a package that provides base classes to implement a process execution engine. This includes patterns to implement activities, events and gateways.

How to execute a process
------------------------

[](#how-to-execute-a-process)

Load a BPMN definition

```
        $bpmnRepository = new BpmnDocument();
        $bpmnRepository->setEngine($this->engine);
        $bpmnRepository->setFactory($this->repository);
        $bpmnRepository->load('files/ParallelGateway.bpmn');

```

[![ParallelGateway diagram](/docs/diagrams/ParallelGateway.svg "ParallelGateway diagram")](/docs/diagrams/ParallelGateway.svg)

Get a reference to the process

```
        $process = $bpmnRepository->getProcess('ParallelGateway');

```

Create a data storage

```
        $dataStore = $this->repository->createDataStore();

```

Create a process instance

```
        $instance = $this->engine->createExecutionInstance($process, $dataStore);

```

Trigger the start event

```
        $start = $bpmnRepository->getStartEvent('StartEvent');
        $start->start($instance);

```

[![Start Event](/docs/diagrams/ParallelGateway_1.svg "Start Event")](/docs/diagrams/ParallelGateway_1.svg)

Execute tokens and run to the next state

```
        $this->engine->runToNextState();

```

One token arrives to the first task

```
        $firstTask = $bpmnRepository->getScriptTask('start');
        $token = $firstTask->getTokens($instance)->item(0);

```

[![First task](/docs/diagrams/ParallelGateway_2.svg "First task")](/docs/diagrams/ParallelGateway_2.svg)

Complete the first task

```
        $startActivity->complete($token);

```

Execute tokens and run to the next state

```
        $this->engine->runToNextState();

```

One token arrives to the second task and one to the third task

```
        $secondTask = $bpmnRepository->getScriptTask('ScriptTask_1');
        $token1 = $secondTask->getTokens($instance)->item(0);
        $thirdTask = $bpmnRepository->getScriptTask('ScriptTask_2');
        $token2 = $thirdTask->getTokens($instance)->item(0);

```

[![Second task and third task](/docs/diagrams/ParallelGateway_3.svg "Second task and third task")](/docs/diagrams/ParallelGateway_3.svg)

License
-------

[](#license)

ProcessMaker Nayra is open-sourced software licensed under the [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license.

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance69

Regular maintenance activity

Popularity49

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75.8% of commits — single point of failure

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 ~54 days

Recently: every ~131 days

Total

40

Last Release

159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ab66faa2bb09e27a5499a2aa35203a378d656d7df3b21582ace7f447cde8605?d=identicon)[processmaker](/maintainers/processmaker)

---

Top Contributors

[![caleeli](https://avatars.githubusercontent.com/u/8028650?v=4)](https://github.com/caleeli "caleeli (433 commits)")[![danloa](https://avatars.githubusercontent.com/u/14875032?v=4)](https://github.com/danloa "danloa (39 commits)")[![ryancooley](https://avatars.githubusercontent.com/u/867714?v=4)](https://github.com/ryancooley "ryancooley (29 commits)")[![marcoAntonioNina](https://avatars.githubusercontent.com/u/1747025?v=4)](https://github.com/marcoAntonioNina "marcoAntonioNina (17 commits)")[![hlorofos](https://avatars.githubusercontent.com/u/5462396?v=4)](https://github.com/hlorofos "hlorofos (15 commits)")[![boliviacoca](https://avatars.githubusercontent.com/u/74792291?v=4)](https://github.com/boliviacoca "boliviacoca (10 commits)")[![agustinbusso](https://avatars.githubusercontent.com/u/90727999?v=4)](https://github.com/agustinbusso "agustinbusso (9 commits)")[![nolanpro](https://avatars.githubusercontent.com/u/2546850?v=4)](https://github.com/nolanpro "nolanpro (9 commits)")[![processmaker-bot](https://avatars.githubusercontent.com/u/206180840?v=4)](https://github.com/processmaker-bot "processmaker-bot (4 commits)")[![tdondich](https://avatars.githubusercontent.com/u/3330334?v=4)](https://github.com/tdondich "tdondich (3 commits)")[![eiresendez](https://avatars.githubusercontent.com/u/90741874?v=4)](https://github.com/eiresendez "eiresendez (2 commits)")[![viezel](https://avatars.githubusercontent.com/u/312065?v=4)](https://github.com/viezel "viezel (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/processmaker-nayra/health.svg)

```
[![Health](https://phpackages.com/badges/processmaker-nayra/health.svg)](https://phpackages.com/packages/processmaker-nayra)
```

PHPackages © 2026

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