Closed (fixed)
Project:
Workflow-ng
Version:
5.x-1.x-dev
Component:
Wng API
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2007 at 10:44 UTC
Updated:
12 Apr 2009 at 23:50 UTC
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.
Comments
Comment #1
amitaibuThe 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).
Comment #2
fagohm, 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.
Comment #3
liam mcdermott commentedWell, 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.
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!
Comment #4
amitaibuI 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.)
Comment #5
fagoI'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.
Comment #6
mooffie commentedThere'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.)
Comment #7
fagoIndeed, 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.
Comment #8
liam mcdermott commentedAgreed 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! :)
Comment #9
fagocheck out workflow-ng 2.x - there is already a clone feature!
Comment #10
liam mcdermott commentedSorry, I was talking about six months ago, when there was no workflow-ng 2.x :D
Comment #11
mitchell commentedthis one seems fixed by the comments.