Posted by iceman90 on August 22, 2008 at 2:39am
Hello,
I am building a site that has a complex workflow. What I want to be able to do, is use my workflow states as a taxonomy in a way, and be able to show users a block on the sidebar, where they can see the different workflow states (and hopefully a count of how many nodes are in that state), and if they select one, see all of the nodes currently assigned to that state.
How can this be achieved?
Comments
thats an awsome application.
i am going to watch this thread.
but, off the top of my head, I assume your creating CCK nodes of the forms that are being tracked.
One or several of the fields will be "state" nodes. First choice would be boolean fields. but you can have lookup fields as well.
To view all of the Nodes in that state, you would have a view.
These two items are pretty much drupal 6 out of the box.
but... these items will need some imagination.
1... a "dash Board" to see numbers in the pipline. I think that can be done with a combination of views, templates and blocks.
2... A rules/workflow engine. something where a common person can define workflow rules. SOunds like a custom module to me.
3... An event engine. when are the rules initiated. During a cron job, or after the submit button for a form. I would think a 30 second cron job becuase some forms may be affected by other forms.
i have always thought that DRUPAL would be a much more popular platform if it had a WORKFLOW solution.
'Inflation is the one form of taxation not imposed by Legislation' - Milton Friedman
or...
'in an insane world, a sane man must appear insane' - spock
for 2. and 3. workflow-ng /
for 2. and 3. workflow-ng / rules is ideal. I agree that this approach is really powerful - that's why I developed workflow-ng ;)
Though: Taxonomy integration is under work for workflow-ng / rules see http://drupal.org/node/256748. However, you could also do it with CCK fields and views.
Standard Views functionality
This sounds like pretty standard views stuff. Set the workflow state as an exposed filter, and it should give you an option to show a list if none is selected.
Sorry, I am quite new to
Sorry, I am quite new to Drupal. How do I expose my states as a filter?
I also would like to know
I also would like to know this. Thank you.
no... I dont think it is standard views
Views could be used for a lot of this, but there are events that can happen in the back ground.
And I am also talking about a DASHBOARD type application that is generic ( but themable).
and there is no TRIGGER mechanism that is obvious... which is why I was looking at a cron job.
what about when there is an email responce... is there a trigger for that? the answer is yes to all this, but only to a very advanced developer... My point is that a package ( framework) of some kind that is well understood would be very nice here.
'Inflation is the one form of taxation not imposed by Legislation' - Milton Friedman
'Inflation is the one form of taxation not imposed by Legislation' - Milton Friedman
or...
'in an insane world, a sane man must appear insane' - spock
I managed to get this view
Here is a screenshot of my View:

As you can see, I have "Workflow: Current State" set as my Argument, because it is my only option. However, the display for this shows me something like this:
1 (3)
2 (1)
3 (1)
How can I get names of the Workflow State instead of it's number?
Perhaps a relationship
Can you create a 'Relationship' for the workflow id? If so, you should get more of the workflow fields available under Fields.
I'm not great at
I'm not great at relationships in Views so I would add a filter for "Workflow: Current state".
When enabling the filter a button will appear to allow you to expose the filter - which seems to be what you're after.
Instead of having integer values though I'd change it to meaningful descriptions, that can be referenced by value.