In fact, this patch is quite ugly. Nonetheless, I think it may be of use in some situations. But be warned.

For a customer we had to build a workflow which didn't just change states during user initiated events, but also on some temporal events, like when a certain date is passed. Therefore I needed an event to be triggered periodically so I could check some conditions. I saw no other way than to trigger an event on every node during a cron-run. That's what I've implemented and for this situation it works pretty good. As I said, it's ugly and inefficient, but it works.

This patch adds a cron-event to workflow-ng's node-integration called "node inspected by cron". Furthermore it extends the node module's hook_cron() so that the event is actually triggerred for every node.

So, I don't expect maintainers to include this code. I'm posting it just to share with people that might need it.

CommentFileSizeAuthor
node-cron-event.tgz727 bytesrkj

Comments

fago’s picture

Title: Add cron-event for all nodes to workflow-ng » [code] cron-event for all nodes to workflow-ng

thanks, I just rename it so that title tells me, that this is no patch to look after.. ;)

mitchell’s picture

Title: [code] cron-event for all nodes to workflow-ng » Cron event for nodes
Project: Workflow-ng » Rules
Version: 5.x-2.0 » 6.x-1.x-dev
Component: Wng Module Integration » Rules Engine
Status: Needs review » Postponed (maintainer needs more info)

Rules has a "Cron maintenance tasks are performed," so is this patch still needed?

mitchell’s picture

Status: Postponed (maintainer needs more info) » Fixed

Old issue. Marking as fixed.

Status: Fixed » Closed (fixed)

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