public static void main(final String[] args, final Properties azotProperties)
	{
		if(args.length == 0) {
			System.err.println("Please provide the workflow file path as the first argument.");
			System.exit(1);
		}
		
		// Initialize the plugins manager
		PluginsManager.init(UNMARSHALLER);
		
		// Initialize the launcher
		final Launcher mainlauncher = new Launcher();
		final List<Variable> initVariables = mainlauncher.init(azotProperties, args);

		final String workflowFileArgument = args[0];
		if (workflowFileArgument != null) {
			mainlauncher.launch(new File(workflowFileArgument), initVariables);
		}

		while (mainlauncher.getWorkflowGroup().activeCount() > 0) {
			try {
				Thread.sleep(1000);
			} catch (final InterruptedException e) {
				throw new AzotException(e);
			}
		}

		while (mainlauncher.getJMXGroup().activeCount() > 0) {
			try {
				mainlauncher.getJMXGroup().interrupt();
				Thread.sleep(100);
			} catch (final InterruptedException e) {
				throw new AzotException(e);
			}
		}
		
		if (AzotConfig.GLOBAL.ANALYZE) {
			AnalyzeLauncher.main(new String[] {AzotConfig.GLOBAL.OUTPUT_DIRECTORY.getAbsolutePath()});
		}
	}