|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.workflow.demo.Main
public class Main
Demonstration program to illustrate how the Workflow Management System
is utilized. It accepts a command line argument to an XML file that
contains an <activity>
to be parsed and then executed.
If no file is specified, a default XML document will be utilized.
WARNING - This program is for illustration only while the workflow management system is being developed, and it will not be part of the final package. Indeed, much of its functionality (such as the parsing of XML files describing activities) will need to be encapsulated inside the system, in ways that support the per-namespace step definitions as outlined in the original proposal.
WARNING - This code depends on the version of Digester currently in SVN - the 1.0 released version will not work correctly with namespace prefixes.
WARNING - The namespace URLs in the example XML document are not official - they are simply used to satisfy the syntax requirements of the XML parser. Official namespace URIs will be required for a formal release of this technology, because that is key to the extensibility of Step implementations.
Field Summary | |
---|---|
protected Activity |
activity
The Activity constructed by our Digester. |
protected org.apache.commons.digester.Digester |
digester
The Digester used to process input files. |
Constructor Summary | |
---|---|
Main()
Construct a new instance of this class to process input files. |
Method Summary | |
---|---|
void |
afterActivity(ContextEvent event)
Invoked immediately after execution of the related Activity has been completed normally, been suspended, or been aborted by the throwing of a StepException. |
void |
afterStep(ContextEvent event)
Invoked immediately after the specified Step was executed. |
void |
beforeActivity(ContextEvent event)
Invoked immediately before execution of the related Activity has started. |
void |
beforeStep(ContextEvent event)
Invoked immediately before the specified Step is executed. |
protected org.apache.commons.digester.Digester |
createDigester()
Create a Digester instance that knows how to parse activities using the core and io built-in Steps. |
static void |
main(String[] args)
The main program for the demo. |
void |
process(String pathname)
Process the specified file. |
void |
setActivity(Activity activity)
Save the Activity that our Digester has constructed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Activity activity
protected org.apache.commons.digester.Digester digester
Constructor Detail |
---|
public Main()
Method Detail |
---|
public static void main(String[] args)
args
- Command line argumentsprotected org.apache.commons.digester.Digester createDigester()
Create a Digester instance that knows how to parse activities using
the core
and io
built-in Steps.
WARNING - This will ultimately be abstracted into a mechanism to register the set of rule definitions associated with a namespace.
public void setActivity(Activity activity)
activity
- The newly constructed Activitypublic void process(String pathname)
pathname
- Pathname of the specified XML file containing
an activity definitionpublic void afterActivity(ContextEvent event)
afterActivity
in interface ContextListener
event
- The ContextEvent
that has occurredpublic void afterStep(ContextEvent event)
afterStep
in interface ContextListener
event
- The ContextEvent
that has occurredpublic void beforeActivity(ContextEvent event)
beforeActivity
in interface ContextListener
event
- The ContextEvent
that has occurredpublic void beforeStep(ContextEvent event)
beforeStep
in interface ContextListener
event
- The ContextEvent
that has occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |