Tool

Tools are programs which can perform treatments on the data of a workspace. One treatment is called an "action".
They can be external programs (.exe) or user-specific libraries (.dll) compatible with models.
Tools are developed by workspaces suppliers. MADCAT has no tools by default. They are based on the API of MADCAT and the .NET framework of Microsoft.
They can access data to create/edit/delete items in your project. But you can also use them to perform treatments on files by using the powerful set of libraries of the .NET framework.
A tool can offer several actions. Actions are attached to items by the model (see ACTION). End-user runs them through the menu or the toolbar of MADCAT's interface.

Tools and their actions are defined in a XML file with extension XTL.

Tools should be placed in a specific folder of the workspace with their definition files

Task management
MADCAT provides a powerful task manager and log manager to execute tools' actions in different threads and trace any events or changes performed to the data. Actions can be scheduled, paused, resumed, canceled, re-run, and so on... in a very easy way.

All database updates are traced and can be checked after action's execution. Transactions can also be canceled when action fails to preserve the database.

Progress display
MADCAT provides to the end-user a very detailed progress window providing global progress, estimated end time, step progress and controls for action execution.




Logbooks
It also provides a logbook system which allow the end-user to capture all events and messages produced by the tools or only specific ones using filters. Logbooks can be exported, transformed in HTML because they are also XML files.




User preferences
Finally, MADCAT provides a user profile management which allow tools to define sets of options users can change freely. Options are automatically saved when user leaves MADCAT and loaded when he enters a workspace.
Each workspace has its set of options. Options are user-dependent (saved in the Windows's user-specific folders)




Definition File

Practically a tool is a DLL (Dynamic Link Library) with a definition file having a XTL extension. This definition file controls the way MADCAT displays and executes the actions supported by the tool : it gives the following information :

  • Name of the tool
  • Icon of the tool
  • Description of the tool
  • Path to the DLL or EXE file
  • List of actions supported by the tool. For each action, you can provide the name, the icon, the description and the execution settings (see below)



Execution of actions can be controlled by several parameters :

  • Background mode : Action is executed in a specific thread. End-user can continue working in MADCAT while action is running
  • Read-only mode : Action can't modify project's data
  • Cancelable : End-user can cancel an in-progress action
  • Suspendable : End-user can pause/resume an in-progress action
  • Endless action : Action has no end. It must be canceled by the user
  • Show progress window : Progress window is automatically displayed when action starts
  • Re-entrant : If set to Yes, same action can be run multiple times in parallel. Otherwise, MADCAT will automatically schedule the action at the earliest moment depending on the end of the currently running threads
  • Multiselect : If set to yes, action can be executed on more than one item at a time. Otherwise, MADCAT will schedule the action once for each item



These settings are defined once for all by the designer of the tool. Changing these settings without changing the tool itself may produce unpredicable results.

You can download the definition file of the tool used by the workspace editor :
WorkspaceEditorTool.xtl

Execution control

All actions are controlled by the process manager of MADCAT. The process manager provides a list of the actions performed or in-progress. Using the process manager, you can :

  • See the progress of working actions
  • See the execution log of terminated actions
  • Control the execution of working actions
  • Restart a terminated action with its initial context of execution


Controls

Depending on actions' parameters defined by the XTL file, the end-user can pause, resume or cancel a running action from the process manager window or from the progress window of the action.


Progress monitoring

Each action has its own progress window which can be displayed or hidden at any time.
MADCAT also indicates the number of running processes and the overall progress in the title bar and status bar of the main window.


Progress windows also provides an access to the log window of the running action. You can see in real-time all the messages produced by the action.

Note that the colors of the lines of the logbook are controlled by the tool using the API of MADCAT

Execution log

MADCAT records several information about each action :

  • Start time, end time and duration
  • The context of execution of the action (XML elements of the project data, input parameters)
  • Data transactions performed by the action
  • Messages produced by the action



All this data can be analysed in the execution log window :



This window can be displayed from the progress window of any action listed in the process manager.

Please note that execution log can't be saved into a file. The log is lost when MADCAT is shutdown. Only messages can be saved into a XML file. See Execution control.