final ObjectMember nakedObjectMember = performContext.getObjectMember();
final CellBinding onMemberBinding = performContext.getPeer().getOnMemberBinding();
final OneToManyAssociation otma = (OneToManyAssociation) nakedObjectMember;
final CollectionAddToFacet addToFacet = nakedObjectMember.getFacet(CollectionAddToFacet.class);
if (addToFacet == null) {
throw ScenarioBoundValueException.current(onMemberBinding, "(cannot add to collection)");
}
// safe since guaranteed by superclass
final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();
final String toAddAlias = arg0Cell.getText();
final ObjectAdapter toAddAdapter = performContext.getPeer().getAliasRegistry().getAliased(toAddAlias);
if (toAddAdapter == null) {
throw ScenarioBoundValueException.current(arg0Binding, "(unknown alias)");
}
// validate argument
otma.createValidateAddInteractionContext(getSession(), InteractionInvocationMethod.BY_USER, onAdapter, toAddAdapter);
final Consent validToAdd = otma.isValidToAdd(onAdapter, toAddAdapter);
if (validToAdd.isVetoed()) {
throw ScenarioBoundValueException.current(arg0Binding, validToAdd.getReason());
}
// add
addToFacet.add(onAdapter, toAddAdapter);
}