In reply to manasa-n:
This means you do not get an item when calling get_next_item.
I had a closer look to your code. Your sequence item has data members of data type real. They are not randomizable.
To exercise please replace the real by int and it should work.