Closed (duplicate)
Project:
Workflow
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 May 2006 at 23:38 UTC
Updated:
17 Aug 2010 at 19:12 UTC
Would be very handy for a module to be able to provide a workflow states, just like actions can.
This way a module can be installed that creates it's own workflow path and states, very handy
Comments
Comment #1
moshe weitzman commentedYES. This should work just like Views module, where export/import is offerred.
Comment #2
merlinofchaos commentedFor this to really be effective, workflow states would need to be named, much like views and actions are named, because IDs are horrible for programmatic use.
Also, it's a little difficult to associate workflow with a node if the workflow table is partially in code and partially in the db, so I'd think that a module would need to write its default workflow into the database upon install. And if that's the requirement, all that's really necessary is named states.
Comment #3
dado commented+1 for a workflow API
Comment #4
jvandyk commentedCurrently the way to do this is to populate the workflow tables during your module's install.
Comment #5
fagoIt would be useful to have a field, that declares a workflow to be created automatically, so that the user can't delete it, such as its already the case for the creation state. Further the workflow creation function workflow_create($name) should return the wid of the new workflow...
Comment #6
neclimdulThis is something of interest to me. My worry would be that after a module creates its workflow, it seems far too easy for a admin to delete it. If that workflow is vital to the functionality of the module that could be exceedingly bad. Would a system flag or something similar be something considered for addition to the workflow module or should modules doing this plan on doing fapi hacks to warn/stop users for breaking important workflows?
Comment #7
moshe weitzman commentedadmins can do all sorts of bad stuff. they can delete users, delete cck types, turn site to maintainence mode, etc. there are no safeties ... yes, use fapi validator if you wan to stop this.
Comment #8
mfredrickson commentedworkflow_create returns the wid of the workflow.
Programmatic creation is important, but I'm going to postpone to 5+
Comment #9
dgtlmoon commentedSounds fine to me, I've been writing some code for a game engine that uses state-engine charts in XMI XML files generated with ArgoUML that seems to work good for following the states/transitions/guards, i'll post some code when it's tidy
Comment #10
moshe weitzman commentedComment #11
sirkitree commentedSince this is being worked on here #558378: Make workflows exportable with Features (D6) and here #867186: [EXPORTING] Add machine names to workflows and workflow states I'm going to mark this one as a duplicate.