2 Replies Latest reply on Jan 25, 2008 12:24 PM by jneubert

    How to set EndTask transition dynamically

    jneubert Newbie

      In my JSF tasklist, I use a dynamic list of possible transitions:

       <rich:dataTable value="#{task.availableTransitions}" var="transition" >
       <h:column>
       <s:button action="#{taskList.executeTask(transition.name)}" taskInstance="#{task}"
       value="#{transition.name}" propagation="none" />
       </h:column>
       </rich:dataTable>
      

      The Task should be executed by a generic action method:
       @Name("taskList")
       public class TaskList {
      
       @StartTask @EndTask
       public void executeTask(String transitionName) {
       transition.setName(transitionName);
       }
       }
      

      The transition dataTable is correctly displayed, but when I press the button for one of the transitions, transitionName in executeTask is an empty String. From the docs I understand that the transition.name is resolved after pressing the button. But settings propagation="join" results in a complaint about a running conversation.

      Can somebody help me to find a way which works?

      Thank you