Page 259 -
P. 259
9 The Runtime Environment 253
the process can be “reconstituted” from the stored data, and work can continue on
the process as if the outage had not occurred. In YAWL, persistence is configured
on by default and recommended, although it can be configured off if desired.
For a successful restart, it is important that all the necessary data and descriptors
of a process are stored, and can be reassembled from that stored data. This requires
that data be inserted, updated, or removed at every event and milestone in the process
life-cycle.
1
The YAWL environment uses the Hibernate framework to support persistence.
Amongst a number of benefits, Hibernate offers two main advantages. First, a Java
class can be configured to store exactly those data members that are of value to
the persisting application; by instructing Hibernate to store an object, only those
data members are stored, and when instructed to retrieve the data, Hibernate recon-
structs the object with the stored data. This approach simplifies object persistence,
as the application does not have to concern itself with deconstructing and recon-
structing objects. Second, the process Hibernate uses to store and retrieve data is
abstracted from the data source used. This means the application can easily con-
figure (through a properties file) the data source to be used, selected from a large
number of data sources and types, without changing anything within the applica-
2
tion itself. For example, the YAWL Enterprise release uses Postgres as its default
3
data source, while the YAWL4Study release uses Derby. In each case, only a small
change to the configuration file was required. YAWL has also been successfully run
using MySQL and Oracle. With Hibernate, processing overheads for data storage
can be kept to a minimum, through its use of optimized data structures that are
written out to database only at times of low load.
All relevant aspects of a process instance are persisted and updated if those values
change. When an instance (case, task, or token) completes, all references to it are
removed from the persistence tables. Those tables are the following:
CaseDataDocument: Stores the current net-level data parameters and values for
each net. Each net of a process, whether the root net or a subnet, has its net-level
data stored in this table
CaseNbrStore: Stores the next available case number that may be assigned to a
case, which ensures all cases have a unique identifier and that duplications cannot
occur
Locations: This table stores the locations of all tokens within each net, that is,
each net’s current marking
RunnerBusyTasks: The set of all currently executing tasks
RunnerEnabledTasks: The set of all currently enabled tasks
RunnerStates: Stores the current state of each YNetRunner object responsible
for the execution of each net
Services: The set of custom YAWL services currently registered with the Engine
1
www.hibernate.org
2 www.postgres.org
3 db.apache.org/derby/