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

eZ debug

Timing: Jan 18 2025 15:51:25
Script start
Timing: Jan 18 2025 15:51:25
Module start 'content'
Timing: Jan 18 2025 15:51:25
Module end 'content'
Timing: Jan 18 2025 15:51:25
Script end

Main resources:

Total runtime0.8407 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 587.8438180.8125
Module start 'content' 0.00840.6974 768.6563476.2578
Module end 'content' 0.70580.1347 1,244.9141333.4688
Script end 0.8406  1,578.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.5339210.0002
Check MTime0.00170.1972210.0001
Mysql Total
Database connection0.00110.132010.0011
Mysqli_queries0.758090.16601910.0040
Looping result0.00200.23391890.0000
Template Total0.801995.420.4010
Template load0.00210.250120.0011
Template processing0.799895.139820.3999
Template load and register function0.00030.032210.0003
states
state_id_array0.00080.093510.0008
state_identifier_array0.00110.129520.0005
Override
Cache load0.00180.2107560.0000
Sytem overhead
Fetch class attribute can translate value0.00200.243630.0007
Fetch class attribute name0.00260.305720.0013
XML
Image XML parsing0.00060.066930.0002
class_abstraction
Instantiating content class attribute0.00000.001420.0000
General
dbfile0.00370.4362210.0002
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs