コード例 #1
0
        public virtual void ReadProcessData(XmlElement xmlElement, ProcessDefinitionBuildContext 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);
        }
コード例 #2
0
        public override void ReadProcessData(XmlElement xmlElement, ProcessDefinitionBuildContext 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));
        }