Finding boundary events of a task using Java API

look this