public boolean enableImageAccessStep(URI rpSystemId,Map<URI,Integer> snapshots,String token) throws ControllerException {
  try {
    WorkflowStepCompleter.stepExecuting(token);
    URI device=null;
    for (    URI snapshotID : snapshots.keySet()) {
      BlockSnapshot snapshot=_dbClient.queryObject(BlockSnapshot.class,snapshotID);
      if (device == null) {
        device=snapshot.getStorageController();
      }
    }
    enableImageForSnapshots(rpSystemId,device,new ArrayList<URI>(snapshots.keySet()),token);
    WorkflowStepCompleter.stepSucceded(token);
  }
 catch (  Exception e) {
    stepFailed(token,e,"enableImageAccessStep");
    return false;
  }
  return true;
}

public boolean enableImageAccessStep ( URI rpSystemId , Map < URI , Integer > snapshots , String token ) throws ControllerException { try { WorkflowStepCompleter . stepExecuting ( token ) ; URI device = null ; for ( URI snapshotID : snapshots . keySet ( ) ) { BlockSnapshot snapshot = _dbClient . queryObject ( BlockSnapshot . class , snapshotID ) ; if ( device == null ) { device = snapshot . getStorageController ( ) ; } } enableImageForSnapshots ( rpSystemId , device , new ArrayList < URI > ( snapshots . keySet ( ) ) , token ) ; WorkflowStepCompleter . stepSucceded ( token ) ; } catch ( Exception e ) { stepFailed ( token , e , "enableImageAccessStep" ) ; return false ; } return true ; }
workflow step method for enabling an image access
