adding functionality to get a list of workflow definitions
"Philipp Hug" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <01bb01c30b3e$dec0efd0$522210ac@chimera> |
what do you think about adding a function getWorkflowNames() to
AbstractWorkflowFactory which returns
a list of workflows that can be created by the factory?
this would allow to show a list of workflow definition in your application.
my implementation:
add to the AbstractWorkflowFactory interface
public abstract String[] getWorkflowNames();
add to XMLWorkflowFactory
public String[] getWorkflowNames() {
int i = 0;
String[] res = new String[workflows.keySet().size()];
Iterator it = workflows.keySet().iterator();
while (it.hasNext()) {
res[i++] = (String) it.next();
}
return res;
}
add to URLWorkflowFactory (not supported here, return URL cache???)
public String[] getWorkflowNames() {
return null;
}
add to ConfigLoader (to make it available from the outside)
public static String[] getWorkflowNames() {
return factory.getWorkflowNames();
}
philipp
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf