New workflow event causes workflow view crash

New workflow event causes workflow view crash

Wednesday 14 January 2004 4:20:12 am - 3 replies

Modified on Thursday 10 June 2004 1:11:49 am by Eirik Alfstad Johansen

Author Message

Balazs Halasy

Wednesday 14 January 2004 4:25:35 am

Did you check that this only happens when you add the actual extension that contains the new event? If so then there is definetively something wrong with your code.. try to cut it down to the bare minimum and work (add more and more logic) towards the goal. Having too many lines within a new event is not a good idea cause it is hard to see if it actually works or not.

Balazs

Eirik Alfstad Johansen

Wednesday 14 January 2004 6:03:29 am

OK, I've stripped it down to the bare basics, and still the page isn't displayed. Here's the code again.

include_once( 'kernel/classes/ezworkflowtype.php' );

define( "EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID", "ezcreateaccount" );

class eZCreateAccountType extends eZWorkflowEventType
{
/*!
Constructor
*/
function eZCreateAccountType()
{
$this->eZCreateAccountType( EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID, "Create account" );
}

function execute( &$process, &$event )
{
return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
}
}

eZWorkflowEventType::registerType( EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID, "ezcreateaccounttype" );

Am I missing something very basic, here?

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Wednesday 14 January 2004 6:07:12 am

Never mind, I located the bug. I was trying to do

$this->eZCreateAccountType

in the constructor when what I should've done was

$this->eZWorkflowEventType

Thanks anyways !

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

You must be logged in to post messages in this topic!

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