Forums / Developer / How to pass params between events ?

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