public static List < EventSubscriptionEntity > collectCompensateEventSubscriptionsForActivity ( ActivityExecution execution , String activityRef ) { final List < EventSubscriptionEntity > eventSubscriptions = collectCompensateEventSubscriptionsForScope ( execution ) ; final String subscriptionActivityId = getSubscriptionActivityId ( execution , activityRef ) ; List < EventSubscriptionEntity > eventSubscriptionsForActivity = new ArrayList < EventSubscriptionEntity > ( ) ; for ( EventSubscriptionEntity subscription : eventSubscriptions ) { if ( subscriptionActivityId . equals ( subscription . getActivityId ( ) ) ) { eventSubscriptionsForActivity . add ( subscription ) ; } } return eventSubscriptionsForActivity ; }
Collect all compensate event subscriptions for activity on the scope of given execution .