Web Tools
When you have created an instance of a workitem the values can be edited by a JSF Form and later processed by the WorkflowController. To bind the workitem values to input fields the WorkflowController provides a dynamic hash-map. To process (save) the input data the controller provides the actionListener 'doProcess'.

The WorkflowController provides you with the dynamic property 'item' which allows you to bind an input value to an arbitrary property name. See the following example were an inputText value is bound to the item property 'txtSubject'.
<h:inputText required="true"
value="#{workflowMB.workitem.item['txtSubject']}" id="subject_id">
</h:inputText>The workflow controller will automatically manage the property "txtSubject" and store the input values into the database.
The ActionListener method "doProcessWorkitem" can be used to process a workitem by the WorkflowController. The method is similar to the method doCreateWorkitem and can be bound to an commandButton.

The following example shows a command button which will process the workitem and store all values to the database.
<h:commandButton action="show_workitem"
actionListener="#{workflowMB.doProcessWorkitem}"
value="submit">
<f:param name="id" value="10" />
</h:commandButton>The method doProcessWorkitem expects the param 'id' with a valid Activity ID defined by the corresponding workflow model. So if you create a new Workitem instance with the ID=100 this means that the Process Entity need to provide a Activity with the ID=10 which can be processed by the WorkflowController.
If you don't want to generate all command Buttons hard coded in your form you can access the property "activities" which provides a set of command buttons corresponding to the available activities the workitem is assigned to:
<ui:repeat value="#{workflowMB.activities}" var="activity">
<h:commandButton action="#{workflowMB.getWorkflowResult}"
actionListener="#{workflowMB.doProcessWorkitem}"
value="#{activity.item['txtname']}">
<f:param name="id" value="#{activity.item['numactivityid']}" />
</h:commandButton>
</ui:repeat>