raoul2000 / yii2-workflow

A simple workflow engine for Yii2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error Exception:

marcoadasilvaa opened this issue · comments

Hello, thanks for this contribution.

i'm trying implement a workflow with model Proveedor, but return Interface 'raoul2000\workflow\base\IWorkflowDefinitionProvider' not found

Model ProveedorWorkflow.php

<?php
namespace app\models;

class ProveedorWorkflow implements \raoul2000\workflow\base\IWorkflowDefinitionProvider 
{
    public function getDefinition() {
        return [
            'initialStatusId' => 'draft',
            'status' => [
                'draft' => [
                    'transition' => ['publish','deleted']
                ],
                'publish' => [
                    'transition' => ['draft','deleted']
                ],
                'deleted' => [
                    'transition' => ['draft']
                ]
            ]
        ];
    }
}

Model Proveedor

class Proveedor extends \yii\db\ActiveRecord
{

    public function behaviors()
    {
        return [
            \raoul2000\workflow\base\SimpleWorkflowBehavior::className()
        ];
    }
...
commented

Hi,
in the latest release, the IWorkflowDefinitionProviderinterface belongs to the name space raoul2000\workflow\source\file.

Sorry for the error in the README.md file... I'll fix it soon.

Thank you for you asnwer, i create pull request #16 #15

commented

thanks for your contribution