@@ -304,22 +304,20 @@ private static void saveFailure(Hashtable<String, Object>hashTable,Simulation si
304
304
305
305
public void getBatchSimulationsResults (OutputContext outputContext , Simulation simulation ) throws java .beans .PropertyVetoException {
306
306
307
-
308
-
309
307
// simulation should be a template simulation
310
308
if (simulation .getName ().contains (SimulationContext .ReservedBatchExtensionString )) {
311
309
throw new RuntimeException ("Not a valid name for a batch template Simulation: '" + simulation .getName () + "'." );
312
310
}
313
311
314
312
SimulationOwner simOwner = getSimWorkspace ().getSimulationOwner ();
315
- if (!(simOwner instanceof SimulationContext )) {
316
- throw new RuntimeException ("Template Simulation Owner must be a SimulationContext" );
317
- }
318
- SimulationContext simContext = (SimulationContext )simOwner ;
319
- BioModel bioModel = simContext .getBioModel ();
320
- if (bioModel ==null ) {
321
- throw new RuntimeException ("Cannot add simulation, bioModel not set" );
322
- }
313
+ // if(!(simOwner instanceof SimulationContext)) {
314
+ // throw new RuntimeException("Template Simulation Owner must be a SimulationContext");
315
+ // }
316
+ // SimulationContext simContext = (SimulationContext)simOwner;
317
+ // BioModel bioModel = simContext.getBioModel();
318
+ // if(bioModel==null) {
319
+ // throw new RuntimeException("Cannot add simulation, bioModel not set");
320
+ // }
323
321
324
322
File batchResultsDir = ResourceUtil .getLocalBatchDir ();
325
323
// File localSimDir = ResourceUtil.getLocalSimDir(User.tempUser.getName());
@@ -329,7 +327,7 @@ public void getBatchSimulationsResults(OutputContext outputContext, Simulation s
329
327
public void run (Hashtable <String , Object > hashTable ) throws Exception {
330
328
331
329
// recover the list of batch simulations that belong to this template
332
- Simulation allSims [] = bioModel .getSimulations ();
330
+ Simulation allSims [] = simOwner .getSimulations ();
333
331
LinkedHashMap <String , String > importsMap = new LinkedHashMap <>();
334
332
LinkedHashMap <String , Boolean > successMap = new LinkedHashMap <>();
335
333
String namePrefix = simulation .getName () + SimulationContext .ReservedBatchExtensionString ;
0 commit comments