Search code examples
javaspringhippocms

New document by BaseHstComponent: Could not obtain workflow 'default'


I created my hst spring-delegated-bean and it's injected and invoked correctly.

I attempted to Submit a form, acquire form data into dto and create and save my Todoitem.

My "Todoitem" bean extends HippoDocument and implements ContentNodeBinder.

I put DTO to Node conversion within bind method:

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

I wrote this code into doAction method:

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);

Well, now I can see new node by Hippo Console but title and content are not valorized. I also received this message log:

[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.

I also configured permissions readwrite for sitewriters in domains workflow and hippodocuments.

I don't understand...what is my error please?

Thanks


Solution

  • Could you try to import the user-generated-content domain into you domains just as the gogreen does with comments:

    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

    It seems the sitewriter doesn't have privileges to access the correct workflow actions. With the domain you should be able to do the workflow actions as you have described.

    Good luck,