简体   繁体   English

如何使用 ICM_ReceiveDocumentIDs 事件?

[英]How to use the ICM_ReceiveDocumentIDs Event?

I'm trying to display a list of documents with the ContentList widget inside the IBM Case Manager Builder.我正在尝试使用 IBM Case Manager Builder 中的 ContentList 小部件显示文档列表。

To achieve that I'm wiring a Scriptadapter to the ContentList widget, with the ReceiveDocuments event.为此,我使用 ReceiveDocuments 事件将 Scriptadapter 连接到 ContentList 小部件。 This should give me the possibility to send the data as a JSON object to the ContentList.这应该让我可以将数据作为 JSON 对象发送到 ContentList。

Unfortunatly the documentation is very unclear about what exaclty is expected inside of this JSON object.不幸的是,文档对于这个 JSON 对象内部的期望值非常不清楚。

It states : 它指出 IBM 官方文档的图像

What exactly is meant with究竟是什么意思

values: array of dojo objs[...]值:dojo 对象数组 [...]

I haven't been able to find anything on 'Dojo Objects', 'dojo objs', 'ibm dojo objects' etc. even after extensive searching.即使经过大量搜索,我也无法在“Dojo Objects”、“dojo objs”、“ibm dojo objects”等上找到任何内容。

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.如果我完全忽略这些values并将其保留为空数组,那么可行的是。 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!任何例子都会很棒!

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.在这种情况下,IBM 官方文档有一个错字。

values: array of dojo objs, each has obj.versionSeries field contains vsID values:dojo objs 数组,每个都有 obj.versionSeries 字段包含 vsID

should be应该

values: array of dojo objs, each has obj. values:dojo objs 数组,每个都有 obj。 V ersionSeries field contains vsID VersionSeries 字段包含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:问题中有效负载的重要区别:

  • the 'v' in 'VersionsSeries' must be capital case 'VersionsSeries' 中的 'v' 必须大写
  • there are no quotation marks around 'VersionSeries' 'VersionSeries' 周围没有引号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM