0 Replies Latest reply on May 29, 2012 3:48 PM by hansi007

    How to get Event Properties with an EventListener

    hansi007 Newbie

      I have an EventListener:

       

      public class MyEventListener implements ProcessEventListener{
       ...
                @Override
                public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
                     System.out.println(event.getNodeInstance().getNodeName());
                     System.out.println(event.getNodeInstance().getNode().getMetaData().toString()); // Doesn't work...
                }
       ...
       }
      

       

      In the method beforeNodeTriggered I want to get the Event properties of a current event like a timer.

       

      timer.png

       

      Is that possible to get these properties?

       

       

      Thanks for your help!

       

      UPDATE:

       

      I found a solution for my Problem:

       

       

      public class MyEventListener implements ProcessEventListener{
       ...
               @Override
                public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
                   if(event.getNodeInstance().getNodeName().equals("Timer")){
                      TimerNode timerNode = (TimerNode)event.getNodeInstance().getNode();
                      System.out.println("DELAY"+timerNode.getTimer().getDelay());
                   }
                }
       ...
       }