How to pass params between events ?

Author Message

Xavier Dutoit

Friday 19 November 2004 8:46:31 am

Hello,

I'd like to be able to set a param from one event and them being able to read it from another one.
So far, I've seen how to add static parameters (that you define from the back office when editing the workflow), but nothing to define a dynamic parameter from a previous event.

The goal is to be able to better reuse the same basic events.

Eg:
Worklow 1: inform someone from the group X when a data is updated:
Event1: FetchEmailsFromGroup (static param: X) -> Set the param $TO
Event2: Mail (retrieve the data from the content) and send a mail to the emails set in $TO

Workflow 2: send a confirmation email to the author
Event1: FetchOwnerEmail (taken from the object) -> Set the param $TO
Event2: Mail (retrieve the data from the content) and send a mail to the emails set in $TO

Obvioulsy, the goal is to have the same mail event usable in both workflows.

I haven't seen this feature.
So far I forsee two hacks:
- Use the parameterList from the process and add into it my specific params from the Event
- Add a new type of attribute InterEventParams (on the top of user, content, parameter_list...) and modify eZWorkflowProcess.

What do you think ? How would you do it ?

Tia
Xavier

A mail event where you can set dynamicaly the sender.

http://www.sydesy.com

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 31 2025 08:09:56
Script start
Timing: Jan 31 2025 08:09:56
Module start 'layout'
Timing: Jan 31 2025 08:09:56
Module start 'content'
Timing: Jan 31 2025 08:09:57
Module end 'content'
Timing: Jan 31 2025 08:09:57
Script end

Main resources:

Total runtime1.1401 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.0063 588.1406151.2109
Module start 'layout' 0.00630.0028 739.351636.6641
Module start 'content' 0.00911.1300 776.0156869.0938
Module end 'content' 1.13910.0009 1,645.10947.8438
Script end 1.1401  1,652.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2879160.0002
Check MTime0.00120.1061160.0001
Mysql Total
Database connection0.00090.077710.0009
Mysqli_queries1.086795.3181460.0236
Looping result0.00060.0489440.0000
Template Total1.094796.020.5473
Template load0.00210.181820.0010
Template processing1.092695.829620.5463
Template load and register function0.00130.109910.0013
states
state_id_array0.00630.552710.0063
state_identifier_array0.00170.147520.0008
Override
Cache load0.00170.1476240.0001
Sytem overhead
Fetch class attribute can translate value0.00090.082110.0009
Fetch class attribute name0.00310.273620.0016
XML
Image XML parsing0.00370.321110.0037
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00560.4899160.0003
String conversion0.00000.000640.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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs