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); }
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); }
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); }
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); }