process.addNode( timerNode );
new ConnectionImpl( start,
Node.CONNECTION_DEFAULT_TYPE,
timerNode,
Node.CONNECTION_DEFAULT_TYPE );
ActionNode actionNode = new ActionNode();
actionNode.setId( 3 );
actionNode.setName( "Action" );
DroolsConsequenceAction action = new DroolsConsequenceAction();
action.setDialect( "java" );
action.setConsequence( "try { Thread.sleep(1000); } catch (Throwable t) {} System.out.println(\"Executed action\");" );
actionNode.setAction( action );
process.addNode( actionNode );
new ConnectionImpl( timerNode,
Node.CONNECTION_DEFAULT_TYPE,
actionNode,
Node.CONNECTION_DEFAULT_TYPE );