How to customize the description of workitems in order to show user-defined attributes of records?

How to customize the description of workitems in order to show user-defined attributes of records?

book

Article ID: KB0090600

calendar_today

Updated On:

Products Versions
TIBCO Collaborative Information Manager -
Not Applicable -

Description

Resolution:
Description:
============
Out-of-the-box, the description of workitems involving records show only the record id with a hyperlink to the record and the repository name with a hyperlink to the repository definition. But the workitem description shown can be customized to show the value of a user-defined attribute of the record or a variable dynamically passed through the workflow.

Environment:
===========
TIBCO Collaborative Information Manager (CIM) 8.X.X.


Resolution:
==========
The attribute or variable value which needs to be shown in the workitem description needs to be passed in as an "in" variable in the CreateWorkItem activity.

For instance,

&ltParameter direction="in" eval="constant" type="string" name="CUSTOM_ATTR1"&gtATTR1_VALUE</Parameter>

Usage of the prefix "CUSTOM_&ltATTRIBUTE/VARIABLE NAME>" for the "in" parameter name is mandatory. The "in" parameter above should go into the CreateWorkItem activity which creates the workitem.

Record attribute values can be passed evaluating the attribute value using xpath.

Now the $MQ_COMMON_DIR/standard/rbworkitemdescription.xml rulebase, i.e. the rulebase generating workitem description needs to be modified. The appropriate constraint to be modified needs to be identified based on the type of workflow involved, i.e. the doctype, docsubtype, intent, rejections etc. These details can be found in the workflow/event InDocument.

Once the constraint is identified, the WORKITEM_DESCRIPTION out variable can be assigned with a concat involving the custom attribute passed from the CreateWorkItem activity. In the example mentioned here, the variable passed from the CreateWorkItem can be referenced using WORKITEM/CUSTOM_ATTR1, i.e. WORKITEM/&ltCustom attribute passed in the CreateWorkItem activity>

        &ltaction>
            &ltassign>
                &ltvar&gtWORKITEM_DESCRIPTION</var>
                &ltop func = "concat">
                    &ltconst type="string"&gtRecord $PrimaryRecord$ </const>
                &ltvar&gtWORKITEM/CUSTOM_ATTR1</var>
                </op>
            </assign>
        </action>


References:
==========
CIM customization guide.

Issue/Introduction

How to customize the description of workitems in order to show user-defined attributes of records?