{
final ActivityGraphFacade graph = (ActivityGraphFacade)stateMachine;
final Collection states = graph.getStates();
for (final Iterator stateIterator = states.iterator(); stateIterator.hasNext();)
{
final StateFacade state = (StateFacade)stateIterator.next();
final Collection events = state.getDeferrableEvents();
for (final Iterator eventIterator = events.iterator(); eventIterator.hasNext();)
{
final EventFacade event = (EventFacade)eventIterator.next();
if (event instanceof JBpmAction)
{