<?xml version="1.0" encoding="UTF-8"?> 
<process xmlns="http://drools.org/drools-5.0/process"
         xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
         xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
         type="RuleFlow" name="timer-flow" id="timer-flow" package-name="drools.timer" >

  <header>
    <imports>
      <import name="org.kie.spring.timer.MyDroolsBean" />
    </imports>
  </header>

  <nodes>
    <start id="1" name="Start" x="16" y="16" width="48" height="48" />
    <end id="3" name="End" x="377" y="20" width="80" height="40" />
    <workItem id="4" name="TestWorkItem" x="96" y="20" width="137" height="40" >
      <work name="testWorkItemHandler" >
      </work>
      <onEntry>
        <action type="expression" dialect="mvel" >System.out.println("**** Entering Test Work Item ****");</action>
      </onEntry>
      <onExit>
        <action type="expression" dialect="mvel" >System.out.println("**** Exiting Test Work Item ****");</action>
      </onExit>
      <timers>
        <timer id="1" delay="1000" period="2000" >
        <action type="expression" dialect="java" >System.out.println("**** Timer Triggered ****");
MyDroolsBean.incrementTimerTriggerCount(); MyDroolsBean.waitForOtherThread(); </action>
        </timer>
      </timers>
    </workItem>
  </nodes>

  <connections>
    <connection from="1" to="4" />
    <connection from="4" to="3" />
  </connections>

</process>
