This example code shows the method within the WorkItemExample creates a single comment value object and associates it to the work item version created in the example program.
WorkItemVersionExtendedVO version =
workItemFacade_.createWorkItem(
this.getSessionProfile(),startingActivity,
useWorkItemName,null);
// assign a comment to this work item version
ArrayList comments = new ArrayList();
CommentVO commentObject = new CommentVO();
// read the comment template from the work item
// example’s.properties file
String commentText = getMessage("workitem.comment.text",vargs); commentObject.setCommentText(commentText); comments.add(commentObject);
// execute the work item facade to create work item comments
workItemFacade_.addWorkItemVersionCommentList(
this.getSessionProfile(), version.getPrimaryKey(),
comments );