.end()
.newPath( "path1" )
.newStep( 1000 )
.newKieSession( releaseId, "org.test.KBase1.KSession1")
.setGlobal( "list", list ).set( "list" )
.insert( new Person( "yoda", 150 ) ).set( "y" )
.fireAllRules()
// show testing inside of ksession execution
.test( "y.name == 'yoda'" )
.test( "y.age == 160" )
.test( "list[list.size()-1] - list[0] == 1000" )
.end()
.newStep( 2000 )
.getKieSession()
.insert( new Person( "darth", 110 ) ).set( "d" )
.fireAllRules()
// show testing inside of ksession execution
.test( "d.name == 'darth'" )
.test( "d.age == 120" )
.test( "y.name == 'yoda'" )
.test( "y.age == 160" )
.test( "list[list.size()-1] - list[0] == 2000" )
.end()
.newPath( "path2" )
.newStep( 1500 )
.newKieSession( releaseId, "org.test.KBase1.KSession1")
.setGlobal( "list", list ).set( "list" )
.insert( new Person( "bobba", 75 ) ).set( "b" )
.fireAllRules()
// show testing inside of ksession execution
.test( "y == null" )
.test( "b.name == 'bobba'" )
.test( "b.age == 85" )
.test( "list[list.size()-1] - list[0] == 1500" )
.end()
.getPath( "path1" )
.newStep( 1300 )
.newKieSession( releaseId, "org.test.KBase1.KSession1")
.setGlobal( "list", list )
.insert( new Person( "luke", 35 ) ).set( "b" )
.fireAllRules()
// show testing inside of ksession execution
.test( "y.name == 'yoda'" )
.test( "y.age == 160" )
.test( "b.name == 'luke'" )