Also moved the logic for transferring all "success" FlowFiles outside the block that performs the "batch success" transfer. In practice, the change should never matter - i.e. we always expect to find a FlowFile for the first WriteEvent in a batch. But in theory, that may not happen, and we wouldn't want that to prevent every other WriteEvent in the batch from being processed.
Also moved the logic for transferring all "success" FlowFiles outside the block that performs the "batch success" transfer. In practice, the change should never matter - i.e. we always expect to find a FlowFile for the first WriteEvent in a batch. But in theory, that may not happen, and we wouldn't want that to prevent every other WriteEvent in the batch from being processed.