Reputation: 53
I'm trying to display a list of documents with the ContentList widget inside the IBM Case Manager Builder.
To achieve that I'm wiring a Scriptadapter to the ContentList widget, with the ReceiveDocuments event. This should give me the possibility to send the data as a JSON object to the ContentList.
Unfortunatly the documentation is very unclear about what exaclty is expected inside of this JSON object.
What exactly is meant with
values: array of dojo objs[...]
I haven't been able to find anything on 'Dojo Objects', 'dojo objs', 'ibm dojo objects' etc. even after extensive searching.
I've assumed they must mean a simple object but this doesn't work:
payload = {
"objectStoreNames" : ["MyObjectStore"],
"symbolicNames": ["DocumentTitle","CmAcmAssociatedCase", "DateLastModified", "LastModifier"],
"values": [{"versionSeries":"604B5175-0210-C88C-B5CE-C7CA75FD8A9A"}],
"externalColumns": [],
"version": "current"
};
return payload;
What does work is if I ignore the values
completely and leave it as an empty array. Although then it just gives me a list of every document inside of the object store.
What exactly am I supposed to put inside of this array? Any examples would be grand!
Upvotes: 1
Views: 130
Reputation: 53
After bashing my head into the wall for way to many times, I've found the solution! In this case the official IBM documentation has a typo.
values: array of dojo objs, each has obj.versionSeries field contains vsID
should be
values: array of dojo objs, each has obj.VersionSeries field contains vsID
which makes the correct payload something like this:
payload = {
"objectStoreNames" : ["MyObjectStore"],
"symbolicNames": ["DocumentTitle","CmAcmAssociatedCase", "DateLastModified", "LastModifier"],
"values": [{VersionSeries:"604B5175-0210-C88C-B5CE-C7CA75FD8A9A"}],
"externalColumns": []
};
return payload;
Important differences to the payload in the question:
Upvotes: 1