When editing an individual work item, the form can set work item variables, such as comments, to pass additional information about the approval or rejection into the workflow process for auditing.
You can also set arbitrary work item variables when performing actions in the WorkItemList view. The value of the attribute variables can be set to an object whose attributes will be copied into the work item when it is approved or rejected. For example, if the variables object contains an attribute named comments, the same comments will be saved with every selected work item.
<Form name=’variables.comments’> <Default> <concat> <s>Approval performed on </s> <invoke class=’com.waveset.util.Util’ name=’dateToString’> <new class=’java.util.Date’/> </invoke> </concat> </Default> </Form>
Although in practice the work item form requires additional fields for buttons such as Approve and Reject, you may not want everything displayed by Default User Form displayed in the work item form. Typically, you can factor out the fields in the user form into a form library that can be referenced by both the user forms and the work item forms.