This example shows how to create a form that lets you change the owner for a task. The example begins with the creation of the form and the Assign Task button that, when clicked, assigns a task to a user. Since this form handler works for process and project tasks, the code determines which is being used and passes the appropriate ID to the form handler. The task ID is also passed to the form handler. If the current task is complete, the task owner displays. For all other circumstances, the form contains a drop-down list with one option for each user eligible to own the task.

<dspel:importbean bean="/atg/epub/servlet/TaskActionFormHandler"/>

<dspel:form formid="assignForm" name="assignForm" method="post"
   <dspel:input type="submit" bean="TaskActionFormHandler.assignTask"
    value="Assign Task"/>
      <c:when test="${taskInfo.taskDescriptor.assignable eq false}"/>
         <dspel:input type="hidden" bean="TaskActionFormHandler.processId"
         <c:if test="${isProjectView eq true}">
            <dspel:input type="hidden" bean="TaskActionFormHandler.projectId"

         <dspel:input type="hidden" bean="TaskActionFormHandler.taskElementId"

         <pws:getAssignableUsers var="assignUsers"

         <c:set var="unowned" value="${taskInfo.owner eq null}"/>
            <c:when test="${taskStatus.completed}">
               <c:out value="${taskInfo.owner.firstName}
               <dspel:select bean="TaskActionFormHandler.assignee">

                  <c:forEach var="user" items="${assignUsers}">
                     <c:if test="${currentUserId ne user.primaryKey}">
                         <dspel:option value="${user.primaryKey}
                          selected="${user.primaryKey eq