Download the PHP package solution-forest/workflow-engine-core without Composer

On this page you can find all versions of the php package solution-forest/workflow-engine-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package workflow-engine-core

Workflow Engine Core

PHPStan GitHub Tests Action Status GitHub Code Style Action Status Latest Version on Packagist

A powerful, framework-agnostic workflow engine for PHP applications. This core library provides comprehensive workflow definition, execution, and state management capabilities without any framework dependencies.

⚠️ WARNING: DEVELOPMENT STATUS⚠️

This package is currently under active development and is NOT READY FOR PRODUCTION USE.

Features may be incomplete, APIs might change, and there could be breaking changes. Use at your own risk in development environments only.

📋 Requirements

✨ Features

📦 Installation

For Production Use

For Development

🚀 Quick Start

Basic Workflow Definition

Advanced Workflow Builder

PHP 8.3+ Attributes

Note: Attributes are currently metadata annotations for documentation and tooling. They are not yet auto-parsed by the engine at runtime — use the builder API (timeout:, retryAttempts:, when()) or step config to apply these behaviors. Attribute-driven execution is planned for a future release.

Use native PHP attributes to annotate actions with retry, timeout, and conditions:

Retry Logic

Timeouts

Conditional Execution

Step Metadata

Retry, Timeout & Conditions via Builder

These features can also be configured through the fluent builder API:

Condition Syntax

Conditions are parsed, never eval()'d. The same grammar is used by step conditions, transition conditions, when() and ConditionAction.

Dot notation reads nested data (order.customer.email). Values may be numbers, quoted strings, bare words, true, false or null.

Two rules keep a mistyped condition from quietly routing a workflow the wrong way:

Workflow Lifecycle Management

SimpleWorkflow Helper

For quick workflow execution without manual engine setup:

🏗️ Architecture

The workflow engine follows a clean architecture with clear separation of concerns:

Core Components

Component Purpose
WorkflowBuilder Fluent API for constructing workflow definitions with addStep(), when(), email(), delay(), http()
WorkflowDefinition Immutable blueprint containing steps, transitions, conditions, and metadata
WorkflowEngine Central orchestrator — start(), resume(), cancel(), getInstance(), getInstances(), getStatus()
Executor Runs steps sequentially with retry logic, timeout enforcement, and condition evaluation
StateManager Coordinates persistence through StorageAdapter
EventDispatcher Broadcasts 7 event types during workflow lifecycle

State Machine

Valid transitions:

FAILED is recoverable, not terminal: calling resume() puts the instance back into RUNNING and retries the step that failed, which is how you recover a workflow once the underlying cause is fixed.

A workflow whose next steps are all blocked on unmet prerequisites parks in WAITING rather than sitting in RUNNING, so a stuck instance is distinguishable from one still executing.

State transitions are validated at runtime — invalid transitions throw InvalidWorkflowStateException.

Namespace Map

Namespace Contents
Core\ WorkflowEngine, WorkflowBuilder, Executor, StateManager, WorkflowInstance, WorkflowDefinition, WorkflowContext, ActionResult, Step, DefinitionParser, ActionResolver
Actions\ BaseAction, LogAction, FakeEmailAction, HttpAction, DelayAction, ConditionAction
Contracts\ WorkflowAction, StorageAdapter, EventDispatcher, Logger
Attributes\ WorkflowStep, Retry, Timeout, Condition
Events\ WorkflowStartedEvent, WorkflowCompletedEvent, WorkflowFailedEvent, WorkflowCancelledEvent, StepCompletedEvent, StepFailedEvent, StepRetriedEvent
Exceptions\ WorkflowException, InvalidWorkflowDefinitionException, InvalidWorkflowStateException, ActionNotFoundException, StepExecutionException, WorkflowInstanceNotFoundException
Support\ NullLogger, NullEventDispatcher, SimpleWorkflow, Uuid, Timeout, ConditionEvaluator, Arr

Built-in Actions

Six ready-to-use actions are included:

Action Purpose Config Keys
LogAction Log messages with placeholder replacement ({user.name}) message, level (debug/info/warning/error)
FakeEmailAction ⚠️ Records an email; does not send one (no mail transport ships with this package) to, subject, template, data
HttpAction HTTP requests with {{ variable }} template variables (requires ext-curl) url, method, data, headers, timeout, connect_timeout, verify_tls, max_redirects
DelayAction Pause execution for a specified duration (blocking) hours, minutes, seconds, microseconds
ConditionAction Evaluate a condition and record the result in workflow data condition
BaseAction Abstract base class for custom actions —

WorkflowState Helpers

The WorkflowState enum provides utility methods for UI and logic:

🔧 Configuration

Storage Adapters

Implement the StorageAdapter interface for custom persistence:

Event Handling

Listen to workflow events — 7 event types are dispatched during execution:

Logging

Provide a custom logging implementation (PSR-3 style):

🧪 Development

Testing

Run the test suite:

Code Quality

We use several tools to maintain high code quality:

Development Tools

Configuration Files

Quality Standards

We maintain high code quality through:

📚 Framework Integrations

This core library is framework-agnostic. For specific framework integrations:

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Credits

🔗 Links


All versions of workflow-engine-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package solution-forest/workflow-engine-core contains the following files

Loading the files please wait ...