2 Replies Latest reply on Aug 26, 2009 4:19 AM by Tej jbpm

    Transition navigation

    Tej jbpm Novice

      Hi all,

      I have two nodes called approve and reject in my task node.

      I want to be able to code the conditional transition in my JSF..

      If approve is clicked go to - myportal.jsf

      IF reject is clicked go to the next transition and show the corresponding form - basically a URL with the task id..

      here is my code

      <j4j:loadTask id="#{id}" target="#{task}"/>
       <j4j:completeTask task="#{task}" transition="#{transition.name}"/>
       <n:nav outcome="success" url="myportal.jsf" storeMessages="true"/>
       <n:nav outcome="error" redirect="true" storeMessages="true"/>



      My confusion is how to calculate the outcome as reject - where to set it? or I want to give a condition in my nav url checking the transition name and then redirect to the corresponding page. Currently both are redirected to myportal.jsf..please help..

        • 1. Re: Transition navigation
          Ronald van Kuijk Master

          This is not supported, sorry... You have to extend the jsf taglib or switch to e.g. using more plain jsf things (or the jbpm/jsf/seam combo)

          • 2. Re: Transition navigation
            Tej jbpm Novice

            I achieved this..

            I set the url variable in taskBean conditionally. For that i need to know the transition name..so this is what i did
            Set a action commandlink based on what is clicked..this action method in taskBean sets the transition name..I pass the transition name using setPropertyActionListener method..

            <h:commandLink id="transition#{rid}" style="display:none; visibility: hidden;" action="#{taskBean.action}">
            
             <f:setPropertyActionListener target="#{taskBean.transitionName}" value="#{transition.name}" />
            </h:commandLink>


            URL is the variable in my taskBean class..and I retrieve it using:

            <n:nav outcome="success" url= "#{taskBean.url}" storeMessages="true"/>