// Get the model ID. Subsequent and contiguous commands that update a group in this model are candidates for this batch
Object batchModelID = metadata.getModelID(getUpdatedGroup(updateCommand).getMetadataID());
String modelName = metadata.getFullName(batchModelID);
SourceCapabilities caps = capFinder.findCapabilities(modelName);
// Only attempt batching if the source supports batching
if (caps.supportsCapability(Capability.BATCHED_UPDATES)) {
// Start a new batch
List<Command> batch = new ArrayList<Command>();
List<VariableContext> contexts = new ArrayList<VariableContext>();
List<Boolean> shouldEvaluate = new ArrayList<Boolean>();
// This is the first command in a potential batch, so add it to the batch