Java Reference
In-Depth Information
Document doc # parser.parse(new File("test.xml"));
// load all the process definitions contained in the file
Collection processes #
(WfProcessDefinition.loadDefinitions(doc);
// iterates on each process definition
Iterator it # processes.iterator();
Document result # parser.newDocument();
while (it.hasNext()){
WfProcessDefinition pd # (WfProcessDefinition)it.next();
// creates the XML corresponding to the process
// definition
Element output # pd.toXML(result);
result.appendChild(output);
}
// use the underlying implementation to print the XML
// file because the standard interfaces do not have a
// pretty printing feature
XmlDocument res # (XmlDocument)result;
res.write(System.out);
res.write(new FileOutputStream( new File("out.xml")));
}
}
21.5
Prototype 2: Process enactment
This prototype focuses on the enactment of the processes. The monitoring
and interaction with the processes are carried out through the standard
JFlow interfaces.
21.5.1
Analysis
We adopt an interface to enact and monitor the evolution of processes
conforming to the Joint Workflow Management Facility (OMG 1998), which
is described in Section 21.2.1.
The JFlow standard is quite generic therefore we make some simplifying
assumptions. First, the execution objects have a process context that should
comprise the additional process information; we assume the process context
is empty. Second, in general, resources can be anything ranging from a
human to an IT application. In our work we make the assumption that
resources are only the people that participate in the workflow.
21.5.2
Design
The design of the enactment engine is straightforward since it is based on a
standard interface. The classes and interfaces are organized into packages as
 
Search WWH ::




Custom Search