Exemple #1
0
 // TODO: Could we lose the constraint information in Container from doing this as ContainerBase?
 public SsisContainer(SequenceTask container, SSISEmitterContext context)
     : base(container, context)
 {
     this._logicalContainer = container;
     if (this.Name != null && this.ParentContainer != null)
     {
         if (this.ParentContainer.Executables.Contains(Name))
         {
             if (this.ParentContainer.Executables[Name] is DTS.IDTSSequence)
             {
                 _SSISContainer = (DTS.Sequence) this.ParentContainer.Executables[Name];
             }
         }
         else
         {
             DTS.Sequence sequence = (DTS.Sequence)context.SSISSequence.AppendExecutable("STOCK:Sequence");
             sequence.Name  = this.Name;
             _SSISContainer = sequence;
         }
     }
     else if (container is Package)
     {
         // Do Nothing
     }
     else
     {
         MessageEngine.Global.Trace(Severity.Error, new ArgumentException("parentContainer cannot be null"), "parentContainer cannot be null");
     }
 }
Exemple #2
0
        public override void Emit(XPathNavigator patternNavigator)
        {
            string name           = patternNavigator.SelectSingleNode("@Name").Value;
            string constraintMode = patternNavigator.SelectSingleNode("@ConstraintMode").Value;

            DTS.Sequence newParentContainer = VulcanPackage.AddSequenceContainer(name, ParentContainer);

            DTS.Executable previousExec = null;
            Pattern        p            = null;

            foreach (XPathNavigator nav in patternNavigator.SelectChildren(XPathNodeType.Element))
            {
                p = PatternFactory.ProcessPattern(VulcanPackage, newParentContainer, nav, p);

                switch (constraintMode)
                {
                case "Linear":
                    VulcanPackage.AddPrecedenceConstraint(previousExec, p.FirstExecutableGeneratedByPattern, newParentContainer);
                    break;

                case "Parallel":
                    break;

                default:
                    Message.Trace(Severity.Error, "Unknown ConstraintMode {0}", constraintMode);
                    break;
                }
                previousExec = p.LastExecutableGeneratedByPattern;
            }
            this.FirstExecutableGeneratedByPattern = newParentContainer;
            this.LastExecutableGeneratedByPattern  = this.FirstExecutableGeneratedByPattern;
        }
Exemple #3
0
 // TODO: Could we lose the constraint information in Container from doing this as ContainerBase?
 public SsisContainer(SequenceTask container, SSISEmitterContext context)
     : base(container, context)
 {
     this._logicalContainer = container;
     if (this.Name != null && this.ParentContainer != null)
     {
         if (this.ParentContainer.Executables.Contains(Name))
         {
             if (this.ParentContainer.Executables[Name] is DTS.IDTSSequence)
             {
                 _SSISContainer = (DTS.Sequence)this.ParentContainer.Executables[Name];
             }
         }
         else
         {
             DTS.Sequence sequence = (DTS.Sequence)context.SSISSequence.AppendExecutable("STOCK:Sequence");
             sequence.Name = this.Name;
             _SSISContainer = sequence;
         }
     }
     else if (container is Package)
     {
         // Do Nothing
     }
     else
     {
         MessageEngine.Global.Trace(Severity.Error, new ArgumentException("parentContainer cannot be null"), "parentContainer cannot be null");
     }
 }
Exemple #4
0
 public DTS.Sequence AddSequenceContainer(string name, DTS.IDTSSequence parentContainer)
 {
     if (name != null && parentContainer != null)
     {
         if (parentContainer.Executables.Contains(name))
         {
             if (parentContainer.Executables[name] is DTS.IDTSSequence)
             {
                 return((DTS.Sequence)parentContainer.Executables[name]);
             }
         }
         DTS.Sequence sequence = (DTS.Sequence)parentContainer.Executables.Add("STOCK:Sequence");
         sequence.Name = name;
         return(sequence);
     }
     return(null);
 }
Exemple #5
0
        public override void Emit(SsisEmitterContext context)
        {
            try
            {
               _sequenceContainer = (DTS.Sequence)context.ParentContainer.AppendExecutable(Moniker);
                context.ParentContainer.ProcessTaskBinding(this);
                _sequenceContainer.Name = Name;
                _sequenceContainer.TransactionOption = (DTSTransactionOption)Enum.Parse(typeof(DTSTransactionOption), TransactionMode);

                base.Emit(context);
            }
            catch (DtsException e)
            {
                if (e.ErrorCode == -1073659647)
                {
                    MessageEngine.Trace(AstNamedNode, Severity.Error, "V1050", "Attempted to reuse the name '{0}' within an SSIS package, which is illegal. Use a unique name.", Name);
                }
                else
                {
                    throw;
                }
            }
        }
Exemple #6
0
        public override void Emit(SsisEmitterContext context)
        {
            try
            {
                _sequenceContainer = (DTS.Sequence)context.ParentContainer.AppendExecutable(Moniker);
                context.ParentContainer.ProcessTaskBinding(this);
                _sequenceContainer.Name = Name;
                _sequenceContainer.TransactionOption = (DTSTransactionOption)Enum.Parse(typeof(DTSTransactionOption), TransactionMode);

                base.Emit(context);
            }
            catch (DtsException e)
            {
                if (e.ErrorCode == -1073659647)
                {
                    MessageEngine.Trace(AstNamedNode, Severity.Error, "V1050", "Attempted to reuse the name '{0}' within an SSIS package, which is illegal. Use a unique name.", Name);
                }
                else
                {
                    throw;
                }
            }
        }