String className = jsonObj.get("className").getAsString();
String name = jsonObj.get("name").getAsString();
String description = jsonObj.get("description").getAsString();
FailurePolicy policy = FailurePolicy.valueOf(jsonObj.get("failurePolicy").getAsString());
Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class);
ResourceSpecification resources = context.deserialize(jsonObj.get("resources"),
new TypeToken<ResourceSpecification>() { }.getType());
int maxInstances = jsonObj.get("maxInstances").getAsInt();
return new DefaultFlowletSpecification(className, name, description, policy, properties, resources, maxInstances);
}