Tutorial: Partner Workbench Basics

Overview

This lesson teaches you how to start and use the Partner Workbench software. The Workbench is the file manager and development environment for the Partner Platform. It is a powerful tool, and is not designed for normal end users.

This tutorial is part of the Partner Platform: Fundamentals.

Be sure you read Disclaimer and Caution before proceeding.

audience

  • system administrators and IT staff
  • power users
  • developers

objectives

  • learn how to start the workbench
  • use the filesystem tree to view the installation structure
  • use the context-sensitive file and directory editors
  • use the log view and console

prerequisites

You need a current installation of the development version of Partner. Tutorial: Installation and Update covers that nicely.

Workbench

The Workbench is the development environment for the Partner Platform. It has a number of powerful facilities, but we’ll start by learning how to use the file browser, editor, and console, and leave it to Partner Platform: Map Framework to teach you the rest.

WARNING

The Workbench is extremely powerful and allows you to edit, delete, or modify any file or directory in the Partner installation filesystem. Read Disclaimer and Caution. Yes, we said that above and in the course description. It bears repeating.

Starting the Workbench

The Workbench is intentionally left out of the Partner section of the Windows Start menu, and there will be no icon on your desktop. To prove you at least have some idea what you’re doing, you have to dig in the filesystem to find it or create your own shortcut. Run os/windows/programs/Workbench.bat under Windows to start it.

The Workbench Window

The Workbench has several major parts.

Filesystem Tree

At the left is the filesystem tree. This works just like similar trees in tools like Windows Explorer or the Mac Finder. Click the arrow or plus sign to the left of a directory to expand that directory’s contents, and select either a file or a directory to view it in the editor window on the right.

TODO: screenshot

Editor Panel

At the top of the right side is the editor panel. This may have one or more context-sensitive tabs. Each tab represents a different way of viewing or modifying the selected node. For example, a text file will have the generic “File” tab (with delete, copy, and binary viewing controls) as well as the “Text” tab (with a text editor).

TODO: screenshot

Log Display

At the bottom of the right side is the log panel. This is the current system log, and you will see new statements as you do things in the Workbench.

TODO: screenshot

Command Line

Underneath the log display is a text box. You can type in commands into this box and hit return to execute them; it is thus similar to command-line consoles. Currently you can use Unix-style directory and file commands and also run applications based on their name.

TODO: screenshot

Slider Bars

There are some slider bars to change the divisions between the various parts. If you don’t see a part, it might be hidden because a slider bar is too far one way or has that part minimized. Fiddle with the controls.

Exploring the Filesystem

Use the filesystem tree control to move around the installation. Click on individual files and directories to see which editor tabs appear - for example, look at the following:

  • update/info/UpdateSource.txt
  • system/jars/Partner.jar
  • modules/
  • modules/customer/PartnerSplashes/resources/splashes/*

As you can see, the editor panel has some knowledge of both the kind of file or directory you have selected, and its role in the system based on its path.

All files will have the generic “File” tab, and all directories will have the generic “Directory” tab. Familiarize yourself with the controls on each.

Try typing in paths in the navigation bar at the top, and play with the forward, back, and up buttons.

Modifying the Filesystem

Using the directory editor, add a new directory to data/ named Example. Then, add a file named Example.txt in data/Example/ (data/Example/Example.txt). Put a bit of text in it, go somewhere else and come back.

Then select data/Example/ and import a file from somewhere - for example, an image.

Finally, to remind yourself just how dangerous the Workbench can be, select data/Example and remove it. Poof.

Undo!

Fortunately for the fumble-fingered, there is an undo/redo mechanism for file operations. Under the Edit menu, select Undo, and data/Example should reappear.

TODO: screenshot

A script!

Writing and running scripts is extremely easy in the Workbench. Do this:

  • create a file named test/Hello World.groovy
  • using the Text tab, put this in it:

test/Hello World.groovy

log.info("Hello, world!");

Click the Run button on the Text tab, and view the results in the log.

Using the console

Try the following commands at the console underneath the log view. Hit return after each.

cd /
cd data
ls
cd Example
ls *.txt
rm *.txt

Typing “help” will get you a list of available commands.

Hotkeys

You can define hotkeys tied to scripts in the Workbench. Currently, these are defined:

  • control-g sets the keyboard focus to the command line
  • control-n sets the keyboard to the path field on the navigation bar
  • control-f sets the keyboard focus to the find field if a text editor is visible and begins incremental search

Moving On

Now it’s time for Modules.