<?php
$config->flow = new stdclass();
$config->flow->turnon = true;

if(!defined('TABLE_WORKFLOW'))               define('TABLE_WORKFLOW',               '`' . $config->db->prefix . 'sys_workflow`');
if(!defined('TABLE_WORKFLOWACTION'))         define('TABLE_WORKFLOWACTION',         '`' . $config->db->prefix . 'sys_workflowaction`');
if(!defined('TABLE_WORKFLOWDATASOURCE'))     define('TABLE_WORKFLOWDATASOURCE',     '`' . $config->db->prefix . 'sys_workflowdatasource`');
if(!defined('TABLE_WORKFLOWFIELD'))          define('TABLE_WORKFLOWFIELD',          '`' . $config->db->prefix . 'sys_workflowfield`');
if(!defined('TABLE_WORKFLOWLABEL'))          define('TABLE_WORKFLOWLABEL',          '`' . $config->db->prefix . 'sys_workflowlabel`');
if(!defined('TABLE_WORKFLOWLAYOUT'))         define('TABLE_WORKFLOWLAYOUT',         '`' . $config->db->prefix . 'sys_workflowlayout`');
if(!defined('TABLE_WORKFLOWLINKDATA'))       define('TABLE_WORKFLOWLINKDATA',       '`' . $config->db->prefix . 'sys_workflowlinkdata`');
if(!defined('TABLE_WORKFLOWRELATION'))       define('TABLE_WORKFLOWRELATION',       '`' . $config->db->prefix . 'sys_workflowrelation`');
if(!defined('TABLE_WORKFLOWRELATIONLAYOUT')) define('TABLE_WORKFLOWRELATIONLAYOUT', '`' . $config->db->prefix . 'sys_workflowrelationlayout`');
if(!defined('TABLE_WORKFLOWRULE'))           define('TABLE_WORKFLOWRULE',           '`' . $config->db->prefix . 'sys_workflowrule`');
if(!defined('TABLE_WORKFLOWSQL'))            define('TABLE_WORKFLOWSQL',            '`' . $config->db->prefix . 'sys_workflowsql`');
if(!defined('TABLE_WORKFLOWVERSION'))        define('TABLE_WORKFLOWVERSION',        '`' . $config->db->prefix . 'sys_workflowversion`');

$config->objectTables['workflow']               = TABLE_WORKFLOW;
$config->objectTables['workflowaction']         = TABLE_WORKFLOWACTION;
$config->objectTables['workflowdatasource']     = TABLE_WORKFLOWDATASOURCE;
$config->objectTables['workflowfield']          = TABLE_WORKFLOWFIELD;
$config->objectTables['workflowlabel']          = TABLE_WORKFLOWLABEL;
$config->objectTables['workflowlayout']         = TABLE_WORKFLOWLAYOUT;
$config->objectTables['workflowlinkdata']       = TABLE_WORKFLOWLINKDATA;
$config->objectTables['workflowrelation']       = TABLE_WORKFLOWRELATION;
$config->objectTables['workflowrelationlayout'] = TABLE_WORKFLOWRELATIONLAYOUT;
$config->objectTables['workflowrule']           = TABLE_WORKFLOWRULE;
$config->objectTables['workflowsql']            = TABLE_WORKFLOWSQL;
$config->objectTables['workflowversion']        = TABLE_WORKFLOWVERSION;

$config->rights->member['workflowfield'][] = 'addSqlVar';
$config->rights->member['workflowfield'][] = 'delSqlVar';
$config->rights->member['workflowfield'][] = 'buildVarControl';

$config->rights->member['workflowlabel'][] = 'preview';
$config->rights->member['workflowlabel'][] = 'removeFeatureTips';

$config->rights->member['workflowcondition'][] = 'know';

$config->rights->member['workflowrule'][] = 'checkRegex';

$config->rights->member['flow'][] = 'browse';
$config->rights->member['flow'][] = 'create';
$config->rights->member['flow'][] = 'batchCreate';
$config->rights->member['flow'][] = 'edit';
$config->rights->member['flow'][] = 'operate';
$config->rights->member['flow'][] = 'batchOperate';
$config->rights->member['flow'][] = 'view';
$config->rights->member['flow'][] = 'delete';
$config->rights->member['flow'][] = 'export';
$config->rights->member['flow'][] = 'exportTemplate';
$config->rights->member['flow'][] = 'import';
$config->rights->member['flow'][] = 'showImport';
$config->rights->member['flow'][] = 'link';
$config->rights->member['flow'][] = 'unlink';
