Workflow event error

Author Message

Rhino Vincent

Thursday 13 September 2007 6:39:12 am

I did this worflow event just to learn but i get an error, and i dont know how to fix it so if somebody can help??

in the file ezexampletype.php :

<?php
define("EZ_WORKFLOW_TYPE_EXAMPLE_ID", "ezexample");
class eZExampleType extends eZWorkflowEventType
{
/*!
Constructor
*/
function eZExampleType()
{
$this->eZWorkflowEventType("EZ_WORKFLOW_TYPE_EXAMPLE_ID","Example");
$this->setTriggerTypes(array('content'=>array('read'=>array('before'))));
}

/*
On doit implémenter la fonction execute
*/
function execute( &$process, &$event )
{
$parameters =& $process->attribute('parameter_list');
$http =& eZHTTPTool::instance();
if($http->hasPostVariable('ContinueButton'))
{
return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
}
$node=& eZContentObjectTreeNode::fetch($parameters['node_id']);
$requestUri = eZSys::requestUri();
$process->Template = array('templateName'=>'design:workflow/eventtype/result/event_ezexample.tpl','templateVars'=>array('node'=>$node,'request_uri'=>$resquestUri));
return EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE_REPEAT;
}
}
eZWorkflowEventType::registerType(EZ_WORKFLOW_TYPE_EXAMPLE_ID,'ezexampletype');
?>

in the workflow.ini.append.php :
<?php /*
[EventSettings]
ExtensionDirectories[]=myevent
AvailableEventTypes[]=event_ezexample
*/
?>

and i active the extension.

but when i try to create a new workflow by th admin interface i have this erreur
Error: eZWorkflowType::loadAndRegisterType Sep 13 2007 15:30:27

Workflow type not found: event_EZ_WORKFLOW_TYPE_EXAMPLE_ID, searched in these directories: kernel/classes/workflowtypes, extension/myevent/eventtypes

so if sommbody know why???

Olivier Ouin

Thursday 13 September 2007 8:03:03 am

Where did you put your ezexampletype.php file ?

I think it should be in
/extension/myevent/eventtypes/event/ezexample/
according to your workflow.ini

Could you check this ?

Atle Pedersen

Friday 14 September 2007 12:15:30 am

Hi!

This line:
$this->eZWorkflowEventType("EZ_WORKFLOW_TYPE_EXAMPLE_ID","Example");

should be like this:
$this->eZWorkflowEventType(EZ_WORKFLOW_TYPE_EXAMPLE_ID,"Example");

Atle

Rhino Vincent

Friday 14 September 2007 1:12:00 am

tks for the hepl i where write it was $this->eZWorkflowEventType("EZ_WORKFLOW_TYPE_EXAMPLE_ID","Example");

should be
$this->eZWorkflowEventType(EZ_WORKFLOW_TYPE_EXAMPLE_ID,"Example");

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:30:07
Script start
Timing: Jan 18 2025 11:30:07
Module start 'layout'
Timing: Jan 18 2025 11:30:07
Module start 'content'
Timing: Jan 18 2025 11:30:08
Module end 'content'
Timing: Jan 18 2025 11:30:08
Script end

Main resources:

Total runtime0.8799 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 587.8125152.6094
Module start 'layout' 0.00900.0028 740.421939.4141
Module start 'content' 0.01180.8666 779.8359563.4766
Module end 'content' 0.87850.0014 1,343.312512.1875
Script end 0.8798  1,355.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3605160.0002
Check MTime0.00140.1553160.0001
Mysql Total
Database connection0.00220.246910.0022
Mysqli_queries0.817392.8892620.0132
Looping result0.00060.0715600.0000
Template Total0.843795.920.4218
Template load0.00220.253920.0011
Template processing0.841495.630820.4207
Template load and register function0.00020.027510.0002
states
state_id_array0.00120.137110.0012
state_identifier_array0.00150.168920.0007
Override
Cache load0.00200.2270670.0000
Sytem overhead
Fetch class attribute can translate value0.00070.080830.0002
Fetch class attribute name0.00110.129950.0002
XML
Image XML parsing0.00080.093330.0003
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00090.0967160.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs