public override void ReadProcessData(XmlElement xmlElement, ProcessDefinitionBuildContext 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 //todo 這行應該移到ProcessDefinitionService //this._version = GetVersionNr(creationContext); // attach the class files to this process definitions //todo 這行應該移到ProcessDefinitionService //this._classFiles = GetAssemblyFiles(creationContext); }
public virtual StartStateImpl CreateStartState() { _startState = new StartStateImpl(this); AddNode(_startState); return _startState; }
public override void ReadProcessData(XmlElement xmlElement, ProcessDefinitionBuildContext 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 //todo 這行應該移到ProcessDefinitionService //this._version = GetVersionNr(creationContext); // attach the class files to this process definitions //todo 這行應該移到ProcessDefinitionService //this._classFiles = GetAssemblyFiles(creationContext); }
public virtual StartStateImpl CreateStartState() { _startState = new StartStateImpl(this); AddNode(_startState); return(_startState); }