Download the PHP package dimita/laravel-business-orchestration-engine without Composer

On this page you can find all versions of the php package dimita/laravel-business-orchestration-engine. 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 laravel-business-orchestration-engine

Laravel Business Orchestration Engine

Latest Stable Version Total Downloads Monthly Downloads

A comprehensive Laravel package for business orchestration, including Saga Pattern, Workflow Management, Event Sourcing, Versioning, Rule Engine, and Dependency Management.

Note: This package is based on battle-tested code patterns I've been using in production for years. I've packaged it to make these proven patterns easily reusable across projects.

[Tests]() [Coverage]() [PHP]() [Laravel]()

Requirements

Optional Requirements

For enhanced saga orchestration capabilities:

Table of Contents

Installation

Install the package via Composer:

Publish the configuration and migrations:

Features

✨ 7 Powerful Engines

Engine Description Use Case
Saga Pattern Distributed transactions with automatic compensation Complex business processes (orders, payments)
Workflow Engine State machine with guards and transitions Document validation, approval processes
Event Sourcing Append-only event store Audit trail, historical state reconstruction
Versioning Immutable model snapshots Change history, rollback capability
Rule Engine Business rule evaluation via AST Dynamic discounts, business validation
Sync Engine Multi-device synchronization Offline-first apps, mobile sync
Dependency Engine Business constraint management Pre-delete validation, dependency graphs

Independent vs Combined Usage

This package offers maximum flexibility - use engines independently or together based on your needs.

Independent Usage

Perfect when you only need specific functionality:

Combined Usage

Use the main facade when working with multiple engines:

Available Aliases

When to Use Each Approach

Approach Best For
Independent (Class) Type safety, IDE autocompletion, single-engine projects
Independent (Alias) Quick prototyping, flexibility, simpler syntax
Dependency Injection Production code, testability, SOLID principles
Combined Facade Complex workflows using multiple engines

Configuration for Selective Loading

Improve performance by loading only the engines you need. Edit config/business-orchestration.php:

Or use environment variables in your .env:

Benefits of selective loading:

Note: If you try to use a disabled engine, you'll get a clear error message:

Usage Guide

1. Saga Pattern

When to use? When you have a business transaction involving multiple services and need to rollback (compensate) on failure.

Simple Example - Order Processing

Advanced Compensation

Define compensation logic for each step to properly rollback changes:

Asynchronous Execution

Execute sagas asynchronously using Laravel queues:

Resume After Crash

Cancel Running Saga

Saga Status Flow


2. Workflow Engine

When to use? When you need a state machine to manage transitions between different business states.

Simple Example - Contract Validation

With Guards (Conditions)

Complex Workflow - Ticket Management

Advanced Features

Register Workflow Definition
Event Hooks
Get Available Transitions
Check Workflow State
Force State Change

3. Event Sourcing

When to use? When you need to keep a complete history of all changes and be able to rebuild state at any point in time.

Simple Example - Shopping Cart

Retrieve All Events

Advanced Features

Projectors - Create Read Models

Projectors listen to events and create read models (projections) for querying:

Reactors - Handle Side Effects

Reactors respond to events with side effects (emails, notifications, etc.):

Event Replay

Rebuild projections by replaying all events:

Snapshots for Performance

Create snapshots to avoid replaying thousands of events:

Metadata and Event Queries

4. Versioning

When to use? When you need to keep snapshots of your models to rollback or view history.

Simple Example - Document Versioning

Use Case - Contract Audit Trail

Advanced Versioning Features

Version Diffing

Compare differences between two versions:

Field Exclusion

Exclude sensitive or unnecessary fields from versioning:

Include Hidden Fields

Include normally hidden fields in version snapshots:

Revert to Previous Version

Quick revert to N versions back:

Version Metadata

Store contextual information with versions:

Version Utilities

5. Rule Engine

When to use? When you have business rules that change frequently and you want to manage them without modifying code.

Simple Example - Discount Rules

Rules with Custom Actions

Supported Operators

Advanced Rule Engine Features

Fluent Rule Builder

Create rules using a fluent, readable syntax:

Extended Operator Support
Logical Operations

Combine multiple conditions with AND/OR/NOT:

Rule Macros

Define reusable rule patterns:

Custom Operators

Register your own operators:

Rule Groups

Organize and evaluate rules in groups:

Priority-Based Evaluation

Rules with higher priority execute first:

Built-in Functions

Use built-in functions in rule conditions:

Get Matching Rules

Find all rules that pass for a context:


6. Sync Engine

When to use? To synchronize data between multiple devices (mobile app, web, etc.) with offline support.

Simple Example - Mobile Sync

Retrieving Changes (Mobile Client)

Offline Scenario

Advanced Sync Engine Features

Conflict Resolution

Handle conflicts when data changes on both client and server:

Conflict Strategies

Choose how conflicts are resolved:

Custom Conflict Handlers

Register custom handlers for specific fields:

Selective Field Sync

Sync only specific fields:

Batch Synchronization

Sync multiple model pairs at once:

Sync Checkpoints

Create named checkpoints for restore points:

Sync Status Monitoring

Track synchronization activity:

Model Comparison

Compare two models without syncing:

Apply Deltas

Apply a set of changes to a model:

Metadata Tracking

Track sync context and metadata:

Cleanup Old Logs

Purge old synchronization logs to save space:

7. Dependency Engine

When to use? To manage business dependencies and prevent deletions that would violate constraints.

Simple Example - Prevent Deletion

Complex Dependency Graph

Dependency Rule Types


Real-World Use Cases

E-commerce - Complete Order Process

SaaS - Subscription Management

Architecture

Package Structure

Design Principles

Architecture Diagrams

1. Saga Pattern Flow

2. Workflow State Machine

3. Event Sourcing Stream

4. Version Control System

5. Rule Engine AST Evaluation

6. Sync Engine Delta Synchronization

7. Dependency Graph System

Overall System Architecture

Testing

The package includes 122 tests covering all use cases:

Test Coverage by Engine

Configuration

Publish the configuration file:

Available in config/business-orchestration.php:

Configuration Examples

Scenario 1: E-commerce application (needs Saga, Workflow, Versioning)

Scenario 2: Mobile-first app with offline support

Scenario 3: Enterprise workflow system

Support

License

MIT License - Free for commercial and open-source projects.

Changelog

v1.0.0 (2025)


Made with ❤️ for the Laravel community

Based on production-tested patterns I've refined over years of building enterprise applications.


All versions of laravel-business-orchestration-engine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0|^11.0
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 dimita/laravel-business-orchestration-engine contains the following files

Loading the files please wait ...