Imixs Workflow ...the open source workflow technology for business applications

Web Tools

Create a Workitem

Before you can edit a Workitem in a JSF Form you need to create an new empty instance of a Workitem. Therefore you can call the ActionListener Method "doCreateWorkitem" form you WorkflowController. The method creates an empty worktiem which is assinged to a specific processID provided by the model inside your Workflow instance. You can bind the ActionMethod to a commandButton or commandLink from a menue:

The following code example shows a command button which creates a new wokitem assigned to the ProcessID "100" form the Model version "0.0.1".

 <h:commandButton
        value="create new...."
        actionListener="#{workflowMB.doCreateWorkitem}"
        action="show_workitem">
        <f:param name="id"
                value="0.0.1|100" />
        </h:commandButton>

If you don't deal with model versions you can also simply provide a valid ProcessID without a model version

 <h:commandButton
        value="create new...."
        actionListener="#{workflowMB.doCreateWorkitem}"
        action="show_workitem">
        <f:param name="id"
                value="100" />
        </h:commandButton>
Note:
The actionlistener method doCreateWorkitem will not save any data into your database. The method just creates an empty instance of a new workitem which can be processed by any JSF page e.g. a input form.