Using Work Item Attribute Fields
You can use the values of the 40 custom work item attribute fields as criteria in both sort and filter expressions.
These fields correspond to the customizable attributes workItemAttributes.attribute1 to workItemAttributes.attribute40 that you can set using the work item scripting methods described in the section "WorkItem" of the "Work Manager Scripting" appendix in the Business Data Services guide. See the "Using Scripts" chapter of the TIBCO Business Studio BPM Implementation guide for information on defining scripts in your processes at design time.
By default, these custom fields are locally logged, but are neither audited nor published by Event Collector. However, you can configure BPM to audit and/or to publish any of these attributes for any event. See "Configuring TIBCO ActiveMatrix BPM Auditing" in TIBCO ActiveMatrix BPM - BPM Administration for information on changing the default auditing and logging behavior.
You can use these attributes to hold data associated with the work item. For example, you could use them to track data about the customer with whom the work item is associated. Assume that a script in your business process sets the following values, mapping fields from the business process to work item attributes:
WorkManagerFactory.getWorkItem().workItemAttributes.attribute1=customer_number WorkManagerFactory.getWorkItem().workItemAttributes.attribute2=customer_name WorkManagerFactory.getWorkItem().workItemAttributes.attribute3=customer_contact
You could then use a setResourceOrderFilterCriteria operation to sort or filter by any of these values. For example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.brm.n2.tibco.com"> <soapenv:Header/> <soapenv:Body> <api:setResourceOrderFilterCriteria resourceID="8D10C-42DEBD01-C23D2B4"> <orderFilterCriteria> <order>attribute3 ASC</order> <filter>attribute1=0435</filter> </orderFilterCriteria> </api:setResourceOrderFilterCriteria> </soapenv:Body> </soapenv:Envelope> |
This example filters the specified resource’s work list to show only work items from the customer whose reference number is 0435. Those items that are displayed are then shown in order of the customer contact person specified on the work item.