store(EntityType.valueOf(type.toUpperCase()), xml);
}
entity = args[2];
Entity obj = EntityUtil.getEntity(type, entity);
Process newEntity = (Process)obj.clone();
newEntity.setFrequency(Frequency.fromString("minutes(5)"));
System.out.println("##############OLD ENTITY " + EntityUtil.md5(obj));
System.out.println("##############NEW ENTITY " + EntityUtil.md5(newEntity));
// OozieWorkflowEngine engine = new OozieWorkflowEngine();
// Date start = formatter.parse("2010-01-02 01:05 UTC");
// Date end = formatter.parse("2010-01-02 01:21 UTC");
// InstancesResult status = engine.suspendInstances(obj, start, end, new Properties());
// System.out.println(Arrays.toString(status.getInstances()));
// AbstractInstanceManager manager = new InstanceManager();
// InstancesResult result = manager.suspendInstance(new NullServletRequest(), type, entity,
// "2010-01-02T01:05Z", "2010-01-02T01:21Z", "*");
DeploymentProperties.get().setProperty("deploy.mode", "standalone");
StartupProperties.get().setProperty("current.colo", "ua1");
OozieWorkflowEngine engine = new OozieWorkflowEngine();
ConfigurationStore.get().initiateUpdate(newEntity);
engine.update(obj, newEntity, newEntity.getClusters().getClusters().get(0).getName());
engine.delete(newEntity);
System.exit(0);
}