It's a new instance and I do not set the listeners to null explicitly.
I just use your example and added the following code inside the "if
(doInit)":
while ( true )
{
Session session = HibTestSetup.openSession();
Transaction t = session.beginTransaction();
HibEngine engine = new HibEngine( session );
if (doInit)
{
engine.addNodeType("dump", DumpNode.class);
HibGraph graph = engine.getFactory().newGraph("TestGraph", 1,
"100");
Node firstNode = engine.getFactory().newNode(graph,
"FirstNode", "dump", JoinType.FIRST, null, true, null, null);
Node secondNode = engine.getFactory().newNode(graph,
"SecondNode", "dump", JoinType.FIRST, null, false, null, null);
HibArc arc = engine.getFactory().newArc(graph, firstNode,
secondNode, "TestArc");
engine.addExecutionListener(LoggingExecutionListener.class,
ExecutionEventType.values());
doInit = false;
}
HibGraph choosenGraph = getGraph( engine );
HibGraphProcess process =
(HibGraphProcess)engine.startProcess( choosenGraph );
session.flush();
t.commit();
session.close();
runWorkflow( process.getId() );
> >
sarasvati-wf-us...@googlegroups.com<sarasvati-wf-users%2Bunsubs
cr...@googlegroups.com>
> > .
> For more options, visit this group athttp://
groups.google.com/group/sarasvati-wf-users?hl=en.