Allow multiple events per configuration

Liam McDermott - August 4, 2007 - 10:44
Project:Workflow-ng
Version:5.x-1.x-dev
Component:Wng API
Category:feature request
Priority:minor
Assigned:Unassigned
Status:closed
Description

It would be nice to have multiple events per configuration. fago brought up the following limitation:

Configuring multiple events would be possible - however then only the intersection of the available arguments would be available for configuration. So I'm not sure if this would be so neat.

Would it not be possible to have all available arguments shown? If two incompatible events are chosen the user should choose an OR operation.

#1

Amitaibu - August 4, 2007 - 11:42

The UI-way I see it done, will need some change in the way WF is working now:

1. user will create a new WF, but without choosing an event yet.
2. In the WF configuration he will Add event(s), and be able to choose AND/ OR - the same way conditions are done

In other words, in the WF configuration page user will edit:
1. The trigger event(s)
2. The condition(s)
3. The action(s).

#2

fago - August 4, 2007 - 12:39

hm, an OR between events, sounds logical not me, and moreover it can't solve the problem.

If you configure argument A for the action B which is not available for event C, the configured action B won't be able to execute for event C.

Anyway, perhaps it would be a nice feature but I have much more important points to work on before.

#3

Liam McDermott - August 4, 2007 - 17:04

hm, an OR between events, sounds logical not me, and moreover it can't solve the problem.

Well, I didn't mean that the module should do an OR. The module should not worry that it is dealing with different arguments, it should just check the conditions. An incompatibility would result in a false return by the condition (hence the user would need to do an OR between conditions). An action, I suppose, would just have to not run.

That all sounds like it has the potential to seriously confuse people though so I think you're probably right that it should only provide compatible conditions/actions after all.

Anyway, perhaps it would be a nice feature but I have much more important points to work on before.

That's why I marked the priority as 'minor', it's good to have this in the database so it doesn't get forgotten (and others won't raise feature requests for it). :)

Anyway, am going away for a bit to write some other stuff... I'll be back though!

#4

Amitaibu - October 4, 2007 - 20:40

I have another suggestion. Keep the WF as is, i.e 1 event per.
However, since some WF are connected (e.g. create of node, update node, delete node - should redirect to same place) - maybe allow grouping the configurations (so the change will be mostly UI.)

#5

fago - December 29, 2007 - 22:33
Status:active» won't fix

I've tried implementing this, but it complicates things too much. So, I workflow-ng is going to stay with one event per configuration.

However, I've implemented a "clone" feature in 2.x.

#6

mooffie - January 10, 2008 - 11:22
Component:Code» Miscellaneous
Status:won't fix» active

There's another solution to this problem:

Instead of allowing multiple events per configuration, let's introduce a new action: "Execute configuration".

So, for example, if I have a configuration, "foo", triggered by a "node_view" event, I could start a new configuration, "bar", triggered by a "node_insert" event, and in it I'd use the "Execute configuration" action to call the "foo" configuration.

Of course, the settings form for the "Execute configuraiton" action would show me only the configurations compatible with the current one. And it would need to let me map the currect arguments to the executed configuration's ones.

This isn't trivial, but it moves the complexity from WF-ng itself to the action.

(I have to change the component of this issue to "Misc" because "code" is no longer in the box.)

#7

fago - January 10, 2008 - 18:47
Component:Miscellaneous» API

Indeed, such an action would be possible, but I would consider it an evil hack. People can do it, but I won't add such an action to workflow-ng itself.

I'm planning to introduce a feature called "Rule Sets" later for the rules engine (6.x version) - however I'm not sure about the implementation details yet.

#8

Liam McDermott - January 11, 2008 - 14:16

Agreed with fago here, a clone feature does the job. Just wish I had that when creating around 20 configurations that were all pretty much the same! :)

#9

fago - January 13, 2008 - 14:37

check out workflow-ng 2.x - there is already a clone feature!

#10

Liam McDermott - January 14, 2008 - 06:07

Sorry, I was talking about six months ago, when there was no workflow-ng 2.x :D

#11

opensanta - March 29, 2009 - 23:44
Component:API» Wng API
Status:active» fixed

this one seems fixed by the comments.

#12

System Message - April 12, 2009 - 23:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.