Hi all
I'm using ruote-kit and trying to model a workitem as a Java class for JSON
serialization/deserialization, but I'm stuck with the workitem definition and
can't get the point to a proper class definition.
Right now I have this:
class Fields {
private Map<String, String> params = new HashMap<String, String>();
private String dispatched_at;
}
class WorkItem {
private Fields fields = new Fields();
private Map<String, String> fei = new HashMap<String, String>();
private String _rev;
private String _id;
private String participant_name;
private String wfid;
private String type;
private String put_at;
private List<Map<String, String>> links = new ArrayList<Map<String,
String>>();;
WorkItem() {}
}
class WorkItems {
private List<Map<String, String>> links = new ArrayList<Map<String,
String>>();;
private List<WorkItem> workitems = new ArrayList<WorkItem>();
WorkItems() {}
}
But isn't the best approach because if there's more fields than
"dispatched_at" they get lost. I'm using google-gson as JSON library but can
use any library.
Anyone has modeled workitems in Java and can share his ideas?
Thanks
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en