Version 3

    All workflow variables (with a java.lang.String key) are passed to the beanshell environment. The script must set the variable with the name transition to the name of the transition that should be taken. Example:

          <decision name="only decision" >
               <delegation class="de.fs24.services.wfms.actionhandler.BeanShellDecisionHandler">
               <![CDATA[
                String transition;
                long time = System.currentTimeMillis();
                if (time % 2 == 0)
                {
                     transition = "left";
                }
                else
                {
                   transition = "right";                 
              }
           \]\]\>
           </delegation>
           <transition name="left"   to="inside the left street" ></transition>
           <transition name="right"  to="inside the right street" ></transition>
          </decision>