5 Replies Latest reply on May 1, 2008 2:09 PM by kukeltje

    How to display JBPM state information in JSF

    dilsent

      I am a newbie to jbpm and have been reading through the jBPM docs. My application uses seam and I am trying to create a processdefinition file like this

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition xmlns="" name="salesPageFlow">


      <start-state name="Sales Flow">

      </start-state>









      <end-state name="Order Flow"></end-state>

      </process-definition>


      I have created a stateless session bean in my application which actually implements the JBPM specific code .I wanted to capture the process execution i.e each state transition and display it on a Jsf page by clicking an <s:button action..
      I try to use the token.signal.. Any suggestions will be greatly appreciated.

      Thanks in advance



        • 1. Re: How to display JBPM state information in JSF
          kukeltje

          Sorry, but I have no clue what you mean. And please use [ c o d e ] rags when posting xml

          • 2. Re: How to display JBPM state information in JSF
            dilsent


            I am sorry about that. Here is the xml code.

            <?xml version="1.0" encoding="UTF-8"?>
            
            <process-definition xmlns="" name="salesPageFlow">
            
            
             <start-state name="Sales Flow">
             <transition to="New Consumer"></transition>
             </start-state>
            
            
             <state name="Basic Information">
             <transition to="Opening Offer"></transition>
             </state>
            
             <state name="Opening Offer">
             <transition to="Qualification"></transition>
             </state>
            
             <state name="Qualification">
             <transition to="Order Flow"></transition>
            
             </state>
            
            
             <end-state name="Order Flow"></end-state>
            
            
            </process-definition>
            
            
            I wanted to capture the transition states and display on a jSF page by clicking a command button. I am not sure how to persist the state info,so that the next when i click the button from the JSF page the token should display the next transition state.
            
            Thanks in advance


            • 3. Re: How to display JBPM state information in JSF
              kukeltje

               

              I wanted to capture the transition states and display on a jSF page by clicking a command button.
              This can be done by using the api to get the transitions of the current task/state/... and make a button for each transition

              Not sure what you mean by 'persisting state info'... states/task/... are persisted when e.g. the processinstance is saved and the context closed

              • 4. Re: How to display JBPM state information in JSF
                dilsent

                Thanks. But I was hoping if there is way to display each state 'transition name' by just using a single button.When i meant persisting the state,each time i click the button on my jsf page,the token.signal() function should propagate to the next transition and I should be able to display the node name on my jsf.

                This way I am able to visually display the state transitions happening during process execution.

                • 5. Re: How to display JBPM state information in JSF
                  kukeltje

                  you have to develop your own jsf tag for that. It has not been done (yet). Persiting the state should be done in the action behind the button. Displaying the next transition is a new jsf page, so more of the same.