Documentation Center

Configuring and testing Publish Adapter as a SDL Contenta client tool

You can create testPublish as a Client Tool.

About this task

The advantages of writing a client tool to invoke the server/support tool are:
  • The Client Tool can perform processing before and/or after it runs the server tool.
  • The exit status of the Server/Support Tool can be displayed to the user by the client tool.
  • Additional command line arguments can be passed to the support tool by the client tool which can be very useful.

Procedure

  1. Make sure the client tool script is located on the client in: SDL Contenta_home\encaps\adapters\testing\testPubPcAi.pl
  2. Make sure that the server tool, testPubServerAi.pl is located on the SDL Contenta Server in SDL Contenta_home/encaps
  3. In the pcmadmin application, add the Client Tool to the CompoundAscii and CompoundAscii-based objects.
    • Menu Label: testPublish
    • Tool Type: Client Tool
    • Command Line: interp perl adapters\testing\testPubPcAi.pl

Testing the Tool

To test your tool after configuring, exit pcmadmin and test the tool from SDL Contenta Explorer.

Procedure

  1. In SDL Contenta Explorerr, select a CompoundAscii or CompoundAscii based object on which the tool is configured. Start with a single object or small hierarchy of objects.
  2. Click on the Tools menu.
  3. Click testPublish
    If the tool is not listed, the object you selected was not configured for the tool.

    This launches testPubPcAi.pl on the client. The script invokes the server tool, testPubServerAi.

  4. Look in the publish directory:
    • Windows: SDL Contenta_home/TEMP/publish/user
    • Unix: /tmp/publish/user

      where SDL Contenta_home is the directory where Contenta is installed and user is the name of the user who executed the program.

    If you can not locate your document, turn ON debug to level 2 in testPubServerAi.pl (refer to Turning On Debug in the Publish/View Adapter File) then repeat this step.