public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); // validate the attributes IEnumerator iter = _attributes.GetEnumerator(); while (iter.MoveNext()) { AttributeImpl attribute = (AttributeImpl)iter.Current; attribute.Validate(validationContext); } // validate the nodes iter = _nodes.GetEnumerator(); while (iter.MoveNext()) { NodeImpl node = (NodeImpl)iter.Current; node.Validate(validationContext); } // validate the childBlocks iter = _childBlocks.GetEnumerator(); while (iter.MoveNext()) { ProcessBlockImpl processBlock = (ProcessBlockImpl)iter.Current; processBlock.Validate(validationContext); } }
public ProcessDefinitionBuildContext(ProcessDefinitionImpl processDefinition, IDictionary <string, byte[]> entries, DbSession dbSession) { InitBlock(); this._processDefinition = processDefinition; this._processBlock = processDefinition; this._dbSession = dbSession; this._entries = entries; }
public UnresolvedReference(Object referencingObject, String destinationName, ProcessBlockImpl destinationScope, String property, Type destinationType) { this._referencingObject = referencingObject; this._destinationName = destinationName; this._destinationScope = destinationScope; this._property = property; this._destinationType = destinationType; }
public void AddReferencableObject(String name, ProcessBlockImpl scope, Type type, Object referencableObject) { ReferencableObject referenceType = new ReferencableObject(scope, type); IDictionary referencables = (IDictionary)_referencableObjects[referenceType]; if (referencables == null) { referencables = new Hashtable(); _referencableObjects[referenceType] = referencables; } referencables[name] = referencableObject; }
public FlowImpl(String name, FlowImpl parent, ProcessBlockImpl processBlock) { this._name = name; this._start = DateTime.Now; this._processInstance = parent.ProcessInstance; this._subProcessInstances = null; this._parent = parent; this._children = null; this._logs = new ListSet(); this._parentReactivation = true; CreateAttributeInstances(processBlock.Attributes); }
private Object FindInScope(UnresolvedReference unresolvedReference, ProcessBlockImpl scope) { Object referencedObject = null; if (scope != null) { ReferencableObject referenceType = new ReferencableObject(scope, unresolvedReference.DestinationType); IDictionary referencables = (IDictionary)_referencableObjects[referenceType]; if ((referencables != null) && (referencables.Contains(unresolvedReference.DestinationName))) { referencedObject = referencables[unresolvedReference.DestinationName]; } else { referencedObject = FindInScope(unresolvedReference, scope.ParentBlock); } } return(referencedObject); }
public void ResolveReferences() { IEnumerator iter = _unresolvedReferences.GetEnumerator(); while (iter.MoveNext()) { UnresolvedReference unresolvedReference = (UnresolvedReference)iter.Current; Object referencingObject = unresolvedReference.ReferencingObject; String referenceDestinationName = unresolvedReference.DestinationName; ProcessBlockImpl scope = unresolvedReference.DestinationScope; String property = unresolvedReference.Property; Object referencedObject = FindInScope(unresolvedReference, unresolvedReference.DestinationScope); if (referencedObject == null) { AddError("failed to deploy process archive : couldn't resolve " + property + "=\"" + referenceDestinationName + "\" from " + referencingObject + " in scope " + scope); } else { if (referencingObject is TransitionImpl) { if (property.Equals("to")) { TransitionImpl transition = (TransitionImpl)referencingObject; transition.To = (NodeImpl)referencedObject; } } if (referencingObject is FieldImpl) { if (property.Equals("attribute")) { FieldImpl field = (FieldImpl)referencingObject; field.Attribute = (AttributeImpl)referencedObject; } } } } }
public void AddUnresolvedReference(Object referencingObject, String destinationName, ProcessBlockImpl destinationScope, String property, Type destinationType) { _unresolvedReferences.Add(new UnresolvedReference(referencingObject, destinationName, destinationScope, property, destinationType)); }
public ProcessDefinitionBuildContext(ProcessDefinitionImpl processDefinition, IDictionary<string,byte[]> entries, DbSession dbSession) { InitBlock(); this._processDefinition = processDefinition; this._processBlock = processDefinition; this._dbSession = dbSession; this._entries = entries; }
private Object FindInScope(UnresolvedReference unresolvedReference, ProcessBlockImpl scope) { Object referencedObject = null; if (scope != null) { ReferencableObject referenceType = new ReferencableObject(scope, unresolvedReference.DestinationType); IDictionary referencables = (IDictionary) _referencableObjects[referenceType]; if ((referencables != null) && (referencables.Contains(unresolvedReference.DestinationName))) { referencedObject = referencables[unresolvedReference.DestinationName]; } else { referencedObject = FindInScope(unresolvedReference, scope.ParentBlock); } } return referencedObject; }
public void AddReferencableObject(String name, ProcessBlockImpl scope, Type type, Object referencableObject) { ReferencableObject referenceType = new ReferencableObject(scope, type); IDictionary referencables = (IDictionary) _referencableObjects[referenceType]; if (referencables == null) { referencables = new Hashtable(); _referencableObjects[referenceType] = referencables; } referencables[name] = referencableObject; }
public ReferencableObject(ProcessBlockImpl scope, Type type) { _type = type; _scope = scope; }
public CreationContext(ProcessDefinitionImpl processDefinition, IDictionary entries, DbSession dbSession) { InitBlock(); this._processDefinition = processDefinition; this._processBlock = processDefinition; this._dbSession = dbSession; this._entries = entries; }