260 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
e. Click Add again.
f. Select ICMNOTELOG for the Part Type field.
g. Click OK and click OK again. The CM Item Type SalesQuote should appear in the list
of Item Types (right-hand pane).
7. Add the XFDL MIME Type to Content Manager.
a. Click on the MIME Types entry in the right-hand pane Tree. Sort the list Z-A. You
should see XFDL near the top.
b. Double-click on XFDL and you will see the properties required:
i. Name = XFDL
i. Display name = XFDL
i. MIME type = application/vnd/xfdl
i. Suffixes = .xfd
c. Click Cancel.
8. Add XFDL MIME type processing for the Client for Windows.
a. Start the IBM Content Manager Client for Windows by selecting Start → Programs
→ IBM DB2 Content Manager Enterprise Edition → Client for Windows.
a. Login with the respective UID and password.
b. Select Options - Preferences… - Helper Applications. Scroll to the bottom of the list
to find XFDL. This information comes from the Library Server and doesn't need to be
changed. The Client for Windows relies on Windows to launch the correct application
(in this case the Workplace Forms Viewer).
9. Add XFDL MIME type processing for the eClient.
a. View the file IDMAdminDefaults.properties located at C:\IBM\db2cmv8\CMeClient.
b. Search for xfd and you will see that a line was added for the XFDL MIME type. That is,
application/vnd.xfdl=launch was added to the MIME Type action list of MIME types.
8.3.2 Add the CM integration in the form
To be able to store our form in DB2 Content Manager, we have to add some CM specific items
to the form. Open the form in Workplace Forms Designer and perform the following steps to
define a data instance model for Content Manager:
1. Create a hidden Field. This field will contain the CM PID for when the Form is stored in
a. Click the Field Icon and position the field on the traditional form page below the hidden
b. Shorten it by dragging the right edge to the left so that it does not extend beyond the
right side of the box.
c. Edit the Properties and change the name to PID.
d. Click the Appearance Tab. Check both of the “invisible” conditions.
e. Click OK.
Chapter 8. Integration with IBM DB2 Content Manager 261
2. Create the Submit button.
a. Click the Button Icon. Position the button in the toolbar of the traditional form page,
towards the left edge of the box.
b. Edit the Properties and click Add Formula for the Text field.
c. Select determined by a decision (If/Then/Else) in the “is” field
d. In the If field, select value of…. Click the button and then click on the PID field.
Select == (equal to) for the conditional. Leave the value blank! Enter Store a new
Quote to CM for the Then value. Enter Update an existing Quote in CM for the “Else”
value as shown in Figure 8-11.
Figure 8-11 Label formula for the CM Submit button
e. Click OK.
f. Select Submit Then Cancel for the Perform This Action field.
g. Then click Details…
h. Click the Formula button.
i. Select determined by a decision (If/Then/Else) in the is field
j. In the If field, select value of… Click the button and then click on the PID field.
Select == (equal to) for the conditional. Leave the value blank!
For the Then value, enter:
For the Else value, enter:
262 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
The formula dialog is shown in Figure 8-12.
Figure 8-12 Formula dialog for the CM Submit button URL
3. Modify the scope of the Signature. Since the PID field and submit button will be modified
after the form has been signed, these fields must be omitted from the scope of the
a. Since we are using a keep filter in items for our Signature, there are no further actions
required. The field and the button should not be on the keep list.
4. Create the Data Instance and then bind it to fields in the form.
a. Select Tools → XML Data Model → Create/Edit Manually
b. Enter CMMetaData in the ID field, and select custom in the prefix field. Now click the
Add >> button. This immediately pops up a window where the XML will be edited for
the Instance Data Model.
c. Enter the data shown in Example 8-2. We selected eight attributes to be stored with the
form in DB2 Content Manager.
d. Click OK and click OK again to save the changes.