{"id":14987453,"url":"https://github.com/tattersoftware/codeigniter4-workflows","last_synced_at":"2025-10-10T10:45:37.302Z","repository":{"id":34867781,"uuid":"184839564","full_name":"tattersoftware/codeigniter4-workflows","owner":"tattersoftware","description":"Job task control through dynamic workflows, for CodeIgniter 4","archived":false,"fork":false,"pushed_at":"2024-01-18T15:25:37.000Z","size":465,"stargazers_count":21,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-08-22T01:34:02.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tattersoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-04T01:29:58.000Z","updated_at":"2024-05-16T09:08:18.000Z","dependencies_parsed_at":"2024-09-25T00:32:12.916Z","dependency_job_id":null,"html_url":"https://github.com/tattersoftware/codeigniter4-workflows","commit_stats":{"total_commits":205,"total_committers":4,"mean_commits":51.25,"dds":0.3951219512195122,"last_synced_commit":"5a856276b87f19b308cd1decad8a29fce821ab72"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/tattersoftware/codeigniter4-workflows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-workflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-workflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-workflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-workflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tattersoftware","download_url":"https://codeload.github.com/tattersoftware/codeigniter4-workflows/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-workflows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003547,"owners_count":26083595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T14:14:38.218Z","updated_at":"2025-10-10T10:45:37.284Z","avatar_url":"https://github.com/tattersoftware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tatter\\Workflows\nJob action control through dynamic workflows, for CodeIgniter 4\n\n[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/phpunit.yml)\n[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/phpstan.yml)\n[![](https://github.com/tattersoftware/codeigniter4-workflows/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-workflows/actions/workflows/deptrac.yml)\n[![Coverage Status](https://coveralls.io/repos/github/tattersoftware/codeigniter4-workflows/badge.svg?branch=develop)](https://coveralls.io/github/tattersoftware/codeigniter4-workflows?branch=develop)\n\n## Quick Start\n\n1. Install with Composer: `\u003e composer require tatter/workflows`\n2. Update the database: `\u003e php spark migrate -all`\n3. Register actions: `\u003e php spark actions:register`\n4. Start your first workflow: https://[yourdomain.com]/workflows\n\n## Features\n\n**Workflows** functions as a super-controller for CodeIgniter 4, allowing developers to\nwrite their own actions as classes and then string them together for job flow controls.\n\n## Installation\n\nInstall easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities\nand always be up-to-date:\n```shell\n\u003e composer require tatter/workflows\n```\n\nOr, install manually by downloading the source files and adding the directory to\n**app/Config/Autoload.php**.\n\nOnce the files are downloaded and included in the autoload, run any library migrations\nto ensure the database is setup correctly:\n```shell\n\u003e php spark migrate -all\n```\n\n## Configuration (optional)\n\nThe library's default behavior can be altered by extending its config file. Copy\n**examples/Workflows.php** to **app/Config/** and follow the instructions\nin the comments. If no config file is found in **app/Config/** the library will use its own.\n\n**Workflows** uses [Tatter\\Users](https://github.com/tattersoftware/codeigniter4-users) to\nwork with user records. Follow the instructions to verify you have a compatible authentication\nlibrary with classes that implement the `UserEntity` and `HasPermission` interfaces.\n\n## Usage\n\nThe CLI command `spark actions:list` will search all namespaces for valid action files\nand display them. Action files are identified as follows:\n* Located in the **Actions** subfolder within the root of a namespace\n* Extends `Tatter\\Workflows\\BaseAction`\n* Supplies a unique `HANDLER_ID` and descriptive `ATTRIBUTES` class constants\n\nYou may write your own actions or import them from existing packages. Once actions are\navailable you can create workflows from a series of those actions by visiting the\n`/workflows` route.\n\n## Job control\n\n**Runner.php** is the central controller that handles job flow. By default this intercepts\nroutes that match `/jobs/`, but this can be changed in the config file.\n\n## Action permissions\n\nYou may limit access to individual Actions using the `role` attribute of its definition.\nBy default an empty `role` is available to everyone. Actions will use the `UserEntity`\nwith `HasPermission` interface to test for allowed users.\n\n## Logging\n\nJobs track their activity through two supplemental database tables and their entities.\n\n`Joblogs` are created automatically any time a job changes stages, and will record:\n* The stage the job leaves (`null` for new jobs)\n* The stage the job enters (`null` for completed jobs)\n* The ID of the current user (if available)\n* The timestamp of the activity\n\nSince jobs may progress and regress through a stage multiple times, `Joblogs` are not\na good indicator of status. `Jobflags` are set by the developer and represent a definitive\njob state. A flag is a string key and `CodeIgniter\\I18n\\Time` timestamp value. Flags are\nmanaged from the `Job` entity methods:\n* `getFlags(): array`\n* `getFlag($name): Time`\n* `setFlag($name)`\n* `clearFlag($name)`\n* `clearFlags()`\n\nFor example, an `Action` may require a user to accept the \"Terms of Service\" agreement\nbefore proceeding. Its code may look like this:\n```php\npublic function get()\n{\n\tif (! $this-\u003ejob-\u003egetFlag('accepted'))\n\t{\n\t\treturn $this-\u003erender('accept_form');\n\t}\n\n\t// Null returns indicate \"Action complete\"\n\treturn null;\n}\n\npublic function post()\n{\n\t$this-\u003ejob-\u003esetFlag('accepted');\n\n\treturn null;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-workflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftattersoftware%2Fcodeigniter4-workflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-workflows/lists"}