Beispiel #1
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			// the fork and join are created in the parent block but we'll add them
			// also as referencable objects to this block's scope a few lines below
			_parentBlock = creationContext.ProcessBlock;
			this._join = new JoinImpl();
			this._fork = new ForkImpl();

			creationContext.ProcessBlock = this;
			base.ReadProcessData(xmlElement, creationContext);
			XmlElement joinElement = xmlElement.GetChildElement("join");
			creationContext.Check((joinElement != null), "element join is missing");
			XmlElement forkElement = xmlElement.GetChildElement("fork");
			creationContext.Check((joinElement != null), "element fork is missing");
			((JoinImpl) this._join).ReadProcessData(joinElement, creationContext);
			((ForkImpl) this._fork).ReadProcessData(forkElement, creationContext);
			creationContext.ProcessBlock = _parentBlock;

			this._nodes.Add(_join);
			this._nodes.Add(_fork);

			// add the fork and join as referencable objects in the proper scope
			creationContext.AddReferencableObject(_fork.Name, _parentBlock, typeof (INode), _fork);
			creationContext.AddReferencableObject(_join.Name, this, typeof (INode), _join);
		}
Beispiel #2
0
		public void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			DefinitionObjectImpl definitionObject = creationContext.DefinitionObject;

			// first make sure the definitionObject has got an id
			DbSession dbSession = creationContext.DbSession;
			dbSession.SaveOrUpdate(definitionObject);

			// store the reference link to the definitionObject 
			this._definitionObjectId = definitionObject.Id;

			log.Debug("adding action : ");
			log.Debug("  definitionObjectId: " + _definitionObjectId);
			log.Debug("  definitionObject: " + definitionObject);

			this._eventType = EventTypeHelper.fromText(xmlElement.GetAttribute("event"));

			log.Debug("action on eventType '" + _eventType + "' and definitionObject " + creationContext.DefinitionObject);

			// reading the action delegation
			creationContext.DelegatingObject = this;
			this._actionDelegation = new DelegationImpl();
			this._actionDelegation.ReadProcessData(xmlElement, creationContext);
			creationContext.DelegatingObject = null;

			dbSession.SaveOrUpdate(this);
		}
Beispiel #3
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);

			// get the process definition for that name
			String subProcessDefinitionName = xmlElement.GetProperty("process");
			creationContext.Check(((Object) subProcessDefinitionName != null), "process is missing in the process state : " + subProcessDefinitionName);
			DbSession dbSession = creationContext.DbSession;
			dbSession.SaveOrUpdate(this._processDefinition);
			try
			{
				this._subProcess = (ProcessDefinitionImpl) dbSession.FindOne(queryFindProcessDefinitionByName, subProcessDefinitionName, DbType.STRING);
			}
			catch (SystemException e)
			{
				creationContext.AddError("process '" + subProcessDefinitionName + "' was not deployed while it is referenced in a process-state. Exception: " + e.Message);
			}

			// parse the processInvokerDelegation
			creationContext.DelegatingObject = this;
			this._processInvokerDelegation = new DelegationImpl();
			XmlElement invocationElement = xmlElement.GetChildElement("process-invocation");
			creationContext.Check((invocationElement != null), "process-invocation is missing in the process-state : " + xmlElement);
			this._processInvokerDelegation.ReadProcessData(invocationElement, creationContext);

			creationContext.DelegatingObject = null;

			// parse the actorExpression
			this._actorExpression = xmlElement.GetProperty("actor-expression");
			creationContext.Check(((Object) _actorExpression != null), "actor-expression is missing in the process-state : " + xmlElement);
		}
Beispiel #4
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);
			creationContext.DelegatingObject = this;
			this._decisionDelegation = new DelegationImpl();
			this._decisionDelegation.ReadProcessData(xmlElement, creationContext);
			creationContext.DelegatingObject = null;
		}
Beispiel #5
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			DefinitionObjectImpl parent = creationContext.DefinitionObject;
			creationContext.DefinitionObject = this;
			base.ReadProcessData(xmlElement, creationContext);
			creationContext.DefinitionObject = parent;
			this._from = creationContext.Node;

			creationContext.AddUnresolvedReference(this, xmlElement.GetProperty("to"), creationContext.TransitionDestinationScope, "to", typeof (INode));
		}
Beispiel #6
0
		public void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			this._processDefinition = creationContext.ProcessDefinition;

			Type delegatingObjectClass = creationContext.DelegatingObject.GetType();
			if (delegatingObjectClass == typeof (AttributeImpl))
			{
				String type = xmlElement.GetProperty("type");
				if ((Object) type != null)
				{
					this._className = ((String) attributeTypes[type]);
					string suportedTypes = "supported types: ";
					foreach (Object o in attributeTypes.Keys)
					{
						suportedTypes += o.ToString() + " ,";				
					}
					creationContext.Check(((Object) this._className != null), "attribute type '" + type + "' is not supported. " + suportedTypes +" !");
				}
				else
				{
					this._className = xmlElement.GetProperty("serializer");
					creationContext.Check(((Object) this._className != null), "for an attribute, you must specify either a type or a serializer");
				}
			}
			else if (delegatingObjectClass == typeof (FieldImpl))
			{
				this._className = xmlElement.GetProperty("class");
				creationContext.Check(((Object) this._className != null), "no class specified for a delegation : " + xmlElement);
			}
			else
			{
				this._className = xmlElement.GetProperty("handler");
				creationContext.Check(((Object) this._className != null), "no handler specified for a delegation : " + xmlElement);
			}

			log.Debug("parsing delegation for tag '" + xmlElement.Name + "' : " + this._className);

			// parse the exception handler    
			String exceptionHandlerText = xmlElement.GetAttribute("on-exception");
			if ((Object) exceptionHandlerText != null)
			{
				_exceptionHandlingType = ExceptionHandlingTypeHelper.FromText(exceptionHandlerText);
				creationContext.Check((_exceptionHandlingType != 0), "unknown exception handler '" + exceptionHandlerText + "' in delegation " + xmlElement);
			}

			// create the configuration string
			XmlElement configurationXml = new XmlElement("cfg");
			IEnumerator iter = xmlElement.GetChildElements("parameter").GetEnumerator();
			while (iter.MoveNext())
			{
				configurationXml.AddChild((XmlElement) iter.Current);
			}
			_configuration = configurationXml.ToString();
		}
Beispiel #7
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);
			this._scope = creationContext.ProcessBlock;
			this._initialValue = xmlElement.GetProperty("initial-value");

			creationContext.DelegatingObject = this;
			this._serializerDelegation = new DelegationImpl();
			this._serializerDelegation.ReadProcessData(xmlElement, creationContext);
			creationContext.DelegatingObject = null;
			creationContext.AddReferencableObject(_name, (ProcessBlockImpl) this._scope, typeof (IAttribute), this);
		}
Beispiel #8
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);

			if ((Object) xmlElement.GetAttribute("handler") != null)
			{
				creationContext.DelegatingObject = this;
				this._joinDelegation = new DelegationImpl();
				this._joinDelegation.ReadProcessData(xmlElement, creationContext);
				creationContext.DelegatingObject = null;
			}
		}
Beispiel #9
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);

			XmlElement assignmentElement = xmlElement.GetChildElement("assignment");
			if (assignmentElement != null)
			{
				creationContext.DelegatingObject = this;
				this._assignmentDelegation = new DelegationImpl();
				this._assignmentDelegation.ReadProcessData(assignmentElement, creationContext);
				creationContext.DelegatingObject = null;
			}
			this._actorRoleName = xmlElement.GetProperty("role");
		}
Beispiel #10
0
		public void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			String attributeName = xmlElement.GetProperty("attribute");
			creationContext.Check(((Object) attributeName != null), "attribute is a required property in element field : " + xmlElement);

			log.Debug("parsing field for attribute '" + attributeName);

			creationContext.AddUnresolvedReference(this, attributeName, creationContext.ProcessBlock, "attribute", typeof (IAttribute));

			this._state = creationContext.State;

			String accessText = xmlElement.GetProperty("access");
			creationContext.Check(((Object) accessText != null), "access is a required property in element field : " + xmlElement);
			this._access = FieldAccessHelper.fromText(accessText);
		}
Beispiel #11
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);

			creationContext.State = this;
			this._fields = new ListSet();
			IEnumerator iter = xmlElement.GetChildElements("field").GetEnumerator();
			while (iter.MoveNext())
			{
				FieldImpl field = new FieldImpl();
				field.ReadProcessData((XmlElement) iter.Current, creationContext);
				_fields.Add(field);
			}
			creationContext.State = null;
		}
Beispiel #12
0
		public virtual void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			this._name = xmlElement.GetProperty("name");
			log.Debug("parsing '" + xmlElement.Name + "' with name '" + _name + "'");
			this._description = xmlElement.GetProperty("description");
			this._processDefinition = creationContext.ProcessDefinition;
			IEnumerator iter = xmlElement.GetChildElements("action").GetEnumerator();
			while (iter.MoveNext())
			{
				creationContext.DefinitionObject = this;
				XmlElement actionElement = (XmlElement) iter.Current;
				ActionImpl action = new ActionImpl();
				action.ReadProcessData(actionElement, creationContext);
				creationContext.DefinitionObject = null;
			}
		}
Beispiel #13
0
		public void ReadWebData(XmlElement xmlElement, CreationContext creationContext)
		{
			this._name = xmlElement.GetProperty("name");
			this._description = xmlElement.GetProperty("description");
			this._index = creationContext.Index;

			log.Debug("paring web information for field " + _name);

			creationContext.DelegatingObject = this;
			XmlElement formatterElement = xmlElement.GetChildElement("htmlformatter");
			if (formatterElement != null)
			{
				this._htmlFormatterDelegation = new DelegationImpl();
				this._htmlFormatterDelegation.ReadProcessData(formatterElement, creationContext);
			}
			creationContext.DelegatingObject = null;
		}
Beispiel #14
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);

			this._arrivingTransitions = new ListSet();
			this._leavingTransitions = new ListSet();
			this._processBlock = creationContext.ProcessBlock;

			creationContext.Node = this;
			this.TransitionDestinationScope = creationContext;
			IEnumerator iter = xmlElement.GetChildElements("transition").GetEnumerator();
			while (iter.MoveNext())
			{
				XmlElement transitionElement = (XmlElement) iter.Current;
				TransitionImpl transition = new TransitionImpl();
				transition.ReadProcessData(transitionElement, creationContext);
				_leavingTransitions.Add(transition);
			}
			creationContext.TransitionDestinationScope = null;
			creationContext.Node = null;
			creationContext.AddReferencableObject(_name, (ProcessBlockImpl) this._processBlock, typeof (INode), this);
		}
Beispiel #15
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			this._endState = new EndStateImpl();
			this._startState = new StartStateImpl();

			// read the process-block contents, the start- and the end-state 
			creationContext.ProcessBlock = this;
			base.ReadProcessData(xmlElement, creationContext);
			XmlElement startElement = xmlElement.GetChildElement("start-state");
			creationContext.Check((startElement != null), "element start-state is missing");
			XmlElement endElement = xmlElement.GetChildElement("end-state");
			creationContext.Check((endElement != null), "element end-state is missing");
			_startState.ReadProcessData(startElement, creationContext);
			_endState.ReadProcessData(endElement, creationContext);
			creationContext.ProcessBlock = null;

			// add the start & end state to the nodes of this process definition
			this._nodes.Add(_startState);
			this._nodes.Add(_endState);

			// add the end state as referencable object
			creationContext.AddReferencableObject(this._endState.Name, this, typeof (INode), this._endState);

			// read the optional authorization handler
			XmlElement authorizationElement = xmlElement.GetChildElement("authorization");
			if (authorizationElement != null)
			{
				creationContext.DelegatingObject = this;
				this.authorizationDelegation = new DelegationImpl();
				this.authorizationDelegation.ReadProcessData(authorizationElement, creationContext);
				creationContext.DelegatingObject = null;
			}

			// read the optional responsible for this process definition
			this._responsibleUserName = xmlElement.GetProperty("responsible");

			// calculate the version of this process definition
			this._version = GetVersionNr(creationContext);

			// attach the class files to this process definitions
			this._classFiles = GetAssemblyFiles(creationContext);
		}
Beispiel #16
0
		public void ReadWebData(XmlElement xmlElement, CreationContext creationContext)
		{
			// first read the image
			XmlElement imageElement = xmlElement.GetChildElement("image");
			creationContext.Check((imageElement != null), "element image is missing");
			// reading the image-file     
			String imageFileName = imageElement.GetProperty("name");
			creationContext.Check(((Object) imageFileName != null), "image name is missing");
			this._image = (byte[]) creationContext.Entries[imageFileName];

			if (this._image == null)
			{
				creationContext.AddError("couldn't find image file '" + imageFileName + "' in the process archive. (make sure the specified path is relative to the archive-root)");
			}

			this._imageMimeType = imageElement.GetProperty("mime-type");
			creationContext.Check(((Object) _imageMimeType != null), "image mime-type is missing");
			try
			{
				_imageHeight = Int32.Parse(imageElement.GetProperty("height"));
				creationContext.Check(((Object) _imageHeight != null), "image height is missing");
				_imageWidth = Int32.Parse(imageElement.GetProperty("width"));
				creationContext.Check(((Object) _imageWidth != null), "image width is missing");
			}
			catch (FormatException e)
			{
				creationContext.AddError("image height or width contains unparsable numbers : height=\"" + imageElement.GetProperty("height") + "\" width=\"" + imageElement.GetProperty("width") + "\". Exception: " + e.Message);
			}

			DbSession dbSession = creationContext.DbSession;

			// then the activity-states
			IEnumerator iter = xmlElement.GetChildElements("activity-state").GetEnumerator();
			while (iter.MoveNext())
			{
				XmlElement activityStateElement = (XmlElement) iter.Current;
				String activityStateName = activityStateElement.GetProperty("name");
				creationContext.Check(((Object) activityStateName != null), "property name in activity state is missing");

				Object[] values = new Object[] {activityStateName, _id};
				IType[] types = new IType[] {DbType.STRING, DbType.LONG};
				StateImpl state = null;

				try
				{
					state = (StateImpl) dbSession.FindOne(queryFindState, values, types);
				}
				catch (DbException e)
				{
					creationContext.AddError("activity-state '" + activityStateName + "' was referenced from the webinterface.xml but not defined in the processdefinition.xml. Exception:" + e.Message);
				}

				state.ReadWebData(activityStateElement, creationContext);
			}
		}
Beispiel #17
0
		private Int32 GetVersionNr(CreationContext creationContext)
		{
			int newVersion = 1;
			IEnumerator iter = creationContext.DbSession.Iterate(queryFindVersionNumbers, _name, DbType.STRING).GetEnumerator();
			if (iter.MoveNext())
			{
				Int32 highestVersionNumber = (Int32) iter.Current;
				if ((Object) highestVersionNumber != null)
				{
					newVersion = highestVersionNumber + 1;
				}
			}
			if (iter.MoveNext())
			{
				throw new NetBpm.Util.DB.DbException("duplicate value");
			}
			return newVersion;
		}
Beispiel #18
0
		public ISet GetAssemblyFiles(CreationContext creationContext)
		{
			ISet classFiles = new HashedSet();
			IDictionary entries = creationContext.Entries;
			IEnumerator iter = entries.Keys.GetEnumerator();
			while (iter.MoveNext())
			{
				String entryName = (String) iter.Current;
				if ((entryName.StartsWith("lib")) && (entryName.EndsWith(".dll")))
				{
					if (log.IsDebugEnabled)
					{
						log.Debug("attaching assembly file " + entryName);						
					}

					byte[] classBytes = (byte[]) entries[entryName];

					if (log.IsDebugEnabled)
					{
						log.Debug("found assembly " + entryName);						
					}

					Assembly assemply= Assembly.Load(classBytes);
					if (log.IsDebugEnabled)
					{
						log.Debug("attaching assembly name: " + assemply.GetName().Name+" Version:"+assemply.GetName().Version.ToString());
					}

					AssemblyFileImpl assemblyFile = new AssemblyFileImpl();
					assemblyFile.FileName = entryName;
					assemblyFile.Bytes = classBytes;
					assemblyFile.AssemblyName=assemply.GetName().Name;
					assemblyFile.AssemblyVersion=assemply.GetName().Version.ToString();
					assemblyFile.ProcessDefinition = _processDefinition;
					classFiles.Add(assemblyFile);
				}
			}
			return classFiles;
		}
Beispiel #19
0
		public virtual void ReadWebData(XmlElement xmlElement, CreationContext creationContext)
		{
			XmlElement coordinatesXmlElement = xmlElement.GetChildElement("image-coordinates");
			if (coordinatesXmlElement != null)
			{
				try
				{
					_x1 = Int32.Parse(coordinatesXmlElement.GetProperty("x1"));
					_y1 = Int32.Parse(coordinatesXmlElement.GetProperty("y1"));
					_x2 = Int32.Parse(coordinatesXmlElement.GetProperty("x2"));
					_y2 = Int32.Parse(coordinatesXmlElement.GetProperty("y2"));

					creationContext.Check((((Object) _x1 != null) && ((Object) _y1 != null) && ((Object) _x2 != null) && ((Object) _y2 != null)), "at least one of the image-coordinates (x1,y1,x2,y2) is missing : " + xmlElement);
				}
				catch (FormatException e)
				{
					creationContext.AddError("at least one of the image-coordinates is not parsable : " + xmlElement + " exception:" + e.Message);
				}
			}

			DbSession dbSession = creationContext.DbSession;
			creationContext.State = this;
			creationContext.Index = 0;
			IEnumerator iter = xmlElement.GetChildElements("field").GetEnumerator();
			while (iter.MoveNext())
			{
				XmlElement fieldElement = (XmlElement) iter.Current;
				String attributeName = fieldElement.GetProperty("attribute");

				FieldImpl field = null;

				Object[] values = new Object[] {_id, attributeName};
				IType[] types = new IType[] {DbType.LONG, DbType.STRING};

				IList fields = dbSession.Find(queryFindFieldByActivityStateAndAttributeName, values, types);
				if (fields.Count == 1)
				{
					field = (FieldImpl) fields[0];
				}
				else
				{
					values = new Object[] {_processBlock.Id, attributeName};
					types = new IType[] {DbType.LONG, DbType.STRING};
					AttributeImpl attribute = (AttributeImpl) dbSession.FindOne(queryFindAttibuteByName, values, types);

					field = new FieldImpl();
					field.Access = FieldAccess.READ_WRITE;
					field.State = this;
					field.Attribute = attribute;
					this._fields.Add(field);
				}

				field.ReadWebData(fieldElement, creationContext);
				creationContext.IncrementIndex();
			}
		}
Beispiel #20
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			base.ReadProcessData(xmlElement, creationContext);
		}
Beispiel #21
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			creationContext.DefinitionObject = this;
			base.ReadProcessData(xmlElement, creationContext);
			creationContext.DefinitionObject = null;
		}
Beispiel #22
0
		public override void ReadProcessData(XmlElement xmlElement, CreationContext creationContext)
		{
			this._nodes = new ListSet();
			this._attributes = new ListSet();
			this._childBlocks = new ListSet();

			base.ReadProcessData(xmlElement, creationContext);

			IEnumerator iter = xmlElement.GetChildElements("attribute").GetEnumerator();
			while (iter.MoveNext())
			{
				AttributeImpl attribute = new AttributeImpl();
				attribute.ReadProcessData((XmlElement) iter.Current, creationContext);
				_attributes.Add(attribute);
			}

			iter = xmlElement.GetChildElements("activity-state").GetEnumerator();
			while (iter.MoveNext())
			{
				ActivityStateImpl activityState = new ActivityStateImpl();
				activityState.ReadProcessData((XmlElement) iter.Current, creationContext);
				_nodes.Add(activityState);
			}

			iter = xmlElement.GetChildElements("process-state").GetEnumerator();
			while (iter.MoveNext())
			{
				ProcessStateImpl processState = new ProcessStateImpl();
				processState.ReadProcessData((XmlElement) iter.Current, creationContext);
				_nodes.Add(processState);
			}

			iter = xmlElement.GetChildElements("decision").GetEnumerator();
			while (iter.MoveNext())
			{
				DecisionImpl decision = new DecisionImpl();
				decision.ReadProcessData((XmlElement) iter.Current, creationContext);
				_nodes.Add(decision);
			}

			iter = xmlElement.GetChildElements("concurrent-block").GetEnumerator();
			while (iter.MoveNext())
			{
				ConcurrentBlockImpl concurrentBlock = new ConcurrentBlockImpl();
				concurrentBlock.ReadProcessData((XmlElement) iter.Current, creationContext);
				_childBlocks.Add(concurrentBlock);
			}
		}
		private XmlElement GetXmlElementForEntry(String entryName, IDictionary entries, CreationContext creationContext)
		{
			XmlElement xmlElement = null;

			byte[] processDefinitionXml = (byte[]) entries[entryName];
			if (processDefinitionXml == null)
			{
				creationContext.AddError("entry '" + entryName + "' found not found in the process archive");
				throw new SystemException("entry '" + entryName + "' found not found in the process archive");
			}

			Stream processDefinitionInputStream = new MemoryStream(processDefinitionXml);
			XmlParser xmlParser = new XmlParser(processDefinitionInputStream);
			xmlElement = xmlParser.Parse();
			return xmlElement;
		}
		public void DeployProcessArchive(Stream processArchiveStream, DbSession dbSession)
		{
			log.Debug("reading process archive...");
			try
			{
				IDictionary entries = null;
				// construct an empty process definition
				ProcessDefinitionImpl processDefinition = new ProcessDefinitionImpl();
				try
				{
					entries = ReadEntries(processArchiveStream);
				}
				catch (IOException e)
				{
					throw new NpdlException("couldn't deploy process archive, the processArchiveBytes do not seem to be a valid jar-file : " + e.Message, e);
				}

				// Then save the process definition
				// This is done so hibernate will assign an id to this object.
				dbSession.Save(processDefinition);
				CreationContext creationContext = new CreationContext(processDefinition, entries, dbSession);
				try
				{
					// parse the  processdefinition.xml
					XmlElement xmlElement = GetXmlElementForEntry("processdefinition.xml", entries, creationContext);
					// build the object model from the xml
					creationContext.PushScope("in processdefinition.xml");
					processDefinition.ReadProcessData(xmlElement, creationContext);
					creationContext.PopScope();
					// resolve all forward references
					creationContext.ResolveReferences();

					processDefinition.Validate(creationContext);

					if (creationContext.HasErrors())
					{
						throw new NpdlException(creationContext.Errors);
					}
					// read the optional web-interface information
					if (entries.Contains("web/webinterface.xml"))
					{
						log.Debug("processing webinterface.xml...");
						xmlElement = GetXmlElementForEntry("web/webinterface.xml", entries, creationContext);
						creationContext.PushScope("in webinterface.xml");
						processDefinition.ReadWebData(xmlElement, creationContext);
						creationContext.PopScope();
					}
					else
					{
						log.Debug("no web/webinterface.xml was supplied");
					}

				}
				catch (SystemException e)
				{
					log.Error("xml parsing error :", e);
					creationContext.AddError(e.GetType().FullName + " : " + e.Message);
					creationContext.AddError("couldn't continue to parse the process archive");
					throw new NpdlException(creationContext.Errors);
				}

				// flush the changes to the database
				dbSession.SaveOrUpdate(processDefinition);
				dbSession.Flush();
			}
			catch (DbException e)
			{
				throw new NpdlException("couldn't deploy process archive due to a database exception : " + e.Message, e);
			}
		}