Java Reference
In-Depth Information
returns a collection of all available processes, and getProcess() which returns the
process manager for a given process. In addition there are two Add() methods to
populate the catalogue; they add process definitions or a collections.
package WfEngine;
import java.util.*;
import ProcessDefinition.WfProcessDefinition;
import WorkflowModel.WfProcessMgr;
import WfBase.BaseException;
public class Catalog {
// contains the collection of processes, accessible by name
private Map processes # new Hashtable();
// return the collection of all processes
public Collection getAll(){
return processes.values();
// return the manager corresponding to the process with
// the given name
public WfProcessMgr getProcess(String name){
return (WfProcessMgr)processes.get(name);
// add the manager for the given process definition
public void Add(WfProcessDefinition process)
throws BaseException {
WfProcessMgr mgr # new WfProcessMgrImpl(process);
// add the managers for the collection of process
// definitions
public void Add(Collection definitions)
throws BaseException {
Iterator it # definitions.iterator();
while (it.hasNext()){
The instantiation of processes is mediated by the interface WfProcessMgr
through the create_process() method. In addition there are methods to
browse all the process instances created by the process manager.
package WorkflowModel;
import WfBase.BaseException;
public interface WfProcessMgr {
int how_many_processes () throws WfBase.BaseException;
WfProcessIterator get_iterator_process ()
throws BaseException;
Search WWH ::

Custom Search