In this example code, the WorkItemExample code sends the work item version that was previously created in the example after updating the work item property list. The work item property list is defined by a collection of name/value pairs in the file workitem.properties.
WorkItemVersionExtendedVO version =
workItemFacade_.createWorkItem(
this.getSessionProfile(),startingActivity,
useWorkItemName,null);
...
// create a collection of work item properties
ArrayList workItemProperties = new ArrayList();
if ( properties_ != null )
{
Iterator propertyKeyIterator =
properties_.keySet().iterator();
while (propertyKeyIterator.hasNext())
{
String key = (String) propertyKeyIterator.next();
String value = (String) properties_.get(key);
WorkItemPropertyVO propVO = new WorkItemPropertyVO();
propVO.setPropertyKey(key);
propVO.setPropertyValue(value);
workItemProperties.add(propVO);
}
}
// send the work item
workItemFacade_.sendWorkItemVersion(
this.getSessionProfile(),
version.getPrimaryKey(),
null,
ESConstants.P_WIV_PROPERTY_UPDATE,
workItemProperties,
new ArrayList(),
new ArrayList(),
new ArrayList());