3 Replies Latest reply on Aug 10, 2009 2:14 AM by Ronald van Kuijk

    Signaling Transition from a Java State

    Toacy Oliveira Newbie

      Hi all,

      I need to signal a transition from a Java state and I don't know how to gain access to the current process instance.

      In fact I have a highly specialized Java Class (the CommandHandler class) that handles all states in the process. Each type of state executes a different method in the CommandHandler class, which has a set of specific parameters.
      It's like:
      - jpdl

      <java class="CommandHandler"
       g="281,211,80,40" method="doSomething" name="0">
       <arg>
       <string value="0" />
       </arg>
       <arg>
       <string value="13" />
       </arg>
       <arg>
       <string value="" />
       </arg>
       <transition g="-46,-18" name="to 1" to="1" />
       <transition g="-46,-18" name="to 13" to="13" />
       </java>


      -java
       void doSomething(String curLabel, String gotoLabel, String expr) {
       ......
       }


      When executing doSomething, I need to signal a transition either to 1 or 13 but I don't know how to do it since I don't have any link with the runtime within a Java state.

      Any help will be appreciated.

      cheers
      tco