How To's

Here are some docs, video lectures and example Configs that focus on a feature set or type of component in TDI.

(Very) Advanced XML Handling

Franz Wolfhagen has created these excellent presentation, along with accompanying example Configs on how to handle XML using TDI.

How to use AMC

AMC is the TDI Administration and Monitoring Console. This is an AppServer application that is part of the TDI installation. You can either use WAS Express (WebSphere Application Server Express edition is bundled with TDI) or install it on full WAS or even Apache Tomcat.

The AMC system must be started separately and provides a web-based interface for monitoring your running solutions, starting and stopping ALs, examining logs, modifying properties, and much more. Jon Elwood has been kind enough to provide the following tutorial write-up and example files:

Thanks again, Jon! Hope your Metamerge pen serves you well smile

Integrating Domino/Notes with TDI

#dominointegration This tutorial walk-through covers the various Connectors available in TDI for Domino/Notes work and includes step-by-step exercises for managing Domino Internet Users, provisioning Notes accounts (with mail and id file setup), working directly with Documents and detecting changes in any .nsf database.

And here is a link to the Domino Java classes that you can access from your TDI script code. Note that this link is for Domino 8.5, and you can find the other by Googling for "Corba classes domino".

XML

Lak Sri of TDI L2 Support fame has gone above and beyond with this lecture on the various XML handling options available in TDI, including simple and complex XML, DSML and Web Services. Please note the video format used works best with Microsoft Internet Explorer, and Centra will probably want to install software on your desktop to view it. Also note that you will want to fast-forward past the first 3 minutes of "testing...testing..." to get to the good stuff.

Web Services

The inimitable TDI Support Team have created this tutorial on how to build a web service using TDI, as well as how to call one. Hats off to Jason, Lak and Brian for this awesome community contribution!

Loops

Loops are a powerful component for your AssemblyLines, allowing you to take code out Hooks where it is hidden and hard to manage, and putting it right there in the AL component list. This package contains docs and an example Config on how to use Loops.

#Delta #delta

Detecting and Sync'ing Changes

This PDF discusses the various features in TDI for Delta Discovery and subsequent Delta Application -- or in other words, finding changes and then propagating them.

(Note: the earlier versions are still available at the bottom of this page)

Here is a screenshot of an AL that synchronizes a central directory out to multiple targets. This solution handles both changes to user entries, as well as password changes caught by the TDI password-catcher plugin. There is little or no Hook coding (apart from Default On Error for all Connectors). All logic is visible in the AssmblyLine component list. Which also means it's perfect for the interactive AL Stepper (Debugger).

One interesting technique is the use of Loops as "If_Connector_Lookup_Successful" branches. The Loop is based on a Connector doing a Lookup. If none are found, no looping. If one or more are found then the loop starts cycling. Since the Link Criteria in this example should always find a single entry, it works like a IF branch.

Error Handling

There is a Hints & Tips topic on this here: Improving error messages

And this write-up:

One approach is to have all AssemblyLines inherit their Connectors from the Library. Then set these Library Connectors up to use the same basic error handling: for example, a script function call -- e.g. "errorMsg()" -- in their Default On Error Hooks. Here is an example of an errorMsg() function that dumps out as much info as possible to the log.

Writing Custom TDI Components

The simplest and fastest route is to use JavaScript. For example, to make your own Parser, simply create a new Parser and choose the Script Parser. TDI provides you with a template of the Interface needed for this component: readEntry() and writeEntry(). If your Parser will only be used on Input, then you only have to customize the readEntry() function. Note that the Entry called entry where you add your Attributes will be the conn Entry returned for Input Mapping.

Similarly, to make your own Connector simply choose the Script Connector type. To support AddOnly mode, simply customize the putEntry() method. If Iterator mode is required then you customize selectEntries() and getNextEntry(). For Lookup mode you write the findEntry() function, which is also used by Delete and Update modes. In addition, Delete mode also needs deleteEntry(), while Update uses putEntry() and modEntry().

Another approach is to use Java to create a .jar file that adds your components to TDI's repertoire. More on this subject here.

And finally, you can take an entire AssemblyLine and turn it into a Connector as described in this DeveloperWorks tutorial.

TDI Server API

Here is guide that outlines how to connect to TDI servers (local and remote) using the 6.0 API, and control them: start/stop ALs, load/modify Configs and settings, register for events, and more. Note that the API can be called from Java as well as from JavaScript within a TDI solution.

-- EddieHartman - 17 April 2009

Complex XML using the XSLT Parser

The File System Connector in conjunction with XSL based XML Parser provides a flexible mechanism for generating XML files in any format through TDI. This paper attempts to explain the various related concepts and typical usage with a simple example.

-- SandeepKumar - 10 Oct 2006

How to Turn AssemblyLines into Components (Adapters)

Here is an excellent (and award-winning) DeveloperWorks article done by our illustrious and TDI-savvy colleague, Dinesh T. Jain.

Note that although the article title states version "6.1", it applies equally well to newer releases.

How to do lookups in flat files

You have two flat files (CSV, LDIF, XML...) and you need to work out which entries match and which are different or missing. You cannot do a lookup in a CSV file, so how do you solve the problem?

Read about Flat File Lookups here...


Pre-FP3 versions of How-To's:

Topic revision: r34 - 17 Nov 2016, EddieHartman - This page was cached on 04 Aug 2023 - 19:46.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TDI Users? Send feedback