With two modules handling workflows in drupal, I was curious what are the pros and cons of each? Or what is the main reason for not combining these modules to prevent duplicate code or features?

Thanks!

Comments

fago’s picture

Status: Active » Fixed

the totally different. workflow-ng is like rules a module that allows you to configure arbitrary rules - which is also really useful when building workflows.

Flying Drupalist’s picture

The naming of the two suggests that Workflow-NG is a replacement for workflow, but you just said it's totally different. Can we have a more detailed explaination please?

Thanks.

amitaibu’s picture

Workflow is dealing with changing the state of nodes. wf_ng and its D6 version - rules, are dealing with triggering actions upon certain events and conditions. Similar to D6's core module - trigger, only with more options and integrated with more modules core and contrib.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

aren cambre’s picture

Title: Difference between Workflow and Workflow-NG/Rules » Difference between Workflow and Rules
Component: Code » Miscellaneous
Status: Closed (fixed) » Active

Changed node state is only one kind of trigger, so it sounds like Workflow is only a functional subset of Rules? Am I reading correctly?

Flying Drupalist’s picture

No, workflow has nothing to do with rules.

Workflow does one thing, node states. Rules deals with triggers, actions, etc.

Workflow-ng is a bad name that made it sound like it has to do with workflow, but now it's called Rules and people should understand that there's no relation.

aren cambre’s picture

A change in node state is an event that can start a trigger.

Flying Drupalist’s picture

There's integration, but then that's also true for dozens of modules, they're not related.

dugh’s picture

Use the workflow module. It's stayed consistent, and it does work with the actions and trigger modules (which are built-in to drupal 6 or separately available for drupal 5).

I went with workflow_ng in drupal 5 and now there is no upgrade path. There is rules instead. I have no idea if rules will still be around for drupal 7, so I'm just going with workflow which has stayed consistent.

amitaibu’s picture

@dugh,

1) workflow and Rules are different modules with different goals, some of them may overlap. Rules is more general.
2) There is an upgrade path from workflow_ng to Rules. you can look at the code...
3) Fago, being the author and maintainer has shown that he is committed to his modules. I seriously doubt if Rules will be gone that fast.

klausi’s picture

Status: Active » Fixed

You can do workflow things with rules easily, have a look at the editorial workflow tutorial of Rules: http://drupal.org/node/550716

Anonymous’s picture

Status: Fixed » Active

Thanks, klausi, you're telling us the complete opposit of what the previous speakers told us :-)
I neither know the workflow module, nor the rules module and I'm more than interested, how to describe the complete difference between the two modules.

So: what is the difference, where do they overlap? Pros and cons? Usecases?

Thanks to whoever will give a detailed explanation.
forschi

Flying Drupalist’s picture

#3 explained it very clearly.

Workflow creates/sets node states and allow complex workflows. Rules is a module that describes a sequence of cause and effect, what happens to a node once it's created for instance. Possible effects are to set a state to the node, and to create a workflow. But also possible effects (actions), are to give the user points, change the node taxonomy, and numerous other things. Rules is a flexible, general module that does many many things, including workflow.

I would suggest using Rules because you'll likely find some other uses for rules besides workflow, and it'll just be 1 less module you'll have to deal with.

On the other hand workflow might be easier to use and be conceptually less complex. I'm saying all this with the assumption that you need to create a workflow. If this is not about workflow, then there is no comparison and no relation.

Flying Drupalist’s picture

Status: Active » Fixed
Anonymous’s picture

Okay, in fact, that is my understanding of workflow. More precisely, that module seems to provide a rule-based workflow engine or rule engine for ECA rules.

So, as far as I inderstood this topic correctly, I would name the difference like that: the "workflow" module is only focused on publishing workflows, whereas the rules module provides workflows for the whole drupal ecosystem.

For that reason, I have to agree with #5: The functionality, provided by the "workflow" module is a subset of what is possible with the rules module.

Please tell me, if I'm wrong here.

Status: Fixed » Closed (fixed)

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

jcisio’s picture

Status: Closed (fixed) » Active

@Earl Grey: I haven't used Rules, but AFAIK, with a publishing workflow, the Workflow module is easier. It is integrated to the node publish/edit form, but that's not all. You can change workflow state alone without touching node content.

Yes, you can do this with Rules (set trigger to the field content change), but it's more complicated. So I won't use the word "subset". Like I write a module that can execute arbitrary PHP code, ooops, it's not a superset of all module ;-)

The problem with Workflow as I see is that it's not in active development recently.

PS: As I don't use Rules, I don't know how difficult to implement Workflow features in Rules. Someone mentioned a tutorial at http://drupal.org/node/550716 in a comment above. I just skim, and it has some drawbacks.

lukawanjohi’s picture

Assigned: Unassigned » lukawanjohi

@jcisio, very well put. The php superset module example is on point! am greatly concerned about the active develpment of workflow as I am implementing a serious building and construction workflow on it.

jcisio’s picture

Status: Active » Closed (fixed)

No, workflow comes back now ;) The author of Pro Drupal Development has recently pushed on it.

And I won't forget to say that I'm using Rules now, too. I remove the administer node permission for editors, I set a rule to publish node when workflow state changes.

Issue should be closed now ;)

mitchell’s picture

Component: Miscellaneous » Documentation
Category: support » task
Status: Closed (fixed) » Active

All the information is out there, but, imo this issue requires a documentation page and a major mention on the project page. It's inevitable that this question will persist for many drupalers.

nancydru’s picture

Indeed, I think a comparison page is in order.

patcon’s picture

In case it sways someone, I think more modules are building dependencies on Rules.

For example, Ubercart is ditching it's custom Conditional Actions module for Rules in D7:
#336257-40: Rules integration

I don't use it myself yet, but in the interest of keeping things consistent, I'd lean toward the more generalized Rules module, particularly if I think site feature expansion is be a possibility.

mitchell’s picture

Status: Active » Fixed

Inactivity in this case = fixed, imo. Anyway, times have changed, and Rules is much better understood in general.

@people-of-the-future: Please do not reopen this issue. Instead, see comments above and further research ongoing efforts in each project to see their respective ongoing directions.

Status: Fixed » Closed (fixed)

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