aboutcoders/workflow-bundle

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A symfony bundle that allows to define and manage workflows

1.1.4 2016-02-06 16:41 UTC

This package is not auto-updated.

Last update: 2021-11-27 14:46:04 UTC


README

A symfony bundle that allows define and manage workflows.

Configuration

Add the bundle:

{
    "require": {
        "aboutcoders/workflow-bundle": "dev-master"
    }
}

Enable the bundles in the kernel:

# app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        new Abc\Bundle\WorkflowBundle\AbcWorkflowBundle(),
        // ...
    );
}

Configure routing

# app/config/routing.yml
abc_workflow_tasks:
    resource: "@AbcWorkflowBundle/Resources/config/routing.yml"
    prefix:   /

If you like to display workflow GUI you have to import optional routing rules

# app/config/routing.yml
abc_workflow_workflows:
    resource: "@AbcWorkflowBundle/Resources/config/routing_optional.yml"
    prefix:   /

Follow the installation and configuration instructions of the third party bundles:

Configure the bundle

# app/config/config.yml
abc_workflow:
  db_driver: orm

Usage

Display workflow configuration GUI

{{ workflow_configuration(workflowEntity) }}

Display workflow history GUI

{{ workflow_history(workflowEntity) }}

Get workflow history via AJAX

{{ path('execution_history', { 'id': workflowId }) }}