class MultipleInstanceActivityPropertyWriter extends ActivityPropertyWriter {

    public void setCollectionOutput(String collectionOutput) {
        if (isEmpty(collectionOutput)) {
            return;
        }

        setUpLoopCharacteristics();
        String suffix = "OUT_COLLECTION";
        String id = Ids.dataOutput(activity.getId(), suffix);
        DataOutput dataOutputElement = createDataOutput(id, suffix);
        addSafe(ioSpec.getDataOutputs(), dataOutputElement);

        Optional<Property> property = findPropertyById(collectionOutput);
        Optional<DataObject> dataObject = findDataObjectById(collectionOutput);

        if (property.isPresent()) {
            processDataOutput(dataOutputElement, property.get());
        } else if (dataObject.isPresent()) {
            processDataOutput(dataOutputElement, dataObject.get());
        }
    }

    public  MultipleInstanceActivityPropertyWriter(Activity activity,
                                                  VariableScope variableScope,
                                                  Set<DataObject> dataObjects);

}