1

我创建了我的 hst spring-delegated-bean 并且它被正确地注入和调用。

我尝试提交表单,将表单数据获取到 dto 并创建并保存我的 Todoitem。

我的“Todoitem”bean 扩展了 HippoDocument 并实现了 ContentNodeBinder。

我在绑定方法中将 DTO 转换为节点:

...
node.getProperty("myhippotodolist:title").setValue(dto.getTitle());
node.getProperty("myhippotodolist:content").setValue(dto.getContent());
...

我将此代码写入 doAction 方法:

persistableSession = getPersistableSession(request);
wpm = getWorkflowPersistenceManager(persistableSession);
...
...
final String absPathNode = wpm.createAndReturn(todoitemFolderPath, "myhippotodolist:todoitem", todoItemNodeName, true);
Todoitem todoitemBean = (Todoitem) wpm.getObject(absPathNode);
...
...
todoitemBean.bind(toDoItemDTO, todoitemBean.getNode());
wpm.update(todoitemBean);

好吧,现在我可以通过 Hippo 控制台看到新节点,但标题和内容没有得到验证。我还收到了这个消息日志:

[INFO] [talledLocalContainer] 03.11.2014 14:58:13 WARN  http-bio-8080-exec-1 [WorkflowPersistenceManagerImpl.update:432] Could not obtain workflow 'default' for '/content/documents/myhippotodolist/todoitems/todoitem-1415023023096/todoitem-1415023023096'. Make sure that user 'sitewriter' has enough workflow rights on the node.

我还为域工作流和 hippodocuments 中的站点编写者配置了读写权限。

我不明白...请问我的错误是什么?

谢谢

4

1 回答 1

1

您能否尝试将用户生成的内容域导入您的域,就像 gogreen 对评论所做的那样:

http://svn.onehippo.org/repos/hippo/hippo-demos/hippo-go-green/tags/hippogogreen-3.09.04/content/src/main/resources/security/domain-user-generated-content。 xml

站点编写者似乎没有访问正确工作流程操作的权限。使用该域,您应该能够执行您所描述的工作流操作。

祝你好运,

于 2014-11-05T15:17:24.310 回答