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

Woonsan Ko w.ko at onehippo.com
Wed May 19 09:52:30 CEST 2010


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



More information about the Hippo-cms7-user mailing list