技术文章 - CS348079
在自定义服务中使用不存在的 streamEntryId 调用 DeleteStreamEntry 时,后续查询失败,并在 ThingWorx 中出现错误“无法为 ThingworxPersistenceProvider 创建事务”
已修改: 13-Mar-2025
适用于
- ThingWorx Platform 8.5 to 9.5
说明
- 当使用不存在的streamEntryId调用DeleteStreamEntry时,后续查询失败并出现错误:
Error executing service <service_name>. Message :: Could not create a transaction for ThingworxPersistenceProvider - See Script Error Log for more details.
- 如果 streamEntryId 1 不存在,则从以下脚本调用 QueryStreamEntriesWithData 失败:
Things["StreamTest"].DeleteStreamEntry({
streamEntryId: "1" /* STRING */
);
//
// result: INFOTABLE dataShape: ""
var result = Things["StreamTest"].QueryStreamEntriesWithData({
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER */,
sourceTags: undefined /* TAGS */,
endDate: undefined /* DATETIME */,
query: undefined /* QUERY */,
source: undefined /* STRING */,
startDate: undefined /* DATETIME */,
tags: undefined /* TAGS */
);
这是文章 348079 的 PDF 版本,可能已过期。最新版本 CS348079