The Workflow admin page (admin/build/workflow) displays a list of operations in front of each workflow and of each state. Currently this list is fixed to {Add state, Actions, Edit, Delete} for workflows and {Edit, Delete} for states. Third-party modules that extend the capabilities of the Workflow module might need to perform additional operations on these elements. For example, my workflow_graph module adds a "Graph" operation to workflows. My workflow_fields module adds an "Edit" operation to the (creation) state. The present patch allows these additions to be made in a generic fashion.

The patch modifies workflow_overview() by calling a new hook_workflow_operations($wid,$sid=0) when building the links for the workflows and for the states. Interested modules just return an array of links, in the format specified in workflow_overview(). These additional links are simply merged with the ones created inside the function.

CommentFileSizeAuthor
workflow_operations.patch1.11 KBinfojunkie

Comments

infojunkie’s picture

Version: 5.x-1.1 » 5.x-1.2

Patch also works for 1.2.

mshaver’s picture

This is an important patch that should be included in the core workflow.module. I use it specifically with the workflow_fields.module to modify the creation state during workflows.

infojunkie’s picture

Version: 5.x-1.2 » 5.x-2.2

Patch also works for 2.2.

jvandyk’s picture

Status: Needs review » Fixed

Applied a simplified version of this patch. module_invoke_all() returns an array, so no need to check for that.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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