<?xml version="1.0" encoding="UTF-8"?>
<MetamergeConfig created="Thu May 25 01:04:52 CEST 2006" createdBy="no010196" modified="Thu May 25 02:20:41 CEST 2006" modifiedBy="no010196" version="1.1">
<Folder name="AssemblyLines">
<AssemblyLine name="TestAL">
<LogEnabled>true</LogEnabled>
<Settings>
<parameter name="ALPoolSettingsDialog">showALPoolSettings</parameter>
<parameter name="ScriptEngine">JavaScript</parameter>
<parameter name="automapattributes">false</parameter>
<parameter name="debug">false</parameter>
<parameter name="includeGlobalPrologs">true</parameter>
<parameter name="includePrologs">subString</parameter>
<parameter name="maxread"></parameter>
<parameter name="nullBehavior">Default Behavior</parameter>
<parameter name="nullBehaviorDialog">showNullBehavior</parameter>
</Settings>
<Hooks>
<Hook>
<Name>prolog0</Name>
<Script></Script>
<Enabled>false</Enabled>
<DebugBreak>false</DebugBreak>
</Hook>
</Hooks>
<CheckpointConfig/>
<SandboxConfig/>
<LogConfig/>
<ContainerEF name="EntryFeedContainer">
<Connector name="RuntimeConnector">
<InheritFrom>/Connectors/RuntimeConnector</InheritFrom>
<ConnectorMode>Iterator</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration>
<InheritFrom>[parent]</InheritFrom>
</Configuration>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser>
<InheritFrom>[parent]</InheritFrom>
</Parser>
<AttributeMap name="Input">
<InheritFrom>[parent]</InheritFrom>
<AttributeMapItem>
<Name>*</Name>
<Type>simple</Type>
<Enabled>true</Enabled>
<Add>true</Add>
<Modify>true</Modify>
<Script></Script>
<Simple>*</Simple>
</AttributeMapItem>
</AttributeMap>
<AttributeMap name="Output">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
<DeltaSettings>
<Driver>CloudScape</Driver>
</DeltaSettings>
<Schema name="Input">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<Schema name="Output">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<LinkCriteria>
<InheritFrom>[parent]</InheritFrom>
</LinkCriteria>
<Hooks>
<InheritFrom>[parent]</InheritFrom>
</Hooks>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect>
<parameter name="autoreconnect">true</parameter>
</Reconnect>
</Connector>
</ContainerEF>
<ContainerDF name="DataFlowContainer">
<Connector name="debug message">
<ConnectorMode>Script</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration/>
<ConnectorScript>task.logmsg("---&gt;" + subString( work.toString(), 75 ));</ConnectorScript>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser/>
<AttributeMap name="Input"/>
<AttributeMap name="Output"/>
<DeltaSettings/>
<Schema name="Input"/>
<Schema name="Output"/>
<LinkCriteria/>
<Hooks/>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect/>
</Connector>
</ContainerDF>
<ThreadOptions/>
<CallReturn>
<Schema name="Input"/>
<Schema name="Output"/>
<AttributeMap name="Output"/>
<AttributeMap name="Input"/>
</CallReturn>
</AssemblyLine>
<AssemblyLine name="!! Start Me !!">
<LogEnabled>true</LogEnabled>
<Settings>
<parameter name="ALPoolSettingsDialog">showALPoolSettings</parameter>
<parameter name="ScriptEngine">JavaScript</parameter>
<parameter name="automapattributes">false</parameter>
<parameter name="debug">false</parameter>
<parameter name="includeGlobalPrologs">true</parameter>
<parameter name="nullBehaviorDialog">showNullBehavior</parameter>
</Settings>
<Hooks/>
<CheckpointConfig/>
<SandboxConfig/>
<LogConfig/>
<ContainerEF name="EntryFeedContainer"/>
<ContainerDF name="DataFlowContainer">
<Connector name="Prepare for loop">
<ConnectorMode>Script</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration/>
<ConnectorScript><![CDATA[// Initialize counter used in Loop below
//
var counter = 0;
var connName = "RTConn";

// Get Connector (this returns a "Raw" Connector)
//
var useConn = system.getConnector("Connectors/FileReader");

if (useConn == null) {
	task.logmsg("**** Cannot create Connector");

	task.shutdown();
}

// Save as a Java property, making it global for all
// threads in this VM. Then set the parameter of the
// Scripted RuntimeConnector (called RTConn in my
// AL) called "connectorName" to the key value of this
// property. In this way, I can pass multiple Raw Conns
// to different Scripted RuntimeConnectors in the same
// AL
//
task.logmsg("---> Storing RT Connector as Java property...");
java.lang.System.getProperties().put(connName, useConn);






]]></ConnectorScript>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser/>
<AttributeMap name="Input"/>
<AttributeMap name="Output"/>
<DeltaSettings/>
<Schema name="Input"/>
<Schema name="Output"/>
<LinkCriteria/>
<Hooks/>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect/>
</Connector>
<Loop name="Run three times">
<LoopType>0</LoopType>
<LoopInitOption>1</LoopInitOption>
<Branch name="Run three times">
<Connector name="Init RT Conn">
<ConnectorMode>Script</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration/>
<ConnectorScript><![CDATA[// Initialize Connector and set up TCB with Accumulator
//
task.logmsg("---> Initializing connector...");
useConn.initialize(null);

]]></ConnectorScript>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser/>
<AttributeMap name="Input"/>
<AttributeMap name="Output"/>
<DeltaSettings/>
<Schema name="Input"/>
<Schema name="Output"/>
<LinkCriteria/>
<Hooks/>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect/>
</Connector>
<Function name="start_TestAL">
<InheritFrom>system:/Functions/ibmdi.AssemblyLineFC</InheritFrom>
<parameter name="state">Enabled</parameter>
<Schema name="Input">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<Schema name="Output">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<Hooks>
<InheritFrom>[parent]</InheritFrom>
</Hooks>
<Configuration>
<InheritFrom>[parent]</InheritFrom>
<parameter name="assemblyLine">/AssemblyLines/TestAL</parameter>
<parameter name="debug">false</parameter>
<parameter name="userComment"></parameter>
</Configuration>
<SandboxConfig/>
<AttributeMap name="Input">
<InheritFrom>[parent]</InheritFrom>
<AttributeMapItem>
<Name>*</Name>
<Type>simple</Type>
<Enabled>true</Enabled>
<Add>true</Add>
<Modify>true</Modify>
<Script></Script>
<Simple>*</Simple>
</AttributeMapItem>
</AttributeMap>
<AttributeMap name="Output">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
</Function>
<Connector name="Close RT Conn">
<ConnectorMode>Script</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration/>
<ConnectorScript>useConn.terminate();  // Close the connector</ConnectorScript>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser/>
<AttributeMap name="Input"/>
<AttributeMap name="Output"/>
<DeltaSettings/>
<Schema name="Input"/>
<Schema name="Output"/>
<LinkCriteria/>
<Hooks/>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect/>
</Connector>
<ScriptCondition><![CDATA[ret.value = (++counter <= 3);]]></ScriptCondition>
<Conditions/>
<MatchAny>false</MatchAny>
<Enabled>true</Enabled>
</Branch>
</Loop>
</ContainerDF>
<ThreadOptions/>
<CallReturn>
<Schema name="Input"/>
<Schema name="Output"/>
<AttributeMap name="Output"/>
<AttributeMap name="Input"/>
</CallReturn>
</AssemblyLine>
</Folder>
<Folder name="Connectors">
<Connector name="RuntimeConnector">
<InheritFrom>system:/Connectors/ibmdi.ScriptConnector</InheritFrom>
<ConnectorMode>Iterator</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration>
<InheritFrom>[parent]</InheritFrom>
<parameter name="debug">false</parameter>
<parameter name="includeFiles"></parameter>
<parameter name="script"><![CDATA[// Get the Java Property name where my Raw Connector is stored
var connName = "RTConn";
task.logmsg("---> Scripted RuntimeConnector - using connector (property): " + connName);

function selectEntries() {

	// Get globally saved Connector (must be pre-initialized)
	RTConn = java.lang.System.getProperties().get(connName);

	if (RTConn == null) 
		task.logmsg("** Could not get System property called \"" + connName + "\"")
	else {
		RTConn.selectEntries();
	}
}

function getNextEntry() {

	RTConn = java.lang.System.getProperties().get(connName);

	if (RTConn != null) {
		retEntry = RTConn.getNextEntry();
	} else {
		task.logmsg("** Could not get System property called \"" + connName + "\"")
		retEntry = null;
	}
	
	if (retEntry == null) {
		result.setStatus( 0 );
		result.setMessage( "End of input" );
	} else {
		entry.merge(retEntry, true);
	}
}
]]></parameter>
</Configuration>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser>
<InheritFrom>[parent]</InheritFrom>
</Parser>
<AttributeMap name="Input">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
<AttributeMap name="Output">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
<DeltaSettings>
<Driver>CloudScape</Driver>
</DeltaSettings>
<Schema name="Input">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<Schema name="Output">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<LinkCriteria>
<InheritFrom>[parent]</InheritFrom>
<AdvancedLinkMode>false</AdvancedLinkMode>
</LinkCriteria>
<Hooks>
<InheritFrom>[parent]</InheritFrom>
</Hooks>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect>
<parameter name="numberOfRetries">1</parameter>
<parameter name="retryDelay">10</parameter>
</Reconnect>
</Connector>
<Connector name="FileReader">
<InheritFrom>system:/Connectors/ibmdi.FileSystem</InheritFrom>
<ConnectorMode>Iterator</ConnectorMode>
<ConnectorState>Enabled</ConnectorState>
<Configuration>
<InheritFrom>[parent]</InheritFrom>
<parameter name="debug">false</parameter>
<parameter name="filePath">examples\_Merglets\RTProvidedConn\People.csv</parameter>
</Configuration>
<ComputeChanges>true</ComputeChanges>
<DeltaBehavior>0</DeltaBehavior>
<DeltaStrict>true</DeltaStrict>
<Parser>
<InheritFrom>system:/Parsers/ibmdi.CSV</InheritFrom>
<parameter name="characterSet"></parameter>
<parameter name="csvEnableQuoting">true</parameter>
<parameter name="csvLogLongLines">0</parameter>
<parameter name="csvWriteHeader">true</parameter>
<parameter name="debug">false</parameter>
</Parser>
<AttributeMap name="Input">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
<AttributeMap name="Output">
<InheritFrom>[parent]</InheritFrom>
</AttributeMap>
<DeltaSettings>
<Driver>CloudScape</Driver>
</DeltaSettings>
<Schema name="Input">
<InheritFrom>[parent]</InheritFrom>
<SchemaItem>
<Name>Address</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>City</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>Department</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>EmployeeNumber</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>FirstName</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>LastName</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>State</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>Status</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>Title</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
<SchemaItem>
<Name>ZIP</Name>
<Syntax>java.lang.String</Syntax>
<Presence>null</Presence>
</SchemaItem>
</Schema>
<Schema name="Output">
<InheritFrom>[parent]</InheritFrom>
</Schema>
<LinkCriteria>
<InheritFrom>[parent]</InheritFrom>
</LinkCriteria>
<Hooks>
<InheritFrom>[parent]</InheritFrom>
</Hooks>
<CheckpointConfig/>
<SandboxConfig/>
<Reconnect>
<parameter name="autoreconnect">true</parameter>
<parameter name="numberOfRetries">1</parameter>
<parameter name="retryDelay">10</parameter>
</Reconnect>
</Connector>
</Folder>
<Folder name="Parsers"/>
<Folder name="EventHandlers"/>
<Folder name="Scripts">
<Script name="subString">
<parameter name="ScriptEngine">JavaScript</parameter>
<parameter name="includeFiles"></parameter>
<parameter name="script"><![CDATA[function subString( str, len ) {

   if (len >= (str.length()-3))
      return str
   else
      return str.substring(0, len) + "...";
}]]></parameter>
</Script>
</Folder>
<JavaLibraries/>
<JavaProperties/>
<Folder name="Includes"/>
<Folder name="ExternalProperties">
<ExternalProperties name=" Default">
<Encrypted>false</Encrypted>
</ExternalProperties>
</Folder>
<Folder name="Config">
<LogConfig name="Logging"/>
<InstanceProperties name="AutoStart">
<AutoStart/>
</InstanceProperties>
</Folder>
<Folder name="Functions"/>
<Folder name="AttributeMaps"/>
</MetamergeConfig>
