Monday, August 15, 2011

TDI Sandboxing

I've been looking over the use of the Sandbox feature.
It's been around for sometime, although I'm not aware of many people using it.

Here's some scenarios of use:
  • Someone encounters a problem while developing an assemblyline in a closed environment. They need your help in debugging the Assemblyline, although aren't able to give you network access to the backend systems which the connectors are communicating with.
  • You have a resource which isn't always available on the network.
  • You want to debug the Assemblyline without having to connect to the Company's network, while at home in the evening.
By using the Sandbox feature included with the TDI Config Editor, we're able to create a repository of the sources which the Assemblyline interacts with. With the Sandbox and the Assemblyline, you can run the solution in another TDI CE & Server and debug the Assemblyline without the connectivity to the backend sources.



To Sandbox an Assemblyline, do the following:
NOTE: The Sandbox facility is not supported in AssemblyLines containing a Connector in Server mode, or an Iterator Connector with Delta enabled. The server will abort the running of the AssemblyLine if this is discovered.

Setup:
Define which resources you want captured in the Sandbox

The 'Database' name, used to store the Sandbox, will be the name of the directory created in the Solution directory. In this panel we also define which resources we want available to Record and to Playback.


Record Mode:
On the first initial run, you will have the Assemblyline in Record Mode.
This is done in the 'Specify Run Option' panel.



You'll see the following statement on the 'Record' run of the Assemblyline.
  • CTGDIS256I AssemblyLine AssemblyLines/'AL_Name' is started, recording to: 'Sandbox_Database_Name'.
  • You'll see the 'Database name' defined in the 'Sandbox Settings' panel appear as a directory in the Solution Directory.

Playback Mode:
Now set the Run Mode of the Assemblyline to 'Playback'.
Instead of the Assemblyline accessing the Active Directory as defined in the connector...the connector is simulated during playback.

The Active Directory system could be offline..or on a closed network....It just doesn't matter anymore..now we have a copy of the source and we can test this Assemblyline in any environment we want.

When the Assemblyline starts, you'll see the following line at the beginning of the ibmdi.log file.
  • CTGDIS257I AssemblyLine AssemblyLines/'AL_Name' is started, playing back from: 'Sandbox_Database_Name'.


Portability of the Sandbox:
As on of the benefits of the Sandbox, you're able to hand a few resources to another person and they're be able to run the Assemblyline without any of the backend resources/repositories. To move the Sandbox, you need to
  • Place a copy of the 'Sandbox' directory into the 'Solution_directory' on the other machine.
  • Import a copy of the TDI Eclipse Project or TDI Config XML into the other machine.
FYI: The table/view created in the Derby database held in the Sandbox directory is tied to the name of the Assemblyline. I discovered this when renaming an Assemblyline. So don't rename the Assemblyline, unless you want to dig into the database and do some modifications.
  • CTGDIS084I Initialization of ActiveDirectoryChangeDetectionConnector failed: java.lang.Exception: [ActiveDirectoryChangeDetectionConnector] CTGDIS025E Exception while loading configuration: java.lang.RuntimeException: CTGDIS593E Internal IDI proxy object exception: Table/View 'ASSEMBLYLINES_AD_DOMINOA_ACTIVEDIRECTORYCHANGEDETECTIONCONNECTOR' does not exist. ..






No comments:

Post a Comment