[Perl-workflow-devel] How to get a workflow's possible states?
Brought to you by:
jonasbn
From: Phil R. <phi...@un...> - 2010-09-08 11:53:11
|
Hi all Does anyone know if there's a way to get a list of all the possible states a workflow could have? My app. creates lots of workflows for 'jobs', and can display them in lists. I want to have a way where the user can select which ones they see based on their state. So I need a menu where the user can select for display (eg) INITIAL, ORDERED, PROCESSED, FINISHED, DESPATCHED. Of course, I could hardcode it but I'd really like to be able to change the workflow without having to change the code too. The only thing I can think of is to create a test workflow, get the initial actions and then recursively run all the actions, gathering up all the states I pass though them, It would be a nightmare though as there are lots of conditions etc. Come to think of it I could read and parse the xml workflow definition which would be simpler. Any better ideas? TIA Cheers, Phil +++++++++++++++++++++++++++++++++++++ phi...@un... +++++++++++++++++++++++++++++++++++++ |