pass session attribute value to after hook?

Hi ,

In one of my tests I would like to run some cleanup code after the simulation (after hook) which should delete some database entries. However in order to delete the correct database record, I should be able to pass a session attribute id value as some kind of variable to the after hook block of code. Any idea how this can be achieved?

Thanks!

Save variables to text doc and then read?

`
val writer = {
val fos = new java.io.FileOutputStream(“foo.txt”)
new java.io.PrintWriter(fos,true)
}

.exec { session =>
writer.println(session(“ID”).as[String])
session
}
`