3 Replies Latest reply on Jan 23, 2010 6:01 AM by saraswati.santanu

    Obtaining all available transitions for a <wait state> node?

    bestage

      Hello everyone,

       

      what is actually the best way of getting all available transitions for a <wait state> node?

       

      jBPM4 API supports only getting outcomes for a task.

       

      But since you can model the wait state with multiple transitions, the API should support it too.

       

      I have found this here, but the proposed solution doesn't seem to work properly?

      http://community.jboss.org/message/400963#400963

        • 1. Re: Obtaining all available transitions for a <wait state> node?
          kukeltje

          Can you confirm it does not work (properly)?

           

          And what is the exact usecase? Just the fact that there is something for tasks does not automatically mean there should be something for other nodes as well. Maybe modelling your process differently (on a technical level, not functional one) solves it to...

           

          E.g. returning a value from an external system and having conditions on the transitions or just one transition and a decision can help instead of having an external system have knowledge of which transitions there are and signalling with an explicit transition..

          • 2. Re: Obtaining all available transitions for a <wait state> node?
            kukeltje
            • 3. Re: Obtaining all available transitions for a <wait state> node?
              saraswati.santanu

              This code should give you the out going transitions.I am not sure what have you tried which did not work, but this one works for me. Till you have 4.4 released you can use this.

               

                    //processInstance is the relevant Process instance and stateName is the name of the wait state

                    ExecutionImpl activeExecution = (ExecutionImpl)processInstance.findActiveExecutionIn(stateName);
                    List<Transition> outgoingTransitionList = activeExecution.getActivity().getOutgoingTransitions();