spec-gen/state-workflow-spec-gen-bundle

Specification generator for StateWorkflowBundle: https://github.com/gmorel/StateWorkflowBundle

1.1.0 2015-05-09 12:31 UTC

This package is not auto-updated.

Last update: 2024-12-25 09:28:46 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Dependency Status Latest Stable Version License Spec Gen logo

Ease complex workflow readability by generating its specification from your code base

Keywords : Workflow, Finite State Machine, Symfony2, Specification Generation

Specification Generator for StateWorkflowBundle.

The worst specifications are not updated specifications..

Symfony 2

Aim is to have your `Workflow Specification` (Available states and transitions) always up to date in order to ease your Domain readability. Hence **avoiding misunderstandings** and allow new comers to assist you **quicker** in your project. **Saving you valuable time** since you no more have to make sure your specs are up to date.

Generated specification for simple workflow Demo Booking Workflow simple

Generated specification for more complex workflow Demo Quote Workflow complex

Usage

From a Symfony2 project

php app/console.php spec-gen:state-workflow:generate-specifications

Workflow specification files will be generated in {PROJECT ROOT}/specification/workflow/

Example : {PROJECT ROOT}/specification/workflow/demo.booking_engine.state_workflow.html

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require spec-gen/state-workflow-spec-gen-bundle "~1"

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Gmorel\StateWorkflowBundle\GmorelStateWorkflowBundle(),
        );
        
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            // ...
            $bundles[] = new SpecGen\StateWorkflowSpecGenBundle\SpecGenStateWorkflowSpecGenBundle();
        }

        // ...
    }

    // ...
}

Step 3: Implement your workflow

Using StateWorkflowBundle.

Credits

  • Cytoscape Javascript Engine used to generate workflow specs.

Licence

MIT License (MIT)

Contributing

Wanting to ease understanding of your projects from yourself and team members ?

Wanting to contribute finding new ways of auto generating specifications from other SF2 project aspects ?

  • Enhancing Micro service interactions readability ?
  • DDD - Bounded Context - UML generation from application service ?
  • Ubiquitous Language dictionary generator ?
  • Other ideas ?

Join https://github.com/spec-gen