internalActions = new ArrayList();
final StateMachineFacade stateMachine = getOwner().getStateMachineContext();
if (stateMachine instanceof ActivityGraphFacade)
{
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)
{
final JBpmAction action = (JBpmAction)event;
if (this.equals(action.getOperation()))
{
internalActions.add(event);
}
}
}
}
final Collection transitions = graph.getTransitions();
for (final Iterator transitionIterator = transitions.iterator(); transitionIterator.hasNext();)
{
final TransitionFacade transition = (TransitionFacade)transitionIterator.next();
final EventFacade event = transition.getTrigger();
if (event != null)