Common Tasks: Working with Document Transforms
Overview
Document Transforms can process and format your Model data so that it may be reused for any task in your managed environment.
While Document Transforms can be used for any purpose, the two most popular uses are:
- Generating context-specific configuration files (e.g. httpd.conf, web.xml, sudoers, java properties, crontabs, or any custom format)
- Generating documentation files (Kept docs up-to-date by injecting the latest Workbench managed data)
Document Transforms have two parts. One part is a Transform definition. Transform definitions define which slice of your Workbench data should be processed by the Transform, what template should be used, and where the output should be stored. The second part of a Transform is the Transform Template. Transform Templates provide the instructions for how the specified data should be processed and in what format it should be outputted. Templates are user defined and can either be plain text files that use a basic substitution scheme (replace hardcoded with Ant style property references) or, for more complex needs, XSLT templates can be used. XSLT Templates give you the flexibility and power of industry standard XSL and provide for such programmatic techniques as conditionals and loops.
Transformed Documents can either be saved as a static documents to Workbench's WebDAV store or a refreshed document can be requested as needed using a WebDAV or http client. Documents can also be rendered by the Commander Client. This is useful in deployment and configuration management scenarios where the Module needs to update local configurations.
Adding a New Document
All documents are associated with a specific Target Object. The Target Object is used to help define what view (or "slice") of the Workbench data you want to use to render the Document. To create that view you must define which direction and how many degrees away from the Target (by resource associations) Workbench will look for data you want to provide to the Document Transform.
Figure: Add Document button

Figure: Step 1 of creating new Transform. This step creates the View definition

Figure: Step 2 of creating new Transform. This step defines the Document and Template parameters

Writing Document Templates
[Coming Soon]
Deploying Documents
[Coming Soon]


