[Hippo-cms7-user] Exception when trying to create a workflow

Ard Schrijvers a.schrijvers at onehippo.com
Wed May 19 10:15:17 CEST 2010


Hello Mansour and Woonsan,

The problem is when the first folder that has to be created does not
come below of node that is 'known' to be a folder by the workflow.

So, wrt to your error, it says:

The workflow is not a FolderWorkflow for /

This makes me believe, that from the path /mysite/comments, already
'mysite' does not exist. Hence, directly below the jcr:root. The
problem is, that jcr:root is not known as a folder, hence, folder
workflow cannot be applied.

Furthermore, I assume, you also want to expose comments again on your
website, right? Therefore, they can better be part of the documents in
your website. Most likely, if you change

 /mysite/comments to

/content/documents/mysite/comments

everything works just fine. And of course, instead of typing it by
hand, I'd get it from the current hstSite. So, in your HstComponent
extending from BaseHstComponent you can use:

// it is not important where we store comments. WE just use some
(canonical) time path below our project content
String siteCanonicalBasePath =
this.getHstSite(request).getCanonicalContentPath();

Also see Detail.java from the demosuite.

Hope this helps,

regards Ard



On Wed, May 19, 2010 at 9:58 AM, Woonsan Ko <w.ko at onehippo.com> wrote:
> Oh, I've looked into the code, but it seems omitting the empty folder
> name correctly. So, just ignore my previous reply.
>
> By the way, have you modified some workflow configurations in hippo
> repository for some reason such as category name?
>
> Regards,
>
> Woonsan
>
> On Wed, May 19, 2010 at 9:52 AM, Woonsan Ko <w.ko at onehippo.com> wrote:
>> Hi Mansour,
>>
>> Could you try with this?
>>
>>    wpm.create("/mysite/comment", "basic:textdocument", "msg", true);
>>
>> I guess the first parameter with ending slash made the problem.
>> Please let us know the result. Then I'd like to fix this to allow ending slash.
>>
>> Regards,
>>
>> Woonsan
>>
>> On Wed, May 19, 2010 at 12:08 AM, Mansour Al Akeel
>> <mansour.alakeel at gmail.com> wrote:
>>> I am following the TodoList.java example in the demo to create a similar
>>> function for a "Contact Us" page.
>>>
>>>                Session persistableSession = null;
>>>                WorkflowPersistenceManager wpm = null;
>>>
>>>                try {
>>>                        persistableSession = getPersistableSession(request);
>>>                        wpm = getWorkflowPersistenceManager(persistableSession);
>>>                        wpm.setWorkflowCallbackHandler(new WorkflowCallbackHandler<FullReviewedActionsWorkflow>() {
>>>                                                public void processWorkflow(
>>>                                                                FullReviewedActionsWorkflow wf)
>>>                                                                throws Exception {
>>>                                                        FullReviewedActionsWorkflow fraw = (FullReviewedActionsWorkflow) wf;
>>>                                                        log.debug("processing work flow");
>>>                                                        fraw.requestPublication();
>>>                                                }
>>>                                        });
>>>
>>>                        log.debug("Obtained WorkflowCallbackHandler");
>>>                        wpm.create("/mysite/comment/", "basic:textdocument", "msg", true);
>>>
>>>                } catch (Exception e) {
>>>                        log.warn("Failed to create a comment: ", e);
>>>                        if (wpm != null) {
>>>                                try {
>>>                                        wpm.refresh();
>>>                                } catch (ObjectBeanPersistenceException e1) {
>>>                                        log.warn("Failed to refresh: ", e);
>>>                                }
>>>                        }
>>>                } finally {
>>>                        if (persistableSession != null) {
>>>                                persistableSession.logout();
>>>                        }
>>>                }
>>>
>>>
>>>
>>> I am getting this exception.
>>>
>>> org.hippoecm.hst.content.beans.ObjectBeanPersistenceException: The workflow is not a FolderWorkflow for /: Proxy[RepositoryWorkflow,RemoteObjectInvocationHandler[UnicastRef [liveRef:
>>> [endpoint:[127.0.0.1:1099](remote),objID:[334dcf49:128abca20df:-2b2e, 4605523969412514468]]]]]
>>>        at org.hippoecm.hst.content.beans.manager.workflow.WorkflowPersistenceManagerImpl.createNodeByWorkflow(WorkflowPersistenceManagerImpl.java:249)
>>>        at org.hippoecm.hst.content.beans.manager.workflow.WorkflowPersistenceManagerImpl.createMissingFolders(WorkflowPersistenceManagerImpl.java:190)
>>>        at org.hippoecm.hst.content.beans.manager.workflow.WorkflowPersistenceManagerImpl.create(WorkflowPersistenceManagerImpl.java:161)
>>>        at com.sardonyxsolutions.hippocms.components.Contact.doAction(Contact.java:91)
>>>        at org.hippoecm.hst.core.container.HstComponentInvokerImpl.invokeAction(HstComponentInvokerImpl.java:67)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
>>>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
>>>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
>>>        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
>>>        at org.hippoecm.hst.core.logging.HstComponentInvokerProfiler.profile(HstComponentInvokerProfiler.java:70)
>>>        at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
>>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
>>>
>>> Any idea what this means and how to fix it ?
>>> thank you.
>>>
>>> _______________________________________________
>>> Hippo-cms7-user mailing list and forums
>>> http://www.onehippo.org/cms7/support/forums.html
>>>
>>
>>
>>
>> --
>> w.ko at onehippo.com     www.onehippo.com
>> EUROPE • AMSTERDAM - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
>> NORTH AMERICA • SAN FRANCISCO - Hippo USA Inc. 185 H Street, Suite B
>> Petaluma CA 94952 +1 (877) 414-4776
>>
>
>
>
> --
> w.ko at onehippo.com     www.onehippo.com
> EUROPE • AMSTERDAM - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
> NORTH AMERICA • SAN FRANCISCO - Hippo USA Inc. 185 H Street, Suite B
> Petaluma CA 94952 +1 (877) 414-4776
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
>



More information about the Hippo-cms7-user mailing list