While integrating Workflow-ng with Übercart, I've come across some situations where I need to do several actions for a particular event, but each action needs a different set of conditions. To get this to work, I made a configuration that invokes a different event for each action that I need.

The real problem is that one system (taxes) is completely defined by the user. And there are some countries that have taxes that charge tax on taxes. It becomes important that those taxes are applied after the others. Right now there isn't a guarantee that this will happen.

In addition, if configurations become ordered, I can use one event when orders are placed to apply shipping fees, and then taxes, and then discounts. That kind of control would make setting up the default configurations much easier.


amitaibu’s picture

Lyle/ fago,
Just an idea, how about instead of having weight for configuration, you will have an action to invoke another configuration (for example the action can be called "Invoke Workflow_ng configuration), and you will get an option to select all the defined configurations.
I think it will give more options then a weight system.

fago’s picture

It's actually on my todo list to make weighting configurations possible - so I'll write this these days.

@Amitaibu: Just for ordering the execution weighting of configuration is much simpler and much more consisting to code. But anyway I like your idea, so probably this would be a good enhancement in particular for enhanced users. So one could deactivate a configuration and just let it invoke through an action. However this way it's a bit unclean, so perhaps it would be better to write a small module, that provides an action that allows one to generate a new event and then one can configure actions for it.

By the way, currently you can use the CCL module for that if you need only one need as argument. CCL generates an event for each configured link. Then one could use its action to toggle the link and activate the event - it's even possible to schedule the event generation.

amitaibu’s picture

For allowing to call other configuration, maybe instead of deactivating those configuration, maybe you can provide another checkbox 'Invoked by other configuration' - or some better name ;).

Another thing to consider is a checkbox of "send arguments', i.e. sending the arguments from configuration to configuration.