PHPackages                             tatter/workflows - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tatter/workflows

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tatter/workflows
================

Job task control through dynamic workflows, for CodeIgniter 4

v4.1.0(4y ago)211.7k6[2 issues](https://github.com/tattersoftware/codeigniter4-workflows/issues)[1 PRs](https://github.com/tattersoftware/codeigniter4-workflows/pulls)MITPHPPHP ^7.3 || ^8.0

Since Jun 12Pushed 2y ago3 watchersCompare

[ Source](https://github.com/tattersoftware/codeigniter4-workflows)[ Packagist](https://packagist.org/packages/tatter/workflows)[ Docs](https://github.com/tattersoftware/codeigniter4-workflows)[ Fund](https://paypal.me/tatter)[ GitHub Sponsors](https://github.com/tattersoftware)[ RSS](/packages/tatter-workflows/feed)WikiDiscussions develop Synced 2w ago

READMEChangelog (10)Dependencies (13)Versions (37)Used By (0)

Tatter\\Workflows
=================

[](#tatterworkflows)

Job action control through dynamic workflows, for CodeIgniter 4

[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/phpunit.yml)[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/phpstan.yml)[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/deptrac.yml)[![Coverage Status](https://camo.githubusercontent.com/68f26c8a21f88591eb968dba4973da0bb9cf8e94ffe25ee4a230db6ab9678cb8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f746174746572736f6674776172652f636f646569676e69746572342d776f726b666c6f77732f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/tattersoftware/codeigniter4-workflows?branch=develop)

Quick Start
-----------

[](#quick-start)

1. Install with Composer: `> composer require tatter/workflows`
2. Update the database: `> php spark migrate -all`
3. Register actions: `> php spark actions:register`
4. Start your first workflow: https://\[yourdomain.com\]/workflows

Features
--------

[](#features)

**Workflows** functions as a super-controller for CodeIgniter 4, allowing developers to write their own actions as classes and then string them together for job flow controls.

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

[](#installation)

Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:

```
> composer require tatter/workflows
```

Or, install manually by downloading the source files and adding the directory to **app/Config/Autoload.php**.

Once the files are downloaded and included in the autoload, run any library migrations to ensure the database is setup correctly:

```
> php spark migrate -all
```

Configuration (optional)
------------------------

[](#configuration-optional)

The library's default behavior can be altered by extending its config file. Copy **examples/Workflows.php** to **app/Config/** and follow the instructions in the comments. If no config file is found in **app/Config/** the library will use its own.

**Workflows** uses [Tatter\\Users](https://github.com/tattersoftware/codeigniter4-users) to work with user records. Follow the instructions to verify you have a compatible authentication library with classes that implement the `UserEntity` and `HasPermission` interfaces.

Usage
-----

[](#usage)

The CLI command `spark actions:list` will search all namespaces for valid action files and display them. Action files are identified as follows:

- Located in the **Actions** subfolder within the root of a namespace
- Extends `Tatter\Workflows\BaseAction`
- Supplies a unique `HANDLER_ID` and descriptive `ATTRIBUTES` class constants

You may write your own actions or import them from existing packages. Once actions are available you can create workflows from a series of those actions by visiting the `/workflows` route.

Job control
-----------

[](#job-control)

**Runner.php** is the central controller that handles job flow. By default this intercepts routes that match `/jobs/`, but this can be changed in the config file.

Action permissions
------------------

[](#action-permissions)

You may limit access to individual Actions using the `role` attribute of its definition. By default an empty `role` is available to everyone. Actions will use the `UserEntity`with `HasPermission` interface to test for allowed users.

Logging
-------

[](#logging)

Jobs track their activity through two supplemental database tables and their entities.

`Joblogs` are created automatically any time a job changes stages, and will record:

- The stage the job leaves (`null` for new jobs)
- The stage the job enters (`null` for completed jobs)
- The ID of the current user (if available)
- The timestamp of the activity

Since jobs may progress and regress through a stage multiple times, `Joblogs` are not a good indicator of status. `Jobflags` are set by the developer and represent a definitive job state. A flag is a string key and `CodeIgniter\I18n\Time` timestamp value. Flags are managed from the `Job` entity methods:

- `getFlags(): array`
- `getFlag($name): Time`
- `setFlag($name)`
- `clearFlag($name)`
- `clearFlags()`

For example, an `Action` may require a user to accept the "Terms of Service" agreement before proceeding. Its code may look like this:

```
public function get()
{
	if (! $this->job->getFlag('accepted'))
	{
		return $this->render('accept_form');
	}

	// Null returns indicate "Action complete"
	return null;
}

public function post()
{
	$this->job->setFlag('accepted');

	return null;
}
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% 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 ~34 days

Recently: every ~90 days

Total

34

Last Release

1417d ago

Major Versions

v0.8.3 → v1.0.02019-12-30

v1.1.1 → v2.0.02020-07-02

v2.0.1 → v3.0.12020-09-03

v3.3.0 → v4.0.02021-03-09

v4.1.0 → v5.0.0-beta.12022-07-28

PHP version history (5 changes)v0.8.0PHP ^7.0

v1.0.0PHP ^7.2

v1.1.1PHP &gt;=7.2

v3.3.0PHP ^7.3 || ^8.0

v5.0.0-beta.1PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ebe908b4fe73807ecdd9f88733342199c9991b7de800329f5b2b787c8210d62?d=identicon)[MGatner](/maintainers/MGatner)

---

Top Contributors

[![MGatner](https://avatars.githubusercontent.com/u/17572847?v=4)](https://github.com/MGatner "MGatner (248 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

codeigniterjobsactionsworkflowscodeigniter4

### Embed Badge

![Health badge](/badges/tatter-workflows/health.svg)

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

###  Alternatives

[tatter/chat

Embedded chat widget for CodeIgniter 4

211.8k](/packages/tatter-chat)[tatter/files

File uploads and management, for CodeIgniter 4

643.0k](/packages/tatter-files)[codeigniter4/settings

Settings library for CodeIgniter 4

94555.3k31](/packages/codeigniter4-settings)[codeigniter4/tasks

Task Scheduler for CodeIgniter 4

122167.0k1](/packages/codeigniter4-tasks)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

68195.7k114](/packages/codeigniter4-devkit)[tatter/alerts

Lightweight user alerts for CodeIgniter 4

3978.7k6](/packages/tatter-alerts)

PHPackages © 2026

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