public void monitor(final String experimentId) throws Exception {
AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
new PasswordCallbackImpl());
final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
new EventDataListenerAdapter() {
public void notify(EventDataRepository eventDataRepo, EventData eventData) {
Assert.assertNotNull(eventDataRepo);
Assert.assertNotNull(eventData);
if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {