How do we represent the process model in memory?
Since XPDL is based on XML there are at least two main valid options: the
first consists of using the XML DOM (see Sidebar 21.1) to store and access
the information, the second is to adopt a custom set of classes designed for
The first option has practically zero cost at this moment, but when it
comes to the other components that must access the process models we
realize that we failed to address the simplicity of access issue. Though the
DOM APIs are easy to use they represent an atomic concept, thus they intro-
duce a semantic gap between the access mechanism and the information.
This makes accessing the process models clumsy.
The second option provides an easier way to access the process models; it
uses the DOM APIs to parse the XML and then stores the information in a
simple structure that directly represents the process modelling concepts.
The development of such a data structure requires more effort but solves the
issue that was not addressed by the previous option; in addition it skips the
problem of parsing the XML files.
The classes used to represent the processes described by XPDL are
described in Figure 21.8.
The business process is represented by the WfProcessDefinition class. This
contains two classes corresponding to the tag types used in XPDL: WfProcess
Activity and WfParticipantSpecification .
These classes must be able to load information from an XML file and to
generate an XML file conforming to the XPDL format. We decide to operate
with the DOM classes defined in the org.w3c.dom package.
Figure 21.8 Process modelling classes