Correction to the procedure for changing the HTML used for Emails and Work Items, adapted from TIBCO Collaborative Information Manager.

Correction to the procedure for changing the HTML used for Emails and Work Items, adapted from TIBCO Collaborative Information Manager.

book

Article ID: KB0089482

calendar_today

Updated On:

Products Versions
TIBCO Collaborative Information Manager -
Not Applicable -

Description

Resolution:
Description:
============
Correction to the procedure for changing the HTML used for Emails and Work Items, adapted from TIBCO Collaborative Information Manager. 

Environment:
==========
CIM 8.0.1


Procedure
=========
This procedure is written for Windows. Conversion to Linux should be straightforward.

1). Set the following environment variables:

     Name: CUST_DEVROOT  value: <user-defined preferred location> (e.g. C:\MyForms)
     Name: ANT_HOME      value: %MQ_HOME%\bin\buildTool
     Name: PATH          Value: %PATH%;%MQ_HOME%\bin\buildTool\bin


2). Open a command window (Run -> cmd) and change to the directory:

     %MQ_HOME%\build\custom.


3). Execute the customutil script found there as follows:

     customutil.bin -createDirStructure

This command creates a directory structure in the directory specified by the CUST_DEVROOT variable. You might notice some errors but as long as the directory structure is created, you can ignore the errors.

4). Create the directories (if not already there):

     mkdir %CUST_DEVROOT%\src\com\tibco\mdm\ui\workflow\engine\workitem\templates
     mkdir %CUST_DEVROOT%\src\com\tibco\mdm\ui\directory\contact
     mkdir %CUST_DEVROOT%\src\com\tibco\mdm\ui\infrastructure\css
     mkdir %CUST_DEVROOT%\src\com\tibco\mdm\ui\infrastructure\images
     mkdir %CUST_DEVROOT%\src\com\tibco\mdm\ui\infrastructure\javascripts


5). Create the directory %MQ_HOME%\thirdparty (if not already there) and copy the following jar files (if not already there) into the directory:

      com.ibm.mq.jar
      com.ibm.mq.jmqi.jar
      com.ibm.mq.mqjms.jar
      gnu-regexp.jar
      jsse.jar
      tibjms.jar
      xmlc-all-runtime.jar
      xmlc-base.jar
      xmlc-chtml.jar
      xmlc.jar
      xmlc-taskdef.jar
      xmlc-xerces.jar


6). Copy the custom HTML to the following directories:

Workitem:    %CUST_DEVROOT%\src\com\tibco\mdm\ui\workflow\engine\workitem\templates

Email Form:  %CUST_DEVROOT%\src\com\tibco\mdm\ui\directory\contact

7). Add any required image files to the images folder, cascading stylesheet files to the css folder and Javascript files to the javascripts folder. Remembering to change the links in the HTML files to the correct files in the css images and javascripts folders.



8). Edit the file:

     $MQ_HOME\build\resources\html_interfaces.txt

Add the following line for each HTML form created class - e.g. <MyEmailCustomization>) that implements IWorkItemDisplayDoc:

Workitem:  com.tibco.mdm.ui.workflow.engine.workitem.templates.<MyWorkItemCustomization>=com.tibco.mdm.ui.infrastructure.IMqContent,
                  com.tibco.mdm.ui.workflow.engine.workitem.workitem.IWorkItemDisplayDoc

Email Form:  com.tibco.mdm.ui.directory.contact.<MyEmailCustomization>=com.tibco.mdm.ui.infrastructure.IMqContent


9. Open a command window (Run -> cmd) and change to the directory:

      %MQ_HOME%\build\custom


10.Edit the file build.xml (under %MQ_HOME%\build\custom)

      Search for:  <target name="compileHtml" depends="init">
      Within this element, there is another element, <xmlctask ...>
      Within <xmlctask... > search for:  includes="com/tibco/mdm/ui/workflow/engine/**/*.html"
                            change to:   includes="com/tibco/mdm/ui/**/*.html"

   Save build.xml and exit
ant -v deplyCustom

11).Execute the following command:

      ant -v compileHtml

to compile the HTML forms into XMLC classes: these class files are created in the following directories:

Workitem:    %CUST_DEVROOT%\classes\servletclasses\WEB-INF\classes\com\tibco\mdm\ui\workflow\engine\workitem\templates

Email Form:  %CUST_DEVROOT%\classes\servletclasses\WEB-INF\classes\com\tibco\mdm\directory\contact

followed by

      ant -v deployCustom

to create the custom forms.


12).Copy the class files from the following locations:

Workitem:    %CUST_DEVROOT%\classes\servletclasses\WEB-INF\classes\com\tibco\mdm\ui\workflow\engine\workitem\templates

Email Form:  %CUST_DEVROOT%\classes\servletclasses\WEB-INF\classes\com\tibco\mdm\directory\contact

to the following locations in the ECM.ear file:

Workitem:    ECM.ear\ECMClasses.jar\com\tibco\mdm\ui\workflow\engine\workitem\templates

Email Form:  ECM.ear\ECMClasses.jar\com\tibco\mdm\directory\contact

and redeploy the ECM.ear file (to do this, the quickest way is to copy ECM.ear to ECM.zip, unzip the file to a suitable directory such as C:\temp, change the files in the relevant directories, and then zip the file back up to ECM.zip - and then rename ECM.zip to ECM.ear (a .ear file is just a .zip file with some extra files at predefined locations, as are .jar and .war files).

13). Only for more advanced users.  If you want to create a custom TaskType to work on the HTML:

    a). Create a com.tibco.mdm.ui.directory.contact.<MyEmailCustomization> class (i.e. file %CUST_DEVROOT%\src\com\tibco\mdm\ui\directory\contact\<MyEmailCustomization>.java) that implements ICustomizer. Compile and deploy the class as described in the previous steps.

    b). In the createWorkItem activity of the workflow, modify the TaskType parameter with the new value as follows:

       <Parameter direction="in" name="TaskType" eval="constant" type="string"> <NewTaskName> </Parameter>

    c). Associate the TaskType and the class by adding the following property in the ConfigValues.xml file:

       com.tibco.workflow.workitem.<NewTaskName>.class=com.tibco.mdm.ui.directory.contact.<MyEmailCustomization>


14). Add an entry in WORKFLOWFORM table in application database. The attributes of this table and the value they take are:

    — ID:                   Primary Key, provide a unique number
    — VERSION:              Default value. For example, 1.
    — OWNERORGANIZATIONID:  Default value is 1 for all organizations. Otherwise, provide specific organization ID.
    — NAME:                 Custom form name.
    — DEFINITION:           XMLC generated class name.
    — ACTIVE:               Set to 'Y'.
    — MODMEMBERID:          Default value is 101.
    — MODDATE:              Provide current date.
    — MODVERSION:           Default value is 1.
    — TYPE:                 'EMAIL' or 'TASK', depending on your form type. Use TASK for workitem and EMAIL for Email.
    — ACTIONABLE:           If form has some action, set to 'Y', otherwise 'N' for notifications.

    For example (Oracle database), for a custom e-mail form 'MyFirstForm':

    INSERT INTO WORKFLOWFORM
      (ID, VERSION, OWNERORGANIZATIONID, NAME, DEFINITION,
       ACTIVE, MODMEMBERID, MODDATE, MODVERSION, TYPE, ACTIONABLE)
    VALUES
      (MQ_SEQUENCE_1.nextval, 1, 1, 'MyFirstForm','com.tibco.mdm.ui.directory.contact.MyEmailCustomization',
       'Y', 101, CURRENT_TIMESTAMP, 1, 'EMAIL', 'N');


15).Restart the CIM server.

Issue/Introduction

Correction to the procedure for changing the HTML used for Emails and Work Items, adapted from TIBCO Collaborative Information Manager.