// 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"); } }
public SsisSequence(DTS.IDTSSequence dtsSequence, SequenceTask objContainer) { if (objContainer.ConstraintMode != "Linear" && objContainer.ConstraintMode != "Parallel") { MessageEngine.Global.Trace(Severity.Error, "Unknown ConstraintMode: {0} ", objContainer.ConstraintMode); } _constraintMode = objContainer.ConstraintMode; _transactionMode = objContainer.TransactionMode; _dtsSequence = dtsSequence; }
public static PhysicalTask.SequenceTask Lower(this AstTask.AstContainerTaskNode astNode) { if (astNode.AsClassOnly) { return null; } try { PhysicalTask.SequenceTask sequenceTask = new PhysicalTask.SequenceTask(); switch (astNode.TransactionMode) { case VulcanEngine.IR.Ast.Task.ContainerTransactionMode.StartOrJoin: sequenceTask.TransactionMode = "Required"; break; case VulcanEngine.IR.Ast.Task.ContainerTransactionMode.Join: sequenceTask.TransactionMode = "Supported"; break; case VulcanEngine.IR.Ast.Task.ContainerTransactionMode.NoTransaction: sequenceTask.TransactionMode = "NotSupported"; break; default: sequenceTask.TransactionMode = "Supported"; break; } sequenceTask.ConstraintMode = astNode.ConstraintMode.ToString(); sequenceTask.Log = astNode.Log; sequenceTask.Name = astNode.Name; foreach (AstTask.AstVariableNode variableNode in astNode.Variables) { Variable physicalVariableNode = variableNode.Lower(); physicalVariableNode.Parent = sequenceTask; sequenceTask.VariableList.Add(physicalVariableNode); } foreach (AstTask.AstTaskNode taskNode in astNode.Tasks) { PhysicalTask.Task physicalTaskNode = taskNode.Lower(); if (physicalTaskNode != null) { physicalTaskNode.Parent = sequenceTask; sequenceTask.Tasks.Add(physicalTaskNode); } } ProcessHelperTables(astNode, sequenceTask); if (astNode.Log) { PhysicalTask.SequenceTask logSequenceTask = new PhysicalTask.SequenceTask(); logSequenceTask.ConstraintMode = AstTask.ContainerConstraintMode.Linear.ToString(); logSequenceTask.Log = astNode.Log; logSequenceTask.Name = String.Format("__LOGWRAPPER_{0}", astNode.Name); AddConnection(astNode.LogConnection); logSequenceTask.LogConnectionName = astNode.LogConnection == null ? null : astNode.LogConnection.Name; logSequenceTask.Tasks.Add(CreateLogStartTask(logSequenceTask, astNode.ReferenceableName)); logSequenceTask.Tasks.Add(CreateLogReadPreviousValuesTask(logSequenceTask, sequenceTask, astNode.ReferenceableName)); logSequenceTask.Tasks.Add(sequenceTask); logSequenceTask.Tasks.Add(CreateLogEndTask(logSequenceTask, sequenceTask, astNode.ReferenceableName)); return logSequenceTask; } return sequenceTask; } catch (Exception e) { throw new SSISEmitterException(astNode, e); } }
public string LogEnd(SequenceTask logContainer, string logIDName) { TemplatePlatformEmitter te = new TemplatePlatformEmitter("LogEnd", logIDName); return te.Emit(logContainer); }
public string LogSetValue(SequenceTask logContainer, string logIDName, string pathVariable, string nameVariable, string value) { TemplatePlatformEmitter te = new TemplatePlatformEmitter("LogSetValue", logIDName, pathVariable, nameVariable, value); return te.Emit(logContainer); }
public string LogPrepareToSetValue(SequenceTask logContainer) { TemplatePlatformEmitter te = new TemplatePlatformEmitter("LogPrepareToSetValue"); return te.Emit(logContainer); }
public string LogGetPredefinedValues(SequenceTask logContainer) { TemplatePlatformEmitter te = new TemplatePlatformEmitter("LogGetPredefinedValues"); return te.Emit(logContainer); }
public string LogStart(SequenceTask logContainer, string packageName, string taskName, string varScopeXML) { TemplatePlatformEmitter te = new TemplatePlatformEmitter("LogStart", packageName, taskName, varScopeXML); return te.Emit(logContainer); }