You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ad...@apache.org on 2006/02/28 17:05:47 UTC

svn commit: r381686 [22/40] - in /incubator/ode/scratch/bpe: ./ bpelTests/ bpelTests/probeService/ bpelTests/test1/ bpelTests/test10/ bpelTests/test12/ bpelTests/test13/ bpelTests/test14/ bpelTests/test15/ bpelTests/test16/ bpelTests/test17/ bpelTests/...

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityBean.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityBean.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityBean.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityBean.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,232 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.correlation.managed;
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+/**
+ * This bean stores static registrations.
+ * @ejb.bean 
+ *		type="CMP"
+ *		name="RegistrationEntity"
+ *		jndi-name="BPE/RegistrationEntity"
+ *		local-jndi-name="BPE/RegistrationEntity"
+ *		view-type="local"
+ *		cmp-version="2.x"
+ *		schema="RegSchema"
+ * @ejb.persistence 
+ * 		table-name="BPE_RegistrationEntity"
+ * @ejb.pk
+ * 	class="com.sybase.bpe.correlation.managed.RegistrationEntityPK"
+ * @ejb.home
+ *		local-class="com.sybase.bpe.correlation.managed.RegistrationEntityLocalHome"
+ * @ejb.interface
+ *		local-class="com.sybase.bpe.correlation.managed.RegistrationEntityLocal"
+ * @ejb.transaction type="Mandatory"
+ *@ejb.finder
+ *		signature="java.util.Collection findByStaticKey(java.lang.String staticKey)"
+ *		query="SELECT OBJECT(rs) FROM RegSchema rs WHERE rs.staticKeyValue = ?1"
+ *@ejb.finder
+ *		signature="java.util.Collection findByStaticKeyandKeyValue(java.lang.String staticKey, java.lang.String keyValue)"
+ *		query="SELECT OBJECT(rs) FROM RegSchema rs WHERE rs.staticKeyValue = ?1 AND rs.keyValue = ?2"
+ * @ejb.finder
+ *		signature="java.util.Collection findByStaticKeyandOpIdandProcId(java.lang.String staticKey, java.lang.String opId, java.lang.String procId)"
+ *		query="SELECT OBJECT(rs) FROM RegSchema rs WHERE rs.staticKeyValue = ?1 AND rs.operationId = ?2 AND rs.rootProcId = ?3"
+ * @ejb.finder
+ *		signature="java.util.Collection findByProcId(java.lang.String procId)"
+ *		query="SELECT OBJECT(rs) FROM RegSchema rs WHERE rs.rootProcId = ?1"
+ * @ejb.finder
+ *		signature="java.util.Collection findByRootDefId(java.lang.String rootDefId)"
+ *		query="SELECT OBJECT(rs) FROM RegSchema rs WHERE rs.rootDefId = ?1"
+ * 
+ *
+*/
+
+public abstract class RegistrationEntityBean implements EntityBean {
+
+	static final long serialVersionUID = -887111238106204156L;
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.persistence column-name="defId"
+	 */
+	public abstract String getDefId();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.persistence column-name="keyValue"
+	 */
+	public abstract String getKeyValue();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.pk-field
+	 * @ejb.persistence column-name="staticKeyValue"
+	 */
+	public abstract String getStaticKeyValue();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.pk-field
+	 * @ejb.persistence column-name="rootProcId"
+	 */
+	public abstract String getRootProcId();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.pk-field
+	 * @ejb.persistence column-name="operationId"
+	 */
+	public abstract String getOperationId();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.pk-field
+	 * @ejb.persistence column-name="procId"
+	 */
+	public abstract String getProcId();
+
+	/**
+	 * @return
+	 * @ejb.interface-method
+	 * @ejb.pk-field
+	 * @ejb.persistence column-name="rootDefId"
+	 */
+	public abstract String getRootDefId();
+
+	/**
+	 * @param string
+	 * @ejb.interface-method
+	 */
+	public abstract void setDefId(String string);
+
+	/**
+	 * @param string
+	 * @ejb.interface-method
+	 */
+	public abstract void setKeyValue(String string);
+
+	/**
+	 * @param string
+	 * @ejb.interface-method
+	 */
+	public abstract void setOperationId(String string);
+
+	/**
+	 * @param string
+	 */
+	public abstract void setProcId(String string);
+
+	/**
+	 * @param string
+	 * @ejb.interface-method
+	 */
+	public abstract void setRootDefId(String string);
+	/**
+	 * @param string
+	 */
+	public abstract void setRootProcId(String string);
+
+	/**
+	 * @param string
+	 * @ejb.interface-method
+	 */
+	public abstract void setStaticKeyValue(String string);
+
+	/**
+	 * @ejb.create-method
+	 */
+	public RegistrationEntityPK ejbCreate(
+	 String staticKeyValue,
+	 String rootDefId,
+	 String defId,
+	 String rootProcId,
+	 String procId,
+	 String keyValue,
+	 String operationId)
+		throws CreateException {
+
+		//Called by container after setEntityContext
+		// Use the abstract methods to set parameters
+		setStaticKeyValue(staticKeyValue);
+		setRootDefId(rootDefId);
+		setDefId(defId);
+		setRootProcId(rootProcId);
+		setProcId(procId);
+		setKeyValue(keyValue);
+		setOperationId(operationId);
+		return null;
+	}
+
+	public void ejbActivate() {
+		//Called by container before bean
+		//swapped into memory
+	}
+
+	public void ejbPostCreate(
+	String staticKeyValue,
+	String rootDefId,
+	String defId,
+	String rootProcId,
+	String procId,
+	String keyValue,
+	String operationId) {
+		//Called by container after ejbCreate
+	}
+
+	public void ejbPassivate() {
+		//Called by container before
+		//bean swapped into storage
+	}
+
+	public void ejbRemove() throws RemoteException {
+		//Called by container before
+		//data removed from database
+	}
+
+	public void ejbLoad() {
+		//Called by container to
+		//refresh entity bean's state
+	}
+
+	public void ejbStore() {
+		//Called by container to save
+		//bean's state to database
+	}
+
+	public void setEntityContext(EntityContext ctx) {
+		//Called by container to set bean context
+	}
+
+	public void unsetEntityContext() {
+		//Called by container to unset bean context
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityPK.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityPK.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityPK.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/managed/RegistrationEntityPK.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,236 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package com.sybase.bpe.correlation.managed;
+
+/**
+ * Primary key for RegistrationEntity.
+ */
+public class RegistrationEntityPK
+	extends java.lang.Object
+	implements java.io.Serializable {
+	
+	// EAServer can't deal with this either
+    //static final long serialVersionUID = 2903919825803166151L;
+    
+	//EAServer can't deal with these
+	//private int _hashCode = 0;
+	//private StringBuffer _toStringValue = null;
+
+	public java.lang.String operationId;
+	public java.lang.String procId;
+	public java.lang.String rootDefId;
+	public java.lang.String rootProcId;
+	public java.lang.String staticKeyValue;
+
+	public RegistrationEntityPK() {
+	}
+
+	public RegistrationEntityPK(
+		java.lang.String operationId,
+		java.lang.String procId,
+		java.lang.String rootDefId,
+		java.lang.String rootProcId,
+		java.lang.String staticKeyValue) {
+		this.operationId = operationId;
+		this.procId = procId;
+		this.rootDefId = rootDefId;
+		this.rootProcId = rootProcId;
+		this.staticKeyValue = staticKeyValue;
+	}
+
+	public java.lang.String getOperationId() {
+		return operationId;
+	}
+	public java.lang.String getProcId() {
+		return procId;
+	}
+	public java.lang.String getRootDefId() {
+		return rootDefId;
+	}
+	public java.lang.String getRootProcId() {
+		return rootProcId;
+	}
+	public java.lang.String getStaticKeyValue() {
+		return staticKeyValue;
+	}
+
+	public void setOperationId(java.lang.String operationId) {
+		this.operationId = operationId;
+		//EAServer can't deal with these
+		//_hashCode = 0;
+	}
+	public void setProcId(java.lang.String procId) {
+		this.procId = procId;
+		//EAServer can't deal with these
+		//_hashCode = 0;
+	}
+	public void setRootDefId(java.lang.String rootDefId) {
+		this.rootDefId = rootDefId;
+		//EAServer can't deal with these
+		//_hashCode = 0;
+	}
+	public void setRootProcId(java.lang.String rootProcId) {
+		this.rootProcId = rootProcId;
+		//EAServer can't deal with these
+		//_hashCode = 0;
+	}
+	public void setStaticKeyValue(java.lang.String staticKeyValue) {
+		this.staticKeyValue = staticKeyValue;
+		//EAServer can't deal with these
+		//_hashCode = 0;
+	}
+
+	public int hashCode() {
+		int _hashCode = 0;
+		if (_hashCode == 0) {
+			if (this.operationId != null)
+				_hashCode += this.operationId.hashCode();
+			if (this.procId != null)
+				_hashCode += this.procId.hashCode();
+			if (this.rootDefId != null)
+				_hashCode += this.rootDefId.hashCode();
+			if (this.rootProcId != null)
+				_hashCode += this.rootProcId.hashCode();
+			if (this.staticKeyValue != null)
+				_hashCode += this.staticKeyValue.hashCode();
+		}
+
+		return _hashCode;
+	}
+
+	public boolean equals(Object obj) {
+		if (!(obj
+			instanceof com.sybase.bpe.correlation.managed.RegistrationEntityPK))
+			return false;
+
+		com.sybase.bpe.correlation.managed.RegistrationEntityPK pk =
+			(com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj;
+		boolean eq = true;
+
+		if (obj == null) {
+			eq = false;
+		} else {
+			if (this.operationId == null
+				&& ((com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj)
+					.getOperationId()
+					== null) {
+				eq = true;
+			} else {
+				if (this.operationId == null
+					|| ((com.sybase.bpe.correlation.managed
+						.RegistrationEntityPK) obj)
+						.getOperationId()
+						== null) {
+					eq = false;
+				} else {
+					eq = eq && this.operationId.equals(pk.operationId);
+				}
+			}
+			if (this.procId == null
+				&& ((com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj)
+					.getProcId()
+					== null) {
+				eq = true;
+			} else {
+				if (this.procId == null
+					|| ((com.sybase.bpe.correlation.managed
+						.RegistrationEntityPK) obj)
+						.getProcId()
+						== null) {
+					eq = false;
+				} else {
+					eq = eq && this.procId.equals(pk.procId);
+				}
+			}
+			if (this.rootDefId == null
+				&& ((com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj)
+					.getRootDefId()
+					== null) {
+				eq = true;
+			} else {
+				if (this.rootDefId == null
+					|| ((com.sybase.bpe.correlation.managed
+						.RegistrationEntityPK) obj)
+						.getRootDefId()
+						== null) {
+					eq = false;
+				} else {
+					eq = eq && this.rootDefId.equals(pk.rootDefId);
+				}
+			}
+			if (this.rootProcId == null
+				&& ((com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj)
+					.getRootProcId()
+					== null) {
+				eq = true;
+			} else {
+				if (this.rootProcId == null
+					|| ((com.sybase.bpe.correlation.managed
+						.RegistrationEntityPK) obj)
+						.getRootProcId()
+						== null) {
+					eq = false;
+				} else {
+					eq = eq && this.rootProcId.equals(pk.rootProcId);
+				}
+			}
+			if (this.staticKeyValue == null
+				&& ((com.sybase.bpe.correlation.managed.RegistrationEntityPK) obj)
+					.getStaticKeyValue()
+					== null) {
+				eq = true;
+			} else {
+				if (this.staticKeyValue == null
+					|| ((com.sybase.bpe.correlation.managed
+						.RegistrationEntityPK) obj)
+						.getStaticKeyValue()
+						== null) {
+					eq = false;
+				} else {
+					eq = eq && this.staticKeyValue.equals(pk.staticKeyValue);
+				}
+			}
+		}
+
+		return eq;
+	}
+
+	/** @return String representation of this pk in the form of [.field1.field2.field3]. */
+	public String toString() {
+		StringBuffer _toStringValue = null;
+		if (_toStringValue == null) {
+			_toStringValue = new StringBuffer("[.");
+			_toStringValue.append(this.operationId).append('.');
+			_toStringValue.append(this.procId).append('.');
+			_toStringValue.append(this.rootDefId).append('.');
+			_toStringValue.append(this.rootProcId).append('.');
+			_toStringValue.append(this.staticKeyValue).append('.');
+			_toStringValue.append(']');
+		}
+
+		return _toStringValue.toString();
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/unmanaged/CorrelationServiceSLImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/unmanaged/CorrelationServiceSLImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/unmanaged/CorrelationServiceSLImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/correlation/unmanaged/CorrelationServiceSLImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,244 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 25, 2003
+ *
+ */
+package com.sybase.bpe.correlation.unmanaged;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import com.sybase.bpe.correlation.CorrelationService;
+import com.sybase.bpe.correlation.CorrelationServiceException;
+import com.sybase.bpe.correlation.Registration;
+import com.sybase.bpe.engine.ProcessService;
+import com.sybase.bpe.instance.IPMIProcess;
+import com.sybase.bpe.event.IStaticKey;
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.util.BPException;
+
+/**
+ * @author charper
+ *
+ */
+public class CorrelationServiceSLImpl extends CorrelationService {
+
+	private ProcessService ps;
+	private boolean isBPELCompliant;
+	private HashMap hashByStaticKey= new HashMap();
+	private HashMap hashByStatcKeyandKeyValue = new HashMap();
+	private HashMap hashByStaticKeyandOperationIdandProcId = new HashMap();
+	private HashMap hashByProcId = new HashMap();
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#createRegistration(com.sybase.bpe.correlation.Registration)
+	 */
+	public void createRegistration(Registration regisration)
+		throws CorrelationServiceException {
+
+		// add to static key hash
+		String key = regisration.getStaticKeyValue();
+		ArrayList regs = (ArrayList) hashByStaticKey.get(key);
+		if (regs == null) {
+			regs = new ArrayList();
+			hashByStaticKey.put(key, regs);
+		}
+		regs.add(regisration);
+
+		// add to static key - dynamic key hash
+		String keyValue = regisration.getKeyValue();
+		if (keyValue != null) {
+
+			HashMap keyHash = (HashMap) hashByStatcKeyandKeyValue.get(key);
+			if (keyHash == null) {
+				keyHash = new HashMap();
+				hashByStatcKeyandKeyValue.put(key, keyHash);
+			}
+			regs = (ArrayList) keyHash.get(keyValue);
+			if (regs == null) {
+				regs = new ArrayList();
+				keyHash.put(keyValue, regs);
+			}
+			regs.add(regisration);
+		}
+		
+		// add to static key - op id hash
+		String opId = regisration.getOperationId();
+		String procId = regisration.getRootProcId();
+		HashMap opHash = (HashMap) hashByStaticKeyandOperationIdandProcId.get(key);
+			if (opHash == null) {
+				opHash = new HashMap();
+				hashByStaticKeyandOperationIdandProcId.put(key, opHash);
+			}
+			HashMap procsHash = (HashMap) opHash.get(opId);
+			if (procsHash == null) {
+				procsHash = new HashMap();
+				opHash.put(opId, procsHash);
+			}
+			procsHash.put(procId, regisration);
+			
+			ArrayList regList = (ArrayList) hashByProcId.get(procId);
+			if (regList == null) {
+				regList = new ArrayList();
+				hashByProcId.put(procId, regList);
+			}
+			regList.add(regisration);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#getRegistrations(com.sybase.bpe.instance.service.IMPIProcess)
+	 */
+	public Collection getRegistrations(IPMIProcess key)
+		throws CorrelationServiceException {
+		return (ArrayList) hashByProcId.get(key.getKey());
+	}
+	
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#getRegistrations(com.sybase.bpe.event.IStaticKey, java.util.Collection)
+	 */
+	public Collection getRegistrations(IStaticKey key, Collection keyValues)
+		throws CorrelationServiceException {
+			
+			ArrayList regs = new ArrayList();		
+			HashMap keyHash = (HashMap)hashByStatcKeyandKeyValue.get(key.toString());
+			ArrayList keyList = (ArrayList)hashByStaticKey.get(key.toString());
+			if (keyHash != null || keyList != null) {
+			Iterator it = keyValues.iterator();
+			while (it.hasNext()) {
+				String keyValue = (String) it.next();
+				if (keyValue != null) {
+					if ( keyHash != null ) {
+						ArrayList regsSublist = (ArrayList) keyHash.get(keyValue);
+						if (regsSublist != null) {
+							if ( ! regs.containsAll(regsSublist)) {
+								regs.addAll(regsSublist);
+							}
+						}
+					}
+				} else {
+					if (keyList != null) {
+						if ( ! regs.containsAll(keyList) ) {
+							regs.addAll(keyList);
+						}
+					}
+				}
+			}
+		}
+			
+			return regs;
+			
+			
+	}
+	
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#getRegistrations(com.sybase.bpe.event.IStaticKey)
+	 */
+	public Collection getRegistrations(IStaticKey key)
+		throws CorrelationServiceException {
+			ArrayList regs = (ArrayList)hashByStaticKey.get(key.toString());
+			if ( regs == null ) {
+				return new ArrayList();
+			}
+			return regs;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#update()
+	 */
+	public void update() throws BPException {
+		// no update in stateless case
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#init(com.sybase.bpe.util.BPEProperties, com.sybase.bpe.engine.ProcessService)
+	 */
+	public void init(BPEProperties props, ProcessService ps)
+		throws CorrelationServiceException {
+		this.ps = ps;
+		if (props.getBPELCompliant().equals("TRUE")) {
+			this.isBPELCompliant = true;
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#getProcessService()
+	 */
+	public ProcessService getProcessService() throws BPException {
+		return ps;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#isBPELCompliant()
+	 */
+	public boolean isBPELCompliant() {
+		return isBPELCompliant;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#getRegistrations(com.sybase.bpe.event.IStaticKey, java.lang.String)
+	 */
+	public Registration getRegistration(IStaticKey key, String operationId,
+		String processId) throws CorrelationServiceException {
+		HashMap opHash= (HashMap)hashByStaticKeyandOperationIdandProcId.get(key.toString());
+		if ( opHash == null ) {
+			return null;
+		}
+		HashMap procsHash = (HashMap)opHash.get(operationId);
+		if ( procsHash == null ) {
+			return null;
+		}
+		return (Registration)procsHash.get(processId);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.correlation.CorrelationService#removeRegistration(com.sybase.bpe.correlation.Registration)
+	 */
+	public void removeRegistration(Registration registration) throws CorrelationServiceException {
+		// remove from static key hash
+		String key = registration.getStaticKeyValue();
+		ArrayList regs = (ArrayList) hashByStaticKey.get(key);
+		if ( regs != null ) regs.remove(registration);
+
+		// remove from static key - dynamic key hash
+		String keyValue = registration.getKeyValue();
+		HashMap keyHash = (HashMap) hashByStatcKeyandKeyValue.get(key);
+		if ( keyHash != null ) regs = (ArrayList) keyHash.get(keyValue);
+		if ( regs != null ) regs.remove(registration);
+		
+		// remove from static key - op id hash
+		String opId = registration.getOperationId();
+		String procId = registration.getRootProcId();
+		HashMap procsHash=null;
+		HashMap opHash = (HashMap) hashByStaticKeyandOperationIdandProcId.get(key);
+		if ( opHash != null )  procsHash = (HashMap) opHash.get(opId);
+		if ( procsHash != null ) procsHash.remove(procId);
+		
+		// remove from proc id hash
+		regs = (ArrayList) hashByProcId.get(procId);
+		if ( regs != null ) regs.remove(registration);
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDAction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDAction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDAction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDAction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,73 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDAction.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDAction
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+import java.util.Properties;
+
+import com.sybase.bpe.action.internal.IInternalAction;
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.util.BPException;
+
+/** An implementation of the interface holds the metadata needed to  create an Action implementation. */
+public interface IPMDAction extends IPMDLocatorHolder
+{
+   /** A verbose human readable description of the action invocation logic. It allows a business process analyst to augment a business process design. 
+     * 
+     * @return a description of the Action implementation */
+   java.lang.String getDescription();
+   /** A human readable tag for the action. 
+     * 
+     * @return a human readable tag for the Action implementation */
+   java.lang.String getLabel();
+ 
+   /** Uses metadata properties and a n Action factory to instantiate an Action implemenation. The metadata properties were deployed into the metadata repository through the mutator interface. */
+   IInternalAction getActionImpl() throws BPException;
+   
+   /** The name of a class that implements the Action interface. It is used by the ActionFactory to instantiate an Action implementation.
+	  * 
+	  * @return the name of an Action class implementation */
+	java.lang.String getActionClass();
+
+	/** @param description */
+	void setDescription(java.lang.String description);
+	/** Returns a list of name/value pairs. These properties are used to initialize an Action implementation. They are consumed by the ActionFactory.
+	  * 
+	  * @return a collection of IPMDProperty */
+	java.util.Properties getMetadata();
+	
+	IPMDRoot getRoot();
+	
+	/** Creates a name/value pair property in the metadata repository and associates it with the action definition.
+	  * 
+	  * @param name 
+	  * @param value */
+	void addMetadata(java.lang.String name, Object value) throws DefinitionServiceException;
+	public void setMetadata(Properties p);
+	
+	public void setActionClass(String name);
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDChangeCondition.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDChangeCondition.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDChangeCondition.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDChangeCondition.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,96 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDChangeCondition.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDChangeCondition
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import com.sybase.bpe.condition.Conditional;
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.util.BPException;
+
+/** An implementation of the interface holds the metadata needed to  create a Conditional implementation. */
+public interface IPMDChangeCondition extends IPMDLocatorHolder
+{
+   /** A verbose human readable description of the condition evaluation logic. It allows a business process analyst to augment a business process design. 
+     * 
+     * @return the descritpion of the conditional implemenation */
+   java.lang.String getDescription();
+   /** A human readable tag for the conditon. 
+     * 
+     * @return a human readable tag */
+   java.lang.String getLabel();
+   /** Returns the action metadata associated with a conditional evaluation. A conditional evaluation returns a collection of subscriptions ( or rule nodes ) that evaluate to true. Note: a conditional evaluation may contain hundreds of rules within its ruleset.
+     * 
+     * @return a collection of IPMDAction implementations */
+   Iterator getActions();
+
+   /** Uses metadata properties and a Conditional factory to instantiate a Conditional implemenation. The metadata properties were deployed into the metadata repository through the mutator interface.
+     * 
+     * @return an implementation of the Conditional interface */
+   Conditional getConditionalImpl() throws BPException;
+   
+   /** Returns the name of a class that implements the Conditional interface. Used as input into the ConditionalFactory.
+	 * 
+	 * @return the class name of a Conditional implementation */
+   java.lang.String getConditionalClass();
+   
+   void setConditionalClass(String c);
+   
+   /** Returns a list of name/value pairs. These properties are used to initialize a Conditional implementation. They are consumed by the ConditionalFactory.
+	 * 
+	 * @return a collection of IPMDProperty */
+   java.util.Properties getMetadata();
+
+   /** Creates an action metadata object in the metadata repository */
+   IPMDAction createAction(String label, String actionClass) throws DefinitionServiceException;
+
+   /** Creates a name/value pair property in the metadata repository and associates it with the change condition definition.
+	 * 
+	 * @param name 
+	 * @param value */
+   void addMetadata(java.lang.String name, java.lang.Object value) throws DefinitionServiceException;
+   public void setMetadata(Properties p);
+   
+   void setDescription(java.lang.String value);
+   
+   /**
+    * Add an action to be evaluated when condition evealutes to false.
+    * @param label
+    * @param actionClass
+    * @return
+    * @throws DefinitionServiceException
+    */
+   IPMDAction createFalseAction(String label, String actionClass) throws DefinitionServiceException;
+   /**
+    * List of actions to be run when condition evaluates to false.
+    * @return
+    */
+   Iterator getFalseActions();
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,53 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 21, 2003
+ *
+ */
+package com.sybase.bpe.definition;
+
+import java.util.Collection;
+
+
+/**
+ * @author charper
+ *
+ */
+public interface IPMDCorrelation {
+	
+	/**
+	 * Add a correlation set to this correlations
+	 * @param corr the correlation set
+	 * @param instantiating if this correlation set is instantiating
+	 * @param pattern the pattern for this correlation set to follow
+	 */
+	public void addCorrelationSet(IPMDCorrelationSetDef corlSet, 
+		boolean instantiating, String pattern);
+	
+	/**
+	 * Get a list of the correlation sets.
+	 * @return
+	 */	
+	public Collection getCorrelationSets();
+	
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSet.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSet.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSet.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSet.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,48 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 22, 2003
+ *
+ */
+package com.sybase.bpe.definition;
+
+
+
+/**
+ * @author charper
+ *
+ */
+public interface IPMDCorrelationSet extends IPMDCorrelationSetDef {
+	
+	/**
+	 * If this correlation set is instantiating it's correlation set key values
+	 * @return
+	 */
+	public boolean isInstantiating();
+	
+	/**
+	 * The pattern for this correlation set.
+	 * @return
+	 */
+	public String getPattern();
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSetDef.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSetDef.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSetDef.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDCorrelationSetDef.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,49 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 21, 2003
+ *
+ */
+package com.sybase.bpe.definition;
+
+import java.util.Collection;
+
+/**
+ * @author charper
+ *
+ */
+public interface IPMDCorrelationSetDef {
+	
+	/**
+	 * Get the list of part queries.
+	 * @return PartQuery collection
+	 */
+	public Collection getPartQueries();
+	
+	/**
+	 * Get the correlation set name.
+	 * @return
+	 */
+	public String getName();
+	
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocator.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocator.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocator.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocator.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,107 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDContainer.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDContainer
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+import java.util.ArrayList;
+import java.util.Properties;
+
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.interaction.IInvocation;
+import com.sybase.bpe.interaction.builders.IInteractionBuilder;
+
+
+/** A read only interface that defines a data container. The container metadata is consumed by the ContainerService to create a DataContainer instance. */
+public interface IPMDLocator
+{
+	/**
+	 * the name of the locator
+	 * @return
+	 */
+	String getName();
+ 	/**
+ 	 * The path into the context
+ 	 * @return
+ 	 */
+   java.lang.String getPath();
+  
+	/**
+	 * A query into a context node
+	 * @return
+	 */
+   IInvocation getQuery();
+
+	/**
+	 * The type of the data located
+	 * @return
+	 */
+	int getType();
+	
+	/**
+	 * Indicates weather or not the location is contentious
+	 * @return
+	 */
+	boolean getContentious();
+	
+	/**
+	 * Indicates weather or not the location is contentious
+	 * @param contentious
+	 */
+	void setContentious(boolean contentious);
+	
+	/**
+	 * If the locator is for output
+	 * @return
+	 */
+	boolean getForOutput();
+	
+	/**
+	 * if the locator is for input
+	 */
+	boolean getForInput();
+	
+	/** Creates a property object in the metadata repository.
+	   * 
+	   * @param name 
+	   * @param value */
+	 void addProperty(java.lang.String name, java.lang.String value) throws DefinitionServiceException;
+	 
+	Properties getProperties();
+	
+	void setForOutput(boolean forOutput);
+	
+	IInteractionBuilder getInteractionBuilder();
+	
+	/**
+	 * Is the path absolute.
+	 * @return
+	 */
+	boolean isAbsolute();
+	
+	ArrayList getArrayListPath();
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocatorHolder.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocatorHolder.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocatorHolder.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDLocatorHolder.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,79 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+
+package com.sybase.bpe.definition;
+
+import java.util.Iterator;
+
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.interaction.IInvocation;
+import com.sybase.bpe.interaction.builders.IInteractionBuilder;
+
+
+/**
+ * @author charper
+ *
+ */
+public interface IPMDLocatorHolder {
+	/**
+	 * Get a locator by name
+	 * @param locator
+	 * @return
+	 */
+	IPMDLocator getLocator(String name);
+
+	/**
+	 * Create a locator
+	 * @param name
+	 * @param path
+	 * @param query
+	 * @param interactionBuilder
+	 * @param type
+	 * @param forOutput
+	 * @param contentious
+	 * @return
+	 * @throws DefinitionServiceException
+	 */
+	IPMDLocator createLocator(String name, String path, IInvocation query, IInteractionBuilder interactionBuilder, int type, boolean forOutput,  boolean contentious) throws DefinitionServiceException;
+	
+
+	/**
+	 * Add a locator object.
+	 * @param name
+	 * @param locatorObj
+	 * @return
+	 */
+	IPMDLocator addLocator(String name, IPMDLocator locatorObj );
+	
+	/**
+	 * 
+	 * @return An iterator of locators.
+	 */
+	Iterator getLocators();
+	
+	/**
+	 * @return the number of locators held in the collection
+	 * @return
+	 */
+	int getLocatorSize();
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDOperation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDOperation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDOperation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDOperation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,72 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 21, 2003
+ *
+ */
+package com.sybase.bpe.definition;
+
+import com.sybase.bpe.event.IStaticKey;
+
+/**
+ * @author charper
+ *
+ */
+public interface IPMDOperation {
+	
+	/**
+	 * Get the correlation for this operation.
+	 * @return
+	 */
+	public IPMDCorrelation getCorrelation();
+	
+	/**
+	 * True if this operation creates a new IPMIProcess.
+	 * @return
+	 */
+	public boolean isInstanceCreating();
+	
+	/**
+	 * Get the static key for this operation.
+	 * @return
+	 */
+	public IStaticKey getKey();
+	
+	/**
+	 * Get the root def Id associated with this operation.
+	 * @return
+	 */
+	public String getRootDefId();
+	
+	/**
+	 * Get the def Id associated with this operation.
+	 * @return
+	 */
+	public String getDefId();
+	
+	/**
+	 * Get the operation identifier.
+	 * @return
+	 */
+	public String getOperationId();
+	
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProcess.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProcess.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProcess.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProcess.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,121 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDProcess.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDProcess
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+import java.util.Iterator;
+
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.engine.ProcessDefinitionKey;
+
+/** This persistent component holds the definition of a process. A group of related processes form an executable business process. A process may have a parent process with a different root, this use case would arise when an entire process definition is used as a sub-process within another processs definition. Note: stateful and stateless root processes may not be grafted into each other.
+  * <P>
+  * A definition entity is created when process design tooling generates business process metadata and that metadata is deployed into the process engine.
+  * <P>
+  * The process definition is an internal component to the business process engine and as such will not be exposed through a remote interface.
+  * <P>
+  * The process definition is used to clone process instances that define an executing business processes. Many process instances will hold a reference to the process definition.
+  * <P>
+  * Sub-processes can be obtained from the finder method on the Home interface. */
+public interface IPMDProcess
+{
+   /** A verbose human readable description of the process. It allows a business process analyst to augment a business process design. Will be used by debug tooling, BAM tooling and process simulation tooling to identify to the user where they are within a business process graph.
+     * 
+     * @return a process definition description */
+   java.lang.String getDescription();
+   /** A human readable tag for the process. Will be used by debug tooling, BAM tooling and process simulation tooling to identify to the user where they are within a business process graph.
+     * 
+     * @return a human readable tag for the process definition */
+   java.lang.String getLabel();
+   /** The process definition version
+    * 
+    * @return a process verison */
+   java.lang.String getVersion();
+   /** The root proces definition for the entire business process graph.
+     * 
+     * @return the unique identifier of the root definition */
+   ProcessDefinitionKey getRootKey();
+   
+   /** The root process definition instance
+    * 
+    * @return the root process instance
+    */
+   IPMDRoot getRoot();
+   /** The proces definition unique identifier
+     * 
+     * @return the unique identifier of the definition */
+   ProcessDefinitionKey getKey();
+   /** Returns a list of change conditions. Change conditions are mapped to actions and contain action execution decision logic.
+     * 
+     * @return a collection of IPMDChangeCondition */
+   Iterator getChangeConditions();
+   /** Returns a list of change conditions. Change conditions are mapped to actions and contain action execution decision logic.
+     * 
+     * @return an implementation of IPMDChangeCondition */
+   IPMDChangeCondition getPrecondition();
+   /** A process may have 0..* processes with observing  preconditions. Observing pre-conditions are evaluated when an event occurs on a process instance.
+     * 
+     * @return a collection of IPMDProcess */
+   Iterator getObserverProcessPC();
+   
+   /** A verbose human readable description of the process. It allows a business process analyst to augment a business process design. Will be used by debug tooling, BAM tooling and process simulation tooling to identify to the user where they are within a business process graph.
+	  * 
+	  * @return a process node description */
+	void setDescription(String description);
+	/** The underly repository creates a new change condition metadata object and associates it with the process definition.
+	  * 
+	  * @return an implementation of the IPDMDChangeCondition_Mutate interface */
+	IPMDChangeCondition createChangeCondition(java.lang.String label, java.lang.String conditionalClass) throws DefinitionServiceException;
+	
+
+	/** The underly repository creates a new change condition metadata object and associates it with the process definition.
+	  * 
+	  * @return an implementation of the IPMDChangeCondition_Mutate interface */
+	IPMDChangeCondition createPrecondition(java.lang.String label, java.lang.String conditionalClass) throws DefinitionServiceException;
+	/** adds a process definition to the observer list in the underlying metadata repository
+	  * 
+	  * @param process - an observing process definition */
+	void addObserverProcessPC(IPMDProcess process) throws DefinitionServiceException;
+	/** creates a new process definition in the metadata repository and associates it with the current process definition.
+	  * 
+	  * @return a new process definition */
+	IPMDProcess createSubProcess(java.lang.String label) throws DefinitionServiceException;
+	/** A process may have 0..* associated sub-processes.
+	  * 
+	  * @return a collection of IPMDProcess_Mutate */
+	java.util.Collection getSubProcesses() throws DefinitionServiceException;
+   
+	/**
+	 * Create and unlinked process
+	 * @param label
+	 * @return
+	 * @throws DefinitionServiceException
+	 */
+	public IPMDProcess createUnLinkedProcess(String label) throws DefinitionServiceException;
+
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProperty.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProperty.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProperty.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDProperty.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,43 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDProperty.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDProperty
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+
+/** A read only interface to access name/value pairs in the metadata repository. */
+public interface IPMDProperty
+{
+   /** attribute name
+     * 
+     * @return an attribute name */
+   java.lang.String getName();
+   /** attribute value
+     * 
+     * @return an attribute value */
+   java.lang.String getValue();
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDRoot.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDRoot.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDRoot.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/IPMDRoot.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,214 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/***********************************************************************
+ * Module:  IPMDRoot.java
+ * Author:  waterman
+ * Purpose: Defines the Interface IPMDRoot
+ ***********************************************************************/
+
+package com.sybase.bpe.definition;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+
+import com.sybase.bpe.action.external.IExternalAction;
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.engine.ProcessDefinitionKey;
+import com.sybase.bpe.event.IStaticKey;
+
+/** An implementation of this read only interface holds the root definition of a process. A group of associated processes form an executable business process.
+  * <P>
+  * A definition entity is created when process design tooling generates business process metadata and that metadata is deployed into the process engine.
+  * <P>
+  * The process definition is an internal component to the business process engine and as such will not be exposed outside the engine. This interface will abstract the engine algorithim and deployment tooling from metadata repository details.
+  * <P>
+  * The process definition is used to clone process instances that define an executing business processes. Many process instances will hold a reference to the process definition. */
+public interface IPMDRoot
+{
+   /** Each root process definition has a unique identifier. The
+     * identifier can be used to acquire a root process definition
+     * proxy.
+     * 
+     * @return an identifier that is unique to the metadata repository */
+   ProcessDefinitionKey getKey();
+   /** A human readable tag for the entire business process graph. 
+     * 
+     * @return a human readable tag for the business process graph */
+   java.lang.String getLabel();
+   /** A version of the business process label and/or description. Allows the process definition to evolve over time. A business process definition is versioned at the root only.
+     * 
+     * @return the business process graph version */
+   java.lang.String getVersion();
+   /** A verbose human readable description of the business process. It allows a business process analyst to augment a business process design. 
+     * <P>
+     * At the business process root this description may be quite long since it is describing the entire business process graph.
+     * 
+     * @return the business process graph description */
+   java.lang.String getDescription();
+   /** An identifier as to the persistent nature of a business process. A statful business process is a long running business process that spans many event invocations. A statless business process is short lived and exists for one event invocation.
+     * 
+     * @return true indicates a stateless process definition */
+   boolean getIsStateless();
+   
+    /** A definition root may have only one definition process. The method will create a new IPMDProcess in the repository if one does not exist.
+     * 
+     * @return a IPMDProcess_Mutate implementation */
+   IPMDProcess getProcess();
+   
+   /** Creates a new process definition and associates it with the root node.
+	 * 
+	 * @param label - a human readable tag is required by the metadata repository */
+   IPMDProcess createProcess(java.lang.String label) throws DefinitionServiceException;
+   /** A verbose human readable description of the process. It allows a business process analyst to augment a business process design. Will be used by debug tooling, BAM tooling and process simulation tooling to identify to the user where they are within a business process graph.
+	 * 
+	 * @return a process node description */
+   void setDescription(String description);
+   
+   /**
+    * A process definition may hold references to supporting documents.
+    * ( i.e. WSDL docs, RuleML docs, etc ... )
+    * 
+    * @param key - a unique identifier for the supporting doc
+    * @param doc - a byte array holding the supporting document
+    * 
+    */
+   public void addSupportingDocument(String key, String supportDoc);
+   
+   /**
+	* A process definition may hold references to supporting documents.
+	* ( i.e. WSDL docs, RuleML docs, etc ... )
+	* 
+	* @param key - a unique identifier for the supporting doc
+	* @return doc - a byte array holding the supporting document
+	* 
+	*/
+   public String getSupportingDocument(String key);
+   
+   
+   public void setSupportingDocuments(HashMap docs);
+   
+   public void setIsStateless(boolean state);
+   
+   /**
+    * Add a process instance creating operation.
+    * @param op the operation
+    */
+   public void addInstanceCreatingOperation(IPMDOperation op);
+   
+   /**
+    * Create a correlation set.
+    * @param name  correlation set name
+    * @param partQueries a PartQuery array list
+    * @return
+    */
+   public IPMDCorrelationSetDef createCorrelationSet(String name, ArrayList partQueries);
+   
+   /**
+    * Create a correlation.
+    * @param name the name of the corrlations
+    * @return
+    */
+   public IPMDCorrelation createCorrelation(String name);
+   
+   /**
+    * Create an operation.
+    * @param operationId a unique operation identifier
+    * @param key the static key for the operation
+    * @param corrl the correlation for the operation
+    * @param instanceCreating if the operation creates a new IPMIProcess or routes
+    * @param defId if creatinga new IPMIProcess this is the def to clone
+    * to an existing IPMIProcess
+    * @return
+    */
+   public IPMDOperation createOperation(String operationId, IStaticKey key, IPMDCorrelation corrl, 
+   	boolean instanceCreating, String defId);
+   
+   /**
+    * Create an on message operation.
+    * @param operationId a unique operation identifier
+    * @param key the static key for the operation
+    * @param corrl the correlation for the operation
+    * @param instanceCreating if the operation creates a new IPMIProcess or routes
+    * @param defId if creatinga new IPMIProcess this is the def to clone
+    * to an existing IPMIProcess
+    * @return
+    */
+   public IPMDOperation createOnMessageOperation(String operationId, IStaticKey key, IPMDCorrelation corrl, 
+   	boolean instanceCreating, String defId);
+   
+   /**
+    * Create a recieve operation.
+    * @param operationId a unique operation identifier
+    * @param key the static key for the operation
+    * @param corrl the correlation for the operation
+    * @param instanceCreating if the operation creates a new IPMIProcess or routes
+    * @param defId if creatinga new IPMIProcess this is the def to clone
+    * to an existing IPMIProcess
+    * @return
+    */
+   public IPMDOperation createRecieveOperation(String operationId, IStaticKey key, IPMDCorrelation corrl, 
+   	boolean instanceCreating, String defId);
+   	
+   	/**
+   	 * Get all the instance creating operations.
+   	 * @return
+   	 */
+   	public Collection getInstanceCreatingOperations();
+   	
+   	/**
+   	 * Get a specific operation.
+   	 * @param operationId
+   	 * @return
+   	 */
+   	public IPMDOperation getOperation(String operationId);
+   	
+   	/**
+   	 * allows the definition to manage external action references
+   	 * 
+   	 * @param key
+   	 * @return
+   	 */
+	public IExternalAction getExternalAction(Object key);
+	public void putExternalAction(Object key, IExternalAction value);
+	public void clearExternalAction();
+	public Collection getMetaNonInstanceCreatingOperations();
+	
+	public void setProtectedInstantiation(boolean flag);
+	public boolean getProtectedInstantiation();
+   	
+   	/**
+   	 * Get the state of the definition
+   	 * @return
+   	 */
+   	public int getState();
+   	
+   	/**
+   	 * Set the state of the definition
+   	 * @param state
+   	 * @return
+   	 */
+   	public void setState(int state);
+   	
+    public boolean isActive();
+   	
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDAction_SerialImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDAction_SerialImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDAction_SerialImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDAction_SerialImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,225 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.definition.serialimpl;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+//import java.util.logging.Logger;
+
+import com.sybase.bpe.action.internal.ActionFactory;
+import com.sybase.bpe.action.internal.IInternalAction;
+import com.sybase.bpe.definition.IPMDAction;
+import com.sybase.bpe.definition.IPMDLocator;
+import com.sybase.bpe.definition.IPMDRoot;
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.interaction.IInvocation;
+import com.sybase.bpe.interaction.builders.IInteractionBuilder;
+import com.sybase.bpe.util.BPException;
+
+/**
+ * @author waterman
+ *
+ * The in-memory implementation of IPMAction
+ * 
+ */
+public class PMDAction_SerialImpl implements IPMDAction, Serializable {
+    
+	static final long serialVersionUID = 1118925500981545331L;
+    	
+//	private static Logger logger = 
+//		Logger.getLogger(PMDAction_SerialImpl.class.getName());
+	
+	private String label;
+	private String description;
+	private String className;
+	private Properties props;
+	private HashMap locators;
+	private PMDRoot_SerialImpl root;
+	private transient IInternalAction actionImpl;
+	
+
+   PMDAction_SerialImpl(String label, String actionClass, PMDRoot_SerialImpl root) {
+
+	this.label = label;
+	this.className = actionClass;
+  	
+	props = new Properties();
+	locators = new HashMap();
+	this.root = root;
+  	 	
+   }
+   
+   public PMDAction_SerialImpl() {
+		
+   }
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDAction_Mutate#getActionClass()
+	 */
+	public String getActionClass() {
+		return className;
+	}
+	public void setActionClass(String name) {
+		className = name;
+		try {
+			if ( props != null && root != null && actionImpl == null ) {
+				actionImpl = ActionFactory.createAction(className,props,this);
+			}
+		} catch (BPException e) {
+			// do nothing
+		}	
+	}
+
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDAction_Mutate#setDescription(String)
+	 */
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDAction_Mutate#getMetadata()
+	 */
+	public Properties getMetadata() {
+		return props;
+	}
+	public void setMetadata(Properties p) {
+		props = p;
+		
+		if ( className != null && root != null && actionImpl == null ) {
+			try {
+				actionImpl = ActionFactory.createAction(className,props,this);
+			} catch (BPException e) {
+				// do nothing
+			}	
+		}
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDAction_Mutate#addMetadata(String, String)
+	 */
+	public void addMetadata(String name, Object value)
+		throws DefinitionServiceException {
+			
+			props.put(name,value);
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDAction_Mutate#createInputContainer(String, String, String)
+	 */
+	public IPMDLocator createLocator(
+		String name,
+		String path,
+		IInvocation query,
+		IInteractionBuilder builder,
+		int type, 
+		boolean forOutput,
+		boolean contentious)
+		throws DefinitionServiceException {
+			
+		IPMDLocator ret = new PMDLocator_SerialImpl(name,path,
+			query,builder,type,forOutput,contentious);
+			
+		locators.put(name,ret);
+		
+		return ret;
+	}
+	
+	public IPMDLocator getLocator(String name){
+		return (IPMDLocator)locators.get(name);
+	}
+	
+	public IPMDLocator addLocator(String name, IPMDLocator locatorObj){
+		locators.put(name,locatorObj);
+		return locatorObj;
+	}
+
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDAction#getDescription()
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDAction#getLabel()
+	 */
+	public String getLabel() {
+		return label;
+	}
+	public void setLabel(String label) {
+		this.label = label;
+	}
+	
+	/**
+	 * @see com.sybase.bpe.definition.IPMDAction#getActionImpl()
+	 */
+	public IInternalAction getActionImpl() throws BPException {
+		if ( actionImpl == null ) {
+			actionImpl = ActionFactory.createAction(className,props,this);
+			return actionImpl;
+		} else {
+			return actionImpl;
+		}	
+	}
+
+
+	
+	public HashMap getLocatorCollection() {
+		return locators;
+	}
+	public void setLocatorCollection(HashMap hm) {
+		locators = hm;
+	}
+	
+	public Iterator getLocators() {
+		return locators.values().iterator();
+	}
+	
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDLocatorHolder#getLocatorSize()
+	 */
+	public int getLocatorSize() {
+		return locators.size();
+	}
+	
+	public IPMDRoot getRoot() {
+		return root;
+	}
+	
+	public void setRoot(IPMDRoot root) {
+		this.root = (PMDRoot_SerialImpl)root;
+		try {
+			if ( props != null && className != null && actionImpl == null ) {
+				actionImpl = ActionFactory.createAction(className,props,this);
+			}
+		} catch (BPException e) {
+			// do nothing
+		}	
+	}
+	
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDChangeCondition_SerialImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDChangeCondition_SerialImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDChangeCondition_SerialImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDChangeCondition_SerialImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,268 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.definition.serialimpl;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Vector;
+//import java.util.logging.Logger;
+
+import com.sybase.bpe.condition.Conditional;
+import com.sybase.bpe.condition.ConditionalFactory;
+import com.sybase.bpe.definition.IPMDAction;
+import com.sybase.bpe.definition.IPMDChangeCondition;
+import com.sybase.bpe.definition.IPMDLocator;
+import com.sybase.bpe.definition.IPMDRoot;
+import com.sybase.bpe.definition.service.DefinitionServiceException;
+import com.sybase.bpe.interaction.IInvocation;
+import com.sybase.bpe.interaction.builders.IInteractionBuilder;
+import com.sybase.bpe.util.BPException;
+
+/**
+ * @author waterman
+ *
+ * The in-memory implementation of PMDChangeCondition
+ * 
+ */
+public class PMDChangeCondition_SerialImpl implements IPMDChangeCondition, Serializable {
+	
+    static final long serialVersionUID = -8039881624470633713L;
+    
+//	private static Logger logger = 
+//		Logger.getLogger(PMDChangeCondition_SerialImpl.class.getName());
+
+	private String label;
+	private String description;
+	private String className;
+	private Properties props;
+	
+	private HashMap locators;
+	private Vector actions;
+	private Vector falseActions;
+	private PMDRoot_SerialImpl root;
+	
+	private transient Conditional conditionalImpl;
+
+   PMDChangeCondition_SerialImpl(java.lang.String label, java.lang.String conditionalClass, PMDRoot_SerialImpl root) throws DefinitionServiceException {
+
+	this.label = label;
+	className = conditionalClass;
+	
+	props = new Properties();
+	locators = new HashMap();
+	actions = new Vector();
+	falseActions = new Vector();
+	this.root = root;
+
+   }
+   
+   public PMDChangeCondition_SerialImpl() {
+		
+   }
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#getConditionalClass()
+	 */
+	public String getConditionalClass() {
+		return className;
+	}
+	public void setConditionalClass(String c) {
+		className = c;
+		try {
+			if ( props != null ) {
+				conditionalImpl = ConditionalFactory.createConditional(className,props);
+			}
+		} catch (BPException e) {
+			// do nothing	
+		}
+	}
+
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#getMetadata()
+	 */
+	public Properties getMetadata() {
+		return props;
+	}
+	public void setMetadata(Properties props) {
+		this.props = props;
+		if ( className != null ) {
+			try {
+				conditionalImpl = ConditionalFactory.createConditional(className,props);
+			} catch (BPException e) {
+				// do nothing
+			}	
+		}
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#createInputContainer(String, String, String)
+	 */
+	public IPMDLocator createLocator(
+		String name,
+		String path,
+		IInvocation query,
+		IInteractionBuilder builder,
+		int type, 
+		boolean forOutput,
+		boolean contentious)
+		throws DefinitionServiceException {
+		
+		IPMDLocator ret = new PMDLocator_SerialImpl(name,path,
+			query,builder,type,forOutput,contentious);
+		
+		locators.put(name,ret);
+			
+		return ret;
+	}
+	
+	public IPMDLocator getLocator(String name){
+		return (IPMDLocator)locators.get(name);
+	}
+	
+	public IPMDLocator addLocator(String name, IPMDLocator locatorObj){
+		locators.put(name,locatorObj);
+		return locatorObj;
+	}
+
+
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#createAction(String, String)
+	 */
+	public IPMDAction createAction(String label, String actionClass)
+		throws DefinitionServiceException {
+			
+		IPMDAction ret = new PMDAction_SerialImpl(label,actionClass,root);
+		actions.add(ret);
+		return ret;
+	}
+	
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#createFalseAction(String, String)
+	 */
+	public IPMDAction createFalseAction(String label, String actionClass)
+		throws DefinitionServiceException {
+			
+		IPMDAction ret = new PMDAction_SerialImpl(label,actionClass,root);
+		falseActions.add(ret);
+		return ret;
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#addMetadata(String, String)
+	 */
+	public void addMetadata(String name, Object value)
+		throws DefinitionServiceException {
+			
+			props.put(name,value);
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.service.IPMDChangeCondition_Mutate#setDescription(String)
+	 */
+	public void setDescription(String value) {
+		description = value;
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDChangeCondition#getDescription()
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDChangeCondition#getLabel()
+	 */
+	public String getLabel() {
+		return label;
+	}
+	public void setLabel(String label) {
+		this.label = label;
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDChangeCondition#getActions()
+	 */
+	public Iterator getActions() {
+		return actions.iterator();
+	}
+	
+	/**
+	 * @see com.sybase.bpe.definition.IPMDChangeCondition#getActions()
+	 */
+	public Iterator getFalseActions() {
+		return falseActions.iterator();
+	}
+
+	/**
+	 * @see com.sybase.bpe.definition.IPMDChangeCondition#getConditionalImpl()
+	 */
+	public Conditional getConditionalImpl() throws BPException {
+		if ( conditionalImpl == null ) {
+			conditionalImpl = ConditionalFactory.createConditional(className,props);
+			return conditionalImpl;
+		} else {
+			return conditionalImpl;
+		}		
+	}
+	
+	
+	
+	public HashMap getLocatorCollection() {
+		return locators;
+	}
+	public void setLocatorCollection(HashMap hm) {
+		locators = hm;
+	}
+	
+	
+	public Vector getActionCollection() {
+		return actions;
+	}
+	public void setActionCollection(Vector v) {
+		actions = v;
+	}
+	
+	public Iterator getLocators() {
+		return locators.values().iterator();
+	}
+	
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDLocatorHolder#getLocatorSize()
+	 */
+	public int getLocatorSize() {
+		return locators.size();
+	}
+	
+	public IPMDRoot getRoot() {
+		return root;
+	}
+	
+	public void setRoot(IPMDRoot root) {
+		this.root = (PMDRoot_SerialImpl)root;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSetDef_SerialImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSetDef_SerialImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSetDef_SerialImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSetDef_SerialImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,80 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 22, 2003
+ *
+ */
+package com.sybase.bpe.definition.serialimpl;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import com.sybase.bpe.definition.IPMDCorrelationSetDef;
+
+/**
+ * @author charper
+ *
+ */
+public class PMDCorrelationSetDef_SerialImpl implements IPMDCorrelationSetDef, Serializable {
+	
+    static final long serialVersionUID = -1904654339647957485L;
+	
+	public PMDCorrelationSetDef_SerialImpl(){}
+	
+	private ArrayList partQueries;
+	private String name;
+	
+	public PMDCorrelationSetDef_SerialImpl( String name, ArrayList partQueries ){
+		this.name = name;
+		this.partQueries = partQueries;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSetDef#getPartQueries()
+	 */
+	public Collection getPartQueries() {
+		return partQueries;
+	}
+
+	/**
+	 * @param list
+	 */
+	public void setPartQueries(Collection list) {
+		partQueries = (ArrayList)list;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSetDef#getName()
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param string
+	 */
+	public void setName(String string) {
+		name = string;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSet_SerialImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSet_SerialImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSet_SerialImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelationSet_SerialImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,111 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 22, 2003
+ *
+ */
+package com.sybase.bpe.definition.serialimpl;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+import com.sybase.bpe.definition.IPMDCorrelationSet;
+import com.sybase.bpe.definition.IPMDCorrelationSetDef;
+
+/**
+ * @author charper
+ *
+ */
+public class PMDCorrelationSet_SerialImpl implements IPMDCorrelationSet, Serializable {
+	
+    static final long serialVersionUID = 3877545268892122477L;
+	
+	public PMDCorrelationSet_SerialImpl(){}
+	
+	private boolean isInstantiating;
+	private String pattern;
+	private IPMDCorrelationSetDef correlationSetDef;
+	
+	public PMDCorrelationSet_SerialImpl(IPMDCorrelationSetDef correlationSetDef,
+		boolean isInstantiating, String pattern){
+			this.correlationSetDef = correlationSetDef;
+			this.isInstantiating = isInstantiating;
+			this.pattern = pattern;
+		}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSet#isInstantiating()
+	 */
+	public boolean isInstantiating() {
+		return isInstantiating;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSet#getPattern()
+	 */
+	public String getPattern() {
+		return pattern;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSetDef#getPartQueries()
+	 */
+	public Collection getPartQueries() {
+		return correlationSetDef.getPartQueries();
+	}
+
+	/**
+	 * @return
+	 */
+	public IPMDCorrelationSetDef getCorrelationSetDef() {
+		return correlationSetDef;
+	}
+
+	/**
+	 * @param def
+	 */
+	public void setCorrelationSetDef(IPMDCorrelationSetDef def) {
+		correlationSetDef = def;
+	}
+
+	/**
+	 * @param b
+	 */
+	public void setInstantiating(boolean b) {
+		isInstantiating = b;
+	}
+
+	/**
+	 * @param string
+	 */
+	public void setPattern(String string) {
+		pattern = string;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelationSetDef#getName()
+	 */
+	public String getName() {
+		return correlationSetDef.getName();
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelation_SerialImpl.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelation_SerialImpl.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelation_SerialImpl.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/definition/serialimpl/PMDCorrelation_SerialImpl.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,94 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 22, 2003
+ *
+ */
+package com.sybase.bpe.definition.serialimpl;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import com.sybase.bpe.definition.IPMDCorrelation;
+import com.sybase.bpe.definition.IPMDCorrelationSetDef;
+
+/**
+ * @author charper
+ *
+ */
+public class PMDCorrelation_SerialImpl implements IPMDCorrelation, Serializable {
+	
+    static final long serialVersionUID = -8377620704085473024L;
+
+	public PMDCorrelation_SerialImpl() {
+	}
+
+	public PMDCorrelation_SerialImpl(String corrleationId) {
+		this.correlationId = corrleationId;
+		correlationSets = new ArrayList();
+	}
+
+	private ArrayList correlationSets;
+	private String correlationId;
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelation#addCorrelationSet(com.sybase.bpe.definition.service.IPMDCorrelationSetDef, boolean, java.lang.String)
+	 */
+	public void addCorrelationSet(
+		IPMDCorrelationSetDef corlSet,
+		boolean instantiating,
+		String pattern) {
+
+		correlationSets.add(
+			new PMDCorrelationSet_SerialImpl(corlSet, instantiating, pattern));
+
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.definition.service.IPMDCorrelation#getCorrelationSets()
+	 */
+	public Collection getCorrelationSets() {
+		return correlationSets;
+	}
+
+	/**
+	 * @return
+	 */
+	public String getCorrelationId() {
+		return correlationId;
+	}
+
+	/**
+	 * @param string
+	 */
+	public void setCorrelationId(String string) {
+		correlationId = string;
+	}
+	/**
+	 * @param list
+	 */
+	public void setCorrelationSets(Collection list) {
+		correlationSets = (ArrayList)list;
+	}
+
+}