Monday 12 January 2004 9:00:14 am
I've tried to fetch a template in a workflow event, but it doesn't seem to work. My code is nearly an exact replica of the ezwrapping event, only even more simple.
function execute( &$process, &$event )
{
include_once( 'lib/ezutils/classes/ezhttptool.php' );
$http =& eZHTTPTool::instance();
if( $http->hasPostVariable("Next") )
{
return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
}
$node =& eZContentObjectTreeNode::fetch(2);
$requestUri = eZSys::requestUri();
$process->Template = array( 'templateName' => 'design:workflow/eventtype/result/event_eztemplate.tpl',
'templateVars' => array( 'score' => 6,
'request_uri' => $requestUri ));
return EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE_REPEAT;
}
There are no errors in the debug. The workflow seems to end (running the cronjob doesn't help either), but the original contentobject is still in "My pending list". The template is fine, I've cleared the cache and all. This looks like a bug, but the ezwrapping event is quite old so maybe the code has changed. Anyone got any ideas how to get this to work?
-- Hans
Hans
http://blog.hansmelis.be
|