multiplexer & edit workflow

Author Message

ludo thomas

Thursday 30 June 2005 7:38:58 am

Hi!

I try to make a workflow for sending a mail after having registered a new newsletter reciever.
I've created a simple workflow.
that's working well.
But the problem is that when I create something in admin interface, I receive the mail....
So I want to limit the execution of the workflow just to create new receiver.

I try to make a multiplexer workflow who is calling my first sending-mail-workflow just for the receiver's class.

It never works.

perhaps is it a bug?
perhaps is it possible to specify in my first workflow that I want to limit execution just for one class?

here is my workflow code:

function execute( &$process, &$event )
{
 $parameters = $process->attribute( 'parameter_list' );
        $objectID =& $parameters['object_id'];
       // $object =& eZContentObject::fetch( $parameters['data_map'] );
	  $obj =& eZContentObject::fetch($parameters['object_id']);
$data_map=& $obj->attribute( 'data_map' );
$email = $data_map['email']->content();



$mail = new eZMail();
 			include_once( 'lib/ezutils/classes/ezmail.php' );
            include_once( 'lib/ezutils/classes/ezmailtransport.php' );
			include_once( "lib/ezutils/classes/ezhttptool.php" );
include_once( "kernel/classes/datatypes/ezuser/ezuser.php" );
include_once( "kernel/classes/ezcontentclassattribute.php" );
include_once( "kernel/classes/ezcontentclass.php" );

	 $emailSender ='info@bazaravenue.com';
  	
	$receiver = $email;
  	$body='Nous avons le plaisir de vous annoncer votre inscription à notre newsletter';
            
            $mail->setSender( $emailSender );		
            $mail->setReceiver( $receiver );
            $subject = 'inscription à la newsletter';
           
            $mail->setSubject( $subject );
            $mail->setBody( $body );
            $mailResult = eZMailTransport::send( $mail );
//return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;

$process->RedirectUrl = "/";
return EZ_WORKFLOW_TYPE_STATUS_REDIRECT ;


}

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 20 2025 07:49:18
Script start
Timing: Jan 20 2025 07:49:18
Module start 'layout'
Timing: Jan 20 2025 07:49:18
Module start 'content'
Timing: Jan 20 2025 07:49:18
Module end 'content'
Timing: Jan 20 2025 07:49:18
Script end

Main resources:

Total runtime0.8807 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.1563152.6250
Module start 'layout' 0.00650.0028 741.781339.4453
Module start 'content' 0.00930.8701 781.2266445.5547
Module end 'content' 0.87940.0013 1,226.78138.1641
Script end 0.8807  1,234.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3655160.0002
Check MTime0.00140.1559160.0001
Mysql Total
Database connection0.00130.142010.0013
Mysqli_queries0.837795.1124460.0182
Looping result0.00040.0437440.0000
Template Total0.850396.520.4252
Template load0.00200.231520.0010
Template processing0.848396.312720.4241
Template load and register function0.00020.020010.0002
states
state_id_array0.00030.037210.0003
state_identifier_array0.00080.095820.0004
Override
Cache load0.00170.1874160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.072910.0006
Fetch class attribute name0.00070.084520.0004
XML
Image XML parsing0.00210.236510.0021
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00250.2836160.0002
String conversion0.00000.000840.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs