try {
wpm.setWorkflowCallbackHandler(new BaseWorkflowCallbackHandler<DocumentWorkflow>() { public void processWorkflow(DocumentWorkflow wf) throws Exception { wf.requestPublication(); } }); final HstRequestContext requestContext = RequestContextProvider.get(); final String siteCanonicalBasePath = requestContext.getResolvedMount().getMount().getCanonicalContentPath(); final String dotoItemFolderPath = String.format("%s/%s", siteCanonicalBasePath, JcrContentsScope.HippoCmsAppTodoList.JCR_TODOITEMS_FOLDER); final String todoNodeName = SlugString.makeSlug(itemDTO.getTitle()); final String absPathNode = wpm.createAndReturn(dotoItemFolderPath, JcrContentsScope.HippoCmsAppTodoList.JCR_TODO_ITEM_TYPE, todoNodeName, true);//I have an exception here final Node todoItemNode = jcrSession.getNode(absPathNode); todoItemNode.setProperty("hippocmsapptodolist:title", SimpleHtmlExtractor.getText(itemDTO.getTitle())); todoItemNode.setProperty("hippocmsapptodolist:content", SimpleHtmlExtractor.getText(itemDTO.getContent())); wpm.update(todoItemNode); return true;} catch (ObjectBeanPersistenceException | RepositoryException e) { e.printStackTrace();}[INFO] [talledLocalContainer] org.hippoecm.hst.content.beans.ObjectBeanPersistenceException: javax.jcr.AccessDeniedException: /content/documents/hippocmsapptodolist/todoitems/todo-item-title-5/todo-item-title-5/hippostd:state: not allowed to add or modify item[INFO] [talledLocalContainer] at org.hippoecm.hst.content.beans.manager.workflow.WorkflowPersistenceManagerImpl.createNodeByWorkflow(WorkflowPersistenceManagerImpl.java:298)[INFO] [talledLocalContainer] at org.hippoecm.hst.content.beans.manager.workflow.WorkflowPersistenceManagerImpl.createAndReturn(WorkflowPersistenceManagerImpl.java:180)
...
...<sv:node sv:name="todo-item-title-5"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippo:handle</sv:value> </sv:property> <sv:property sv:multiple="true" sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> <sv:value>fdad2f56-9969-471d-aacb-241879fdc995</sv:value> </sv:property>
<sv:node sv:name="todo-item-title-5"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippocmsapptodolist:todoitem</sv:value> </sv:property> <sv:property sv:multiple="true" sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> <sv:value>963d3e9f-7b51-46b4-aa9c-378730169dce</sv:value> </sv:property> <sv:property sv:multiple="true" sv:name="hippo:availability" sv:type="String"/> <sv:property sv:name="hippo:related___pathreference" sv:type="String"> <sv:value>hippocmsapptodolist/todoitems/todo-item-title-5</sv:value> </sv:property> <sv:property sv:name="hippocmsapptodolist:content" sv:type="String"> <sv:value/> </sv:property> <sv:property sv:name="hippocmsapptodolist:title" sv:type="String"> <sv:value/> </sv:property> <sv:property sv:name="hippostd:holder" sv:type="String"> <sv:value>sitewriter</sv:value> </sv:property> <sv:property sv:name="hippostd:state" sv:type="String"> <sv:value>draft</sv:value> </sv:property> <sv:property sv:name="hippostd:stateSummary" sv:type="String"> <sv:value>new</sv:value> </sv:property> <sv:property sv:name="hippostdpubwf:createdBy" sv:type="String"> <sv:value>sitewriter</sv:value> </sv:property> <sv:property sv:name="hippostdpubwf:creationDate" sv:type="Date"> <sv:value>2014-11-17T15:46:08.202+01:00</sv:value> </sv:property> <sv:property sv:name="hippostdpubwf:lastModificationDate" sv:type="Date"> <sv:value>2014-11-17T15:46:08.202+01:00</sv:value> </sv:property> <sv:property sv:name="hippostdpubwf:lastModifiedBy" sv:type="String"> <sv:value>sitewriter</sv:value> </sv:property> <sv:property sv:name="hippotranslation:id" sv:type="String"> <sv:value>51143f24-a5f2-4c94-bacb-6b765979c3e4</sv:value> </sv:property> <sv:property sv:name="hippotranslation:locale" sv:type="String"> <sv:value>en</sv:value> </sv:property> </sv:node>
</sv:node>--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
final String absPathNode = wpm.createAndReturn(dotoItemFolderPath, JcrContentsScope.HippoCmsAppTodoList.JCR_TODO_ITEM_TYPE, todoNodeName, true);final Todoitem todoItemHippoBean = (Todoitem)wpm.getObject(absPathNode);
todoItemHippoBean.getNode().setProperty("hippocmsapptodolist:title", SimpleHtmlExtractor.getText(itemDTO.getTitle()));
todoItemHippoBean.getNode().setProperty("hippocmsapptodolist:content", SimpleHtmlExtractor.getText(itemDTO.getContent()));
wpm.update(todoItemHippoBean);