Sample workflow
This chapter includes a sample workflow that demonstrates the generic functionality of KCM ComposerUI and shows how it can be configured and customized. Some information in this chapter may vary, depending on your implementation of KCM ComposerUI. In these cases, information for ASP.NET is provided with its equivalent for J2EE in brackets. Most information applies to both the ASP.NET and the J2EE implementations.
Before working with KCM ComposerUI, you should configure Letterbooks and Document Templates using KCM Designer. In the following example, assume that a Letterbook Examples has been created.
After installation and configuration of a Letterbook in the KCM Designer, you can configure a default Letterbook entry point in the configuration page of your application using: http://[ machine ]:[ port ]/itp/app/[ application ]/configure.aspx. For more information, see Application configuration.
You can also pass the Letterbook entry point as a parameter like this:
http://[machine]:[port]/itp/app/sample/modelselect.aspx?letterbook=[letterbook]
where:
-
[machine] is the name of the web server
-
[port] is the port through which it is accessible
-
[Letterbook] is the letterbook entry point you want to use

This page shows one of the two main functionalities of KCM ComposerUI, namely the possibility to retrieve and present a structured list of Document Templates that has been defined as a Letterbook in KCM Designer. The list shows all the models with the name Examples, which are available in the Letterbook for the user.
Depending on the [Letterbook] the Administrators can manage the content of the Letterbook as follows.
The value of the Letterbook parameter can be provided as a rep:/ URI. It looks similar to this example:
rep:[//host[:port]]/type/project/[path/]object[?key=value[&key=value]*]
host: TCP/IP Hostname of the system hosting the KCM Content Publication Database / KCM Repository server.
port: TCP/IP Port the server listens to (defaults to 2586)
type: Type object to retrieve. Supported objects:
-
Letterbook
project: Project. Use asterisk symbol to refer to the default project.
path: (Optional) Folders, separated by slash.
object: The object to be retrieved.
key/ value: Additional key/value pairs for parameters. Supported keys are:
- user=Repository User
- status=[published|accepted|current|development]
When no rep:/ URI is provided in the [letterbook], the templates (named Logical Models in the KCM Base Administration GUI) added to the Letterbook are managed using the KCM Base Letterbook GUI.
The page consists of four frames. The two outer frames serve as margins. The left inner frame shows a (possibly nested) list of folders. From this list, a page with the Master Templates for the currently selected folder is loaded in the right frame.
In the right frame, Master Templates are presented as links. Click the link "Complaint letter" to open the following URL in a new browser window:
http://[machine]:[port]/itp/sample/modelbegin.aspx
This URL is extended with a query string, which contains information about the model to be run.

When the page appears, the user can select an output format and Preview preference. Whenever KCM sends out additional questions, it can include them with the document in its current stage of production. The preview document may be presented to the user. Leave the default settings as they are. Click OK to start the Master Template run on the server.

The next page shows the first form of the Master Template run. The Complaint letter Master Template requires selection of the customer to whom the letter should be sent. KCM Core will send out an XForms XML message translated by KCM ComposerUI to an HTML page. In the right frame, a preview of the document is shown, which contains only a logo. Click "1002 Benitas-Fuentes G." to proceed.

The second form contains a drop-down list with the medium options. A user should select the option through which the complaint was received. No additional content is produced and the preview remains the same. Select Email and click OK.

In the last form the user is prompted to provide a date, a brief description of the complaint, and an action to take a response to the complaint. Now the document has a header containing some of the information provided earlier: the name of the customer and the fact that the complaint was received by email. The information provided in the previous form is reflected in the preview. Provide answers to the questions and click OK.

The Master Template run is now completed. The resulting PDF document appears in the right frame. Click the blue arrow to resize the frame. Now browse to
http://[machine]:[port]/itp/app/sample2/modelselect.aspx?letterbook=[Letterbook]
where:
- [machine] is the name of the web server
- [port] the port through which it is accessible
- [Letterbook] indicated the Letterbook entry point you want to use
This leads to similar, but slightly different features:
- The appearance of the pages is different.
- The page asking for the document format and preview activation is not available.
- No previews are shown and the result document is presented in Microsoft Word format.