4 Replies Latest reply on Mar 21, 2007 3:19 PM by Michael Darr

    Problem Ending a Task

    Michael Darr Newbie

      Ok so i have followed along with the dvd-seam example.

      However I am apparently doing something wrong here.

      I start the task ... i can see it in the debug.seam page.

      But when i go to end it. Nothing happens.

      Task as defined in the xml ->

      <task-node name="working" end-tasks="true">
       <task name="taskWorking" description="Tasks being worked on">
       <assignment pooled-actors="ticket-worker"/>
       <transition name="next" to="finished"/>

      The code on the task list where you start the task ->
       <s:button action="#{ticketWorking.viewTask}" taskInstance="#{task}"
       value="Set Task to Working"/>

      The Class ->
      public class TicketWorkingAction implements TicketWorking {
       Log log;
       EntityManager em;
       @Out(required=false, scope=ScopeType.CONVERSATION)
       Ticket ticket;
       Long ticketId;
       @In(required = false)
       String name;
       @In(required = false)
       String description;
       User authUser;
       //@BeginTask -- i tried either or
       public String viewTask() {
       log.info("ticket working - view task - #{ticketId}");
       ticket = (Ticket) em.find(Ticket.class, ticketId);
       log.info("ticket found - #{ticket}");
       return "/ticket_work.xhtml";
       public String save() {
       log.info("ticket working - save");
       return "/ticket_list.xhtml";
       public String finished() {
       log.info("ticket working - finished");
       return "/ticket_list.xhtml";
       private void saveChange() {
       // TODO change the owner?
       TicketChange tChange = new TicketChange();
       public void destroy() {

      The JSF page ->
       Description - <h:inputText value="#{description}"/><br/>
       <h:commandButton value="Save" action="#{ticketWorking.save}"/><br/>
       <h:commandButton value="Save and Send to Approval" action="#{ticketWorking.finished}"/><br/>
       <s:link value="View Tickets" action="/ticket_list.xhtml"/><br/>

      .... i am hoping its just something stupid. But any ideas could help

      Btw i have the two methods because I was trying both ways.

      FWIW Ticket is an Entity Bean.