private JsonObject execute () {
		
		ProcessBuilder processBuilder;
		if ( execution.getStdin() != null )
			processBuilder = new ProcessBuilder("/home/pod/app/"+execution.getActivityName()+"/main.sh", execution.getStdin());
		else
			processBuilder = new ProcessBuilder("/home/pod/app/"+execution.getActivityName()+"/main.sh");

		processBuilder.directory(new File ("/home/pod/app/"+execution.getActivityName()));

		InputStream is = null;
		InputStreamReader isr = null;
		BufferedReader br = null;
		String line = null;
		
		// Moved to the manager
		// This info would be useful if we charge for usage to the client
		//execution.setStartTime(new Date().getTime());
		
		// try catch for IO errors in the process
		try {
			process = processBuilder.start();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		// Get the output of the process
		is = process.getInputStream();
		isr = new InputStreamReader(is);
		br = new BufferedReader(isr);
		
		// try catch for IO output in the process
		try {
			while ((line = br.readLine()) != null) {
				// Every line of standard output
				//log.i(line);
				stdout += line + "\n";
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		// Get the error output of the process
		is = process.getErrorStream();
		isr = new InputStreamReader(is);
		br = new BufferedReader(isr);
		
		// try catch for IO errors in the process
		try {
			while ((line = br.readLine()) != null) {
				// Every line of standard error
				//log.i(line);
				stderr += line + "\n";
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		// Moved to the manager
		// This info would be useful if we charge for usage to the client
		//execution.setFinishTime(new Date().getTime());
		
		// Prepare message to send to manager
		JsonObject message = new JsonObject();
		
		execution.setStdout(stdout);
		if ( !stderr.equals("") )
			execution.setStderr(stderr);
		
		if ( terminated ) {
			execution.setStatus("terminated");
			terminated = false;
		}
		else
			execution.setStatus("finished");
		
		message.add("execution", execution.toJsonObject());
		
		return message;
	}