/** * Determines into which store workitems should go. */ protected WorkItemStore determineStore (final InFlowItem item) { WorkItemStore defaultStore = null; final String participantName = item.getParticipantName(); final java.util.Iterator it = getContext().itemsOfClass(WorkItemStore.class).iterator(); while (it.hasNext()) { final WorkItemStore s = (WorkItemStore)it.next(); if (s.acceptsWorkItemsFor(participantName)) return s; if (s.isDefaultStore()) defaultStore = s; } return defaultStore; // default }