Forums / Developer / Newbie question on Workflows and triggers

Newbie question on Workflows and triggers

Author Message

Siddharth Hegde

Monday 04 August 2003 7:47:52 pm

Hello everyone,

Its me again. I have been spending long hours with ezpublish, trying to get a new event up. I am almost there but I am just missing 1 small thing and I JUST CANT FIND IT.

Anyway, here goes ->
1.
I made this file called taxertype.php in a dir called KERNEL\CLASSES\WORKFLOWTYPES\EVENT\TAXER\
The contents of the file are as follows

<?php

include_once( 'lib/ezutils/classes/ezhttptool.php' );
include_once( 'kernel/classes/ezworkflowtype.php' );
define( "EZ_WORKFLOW_TYPE_TAXER_ID", "taxer" );
class TaxerType extends eZWorkflowEventType
{
/*!
Constructor
*/
function ezTaxer()
{
$this->eZWorkflowEventType( EZ_WORKFLOW_TYPE_TAXER_ID, "USA Taxer" );
}
function execute( &$process, &$event )
{
$parameters = $process->attribute( 'parameter_list' );
$object =& eZContentObject::fetch( $parameters['object_id'] );
$version =& eZContentObjectVersion::fetchVersion( $parameters['version'], $parameters['object_id'] );
$requestUri = eZSys::requestUri();
$process->Template = array( 'templateName' => 'design:workflow/eventtype/result/' . 'event_taxer' . '.tpl',
'templateVars' => array( 'request_uri' => $requestUri )
);
// $event->setAttribute( 'status', EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE );
return EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE_REPEAT;
}
}
eZWorkflowEventType::registerType( EZ_WORKFLOW_TYPE_TAXER_ID, "taxertype" );
?>

2.I created a file called event_taxer.tpl in DESIGN\STANDARD\TEMPLATES\WORKFLOW\EVENTTYPE\RESULT\
3.I edited workflow.ini in the settings dir. I added the following line AvailableEventTypes[]=event_taxer
4.I logged in to admin, cleared the ini file cache and added a new workflow.
5.Now when I say new workflow, all other events get their name such as Event/PayNet or Even/Hello World in the drop down, but my Event just gets listed as Event/
6.Eventhough it appears as just Event/ I created a workflow and continued
7.I also set a trigger using this workflow to occur before checkout in the shop module. When I went through the checkout process, I did not see my form there

Any ideas about this one?

Any help will be appreciated.

Thank you,

- Sid

santosh kumar

Friday 19 December 2003 8:57:16 pm

Hi siddharth,did the problem solve .......
i require to create the same type of event .what are the changes to be done in the admin panel ........
please let me know that as im new to the ez publish.
i first of all created section named taxer in the admin panel and created the class taxer in the setup panel in ez admin with required attributes
but its not coming up in the website
please let me know the details
thanking u in advance
santosh