The Actions module (Trigger in Drupal 6) turns out to be completely insufficient for the purposes of Flag module. All my best intentions for making Flag work with the core-provided module seem to be lost, as I didn't know at the time that the Actions module had no support for conditions when an action would be execute. The lack of support makes it impossible to reuse any actions that are not written specifically for Flag module.

Concluded that Actions module is insufficient, what can we replace it with?

Option 1. Fix Actions module. Unfortunately, the inclusion of Actions in Drupal 6 core as Trigger module makes fixing the module impossible for this release cycle.

Option 2. Use Workflow-NG/Rules module. This module addresses the central problem of supporting "conditions" for when actions are executed. Considering it's made for this exact purpose, it'd be a good fit. Unfortunately the rewrite from the Drupal 5 version means that we'll have to do the implementation separately for both versions. Also, the interface is slightly terrifying (currently).

Option 3. Build-in custom action management. Let Flag take control of it's own action management, independent of other modules.

This issue spins off of #274385: Fix handling of tokens in the email action

CommentFileSizeAuthor
#5 roles1.diff4.82 KBmooffie

Comments

MGParisi’s picture

You dont drop support for a module, you add support for additional modules. PLUS action module works great in 5.x version!

quicksketch’s picture

Another possibility: Reuse actions from the Actions module, but manage our own triggering of the events. That seems like a solution that might provide a lot of flexibility without yanking Actions support entirely.

amitaibu’s picture

ASFAIK fago from wf_ng/Rules module has interest in replacing his 'custom content link' module from D5 with integration with flags in D6.

i'd +1 for rules integration and a big -1 for writing custom action.

I'm willing to work on a patch for rules integration if it's decided to be the solution.

MGParisi’s picture

What if you built an action that would trigger a workflow... LOL, sounds funny but that would be a Kick ass addition!

mooffie’s picture

StatusFileSize
new4.82 KB

Option 2. Use Workflow-NG/Rules module.

This seems to be the only worthwhile solution, and it's a very good one.

BTW, our work on Token support wasn't in vain: wfng/rules can put them to good use.

Option 2. Use Workflow-NG/Rules module. [...] Unfortunately the rewrite from the Drupal 5 version means that we'll have to do the implementation separately for both versions.

Support for wfng/rules requires only a handful of lines of code, so there isn't much work to do.

Another possibility: Reuse actions from the Actions module,

That's possible, but... why bother? Why not pick a powerful, elegant and flexible solution, for free?

Another possibility: Reuse actions from the Actions module,

Incidentally, that's the way Eaton went with the VotingActions module:

http://drupal.org/files/issues/Firefox002.png

His solution is about 1,300 lines of code --probably written is several weeks, supported over several years-- and is still not flexible enough.

On the other hand, a Rules solution is about 50 lines of code, written in half an hour, and is quite flexible.

I'm attaching my first version for the Rules integration. Even in this initial stage (and fully functional stage) it can do far more than our 'Actions' support can do.

Another possibility: Reuse actions from the Actions module [...]

The problem with the Actions module isn't only that actions aren't "by default" seperate from conditions. This module is very inflexible.

For example, one nice feature of wfng/rules is that events and actions have arguments associated with them, and they can even generate new ones. So if some event brings in some 'node' object, and some other action brings in a 'user' object, you can pass both to a 'flag' action that would flag the node on that user's behalf. In my next patch I'll demonstrate this. It's very powerful: it opens the door for new uses for the Flag module.

Amitai wrote:

I'm willing to work on a patch for rules integration

Amitai, thanks. I know you love that module :-) But I'll be writing this integration myself.

ASFAIK fago from wf_ng/Rules module has interest in replacing his 'custom content link' module from D5 with integration with flags in D6.

(It was my plan to check out that module and see if Flag could do what it does.)

mooffie’s picture

Status: Active » Closed (duplicate)

In an email Nate said:
- We'll definitely want rules/wfng integration.
- He'll somewhat improve the existing actions support (to make it possible to fire any other action).

So we've settled this. I'm marking this a duplicate of:
#298109: Rules integration
#298111: Backport Rules to Workflow-ng