Java Reference
In-Depth Information
for ( int i # 0; i<processes.getLength(); !! i){
Element process # (Element)processes.item(i);
WfProcessDefinition pd # new WfProcessDefinition
(process);
definitions.add(pd);
}
return definitions;
}
// build a process definition from the corresponding XML
// element
public WfProcessDefinition(Element process){
try {
// get the process attributes
id # process.getAttribute("ID");
name # process.getAttribute("NAME");
description # Functions.description(process);
version # process.getAttribute("VERSION");
category # process.getAttribute("CATEGORY");
// get the participants
NodeList parts # process.getElementsByTagName
(WfParticipant.TAG);
for ( int i # 0; i<parts.getLength(); !! i){
Element part # (Element)parts.item(i);
WfParticipant participant # new WfParticipant(part);
participants.put(participant.id,participant);
}
// get the activities
// (after the participants are loaded so it is
// possible to set up the assignment of activities in
// a single pass)
NodeList acts # process.getElementsByTagName
(WfActivityDefinition.TAG);
for (i # 0; i<acts.getLength(); !! i){
Element act # (Element)acts.item(i);
WfActivityDefinition activity #
new WfActivityDefinition(act,participants);
activities.put(activity.id,activity);
}
// get the transitions among activities
NodeList trans #
process.getElementsByTagName
(WfTransitionInformation.TAG);
for (i # 0; i<trans.getLength(); !! i){
Element tran # (Element)trans.item(i);
new WfTransitionInformation(tran,activities);
}
Search WWH ::




Custom Search