4 Replies Latest reply on Aug 22, 2011 6:02 AM by Tihomir Surdilovic

    Custom processes in jBPM 5.1 console

    Michał Warecki Novice

      Hi,

       

      I discovered an issue while retrieving custom processes in jBPM 5.1 console.

      I've configured persistence.xml and testDS1 for my already created processes in MySQL db. Also I set workDefinitions inside jbpm-gwt-console for custom WorkItem Handlers and set -Djbpm.console.directory to directory where my processes are placed. When I'm trying to read processes in jbpm console I've got exceptions:

       

       

      org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not find true

      org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)

      org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)

      org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)

      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)

      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)

      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not find true
           org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:185)
           org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
           org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
           org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
           org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
           org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
           org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
           org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           java.lang.reflect.Method.invoke(Method.java:597)
           org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
           org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
           org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
           org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
           org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
           org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
           org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
           org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
           org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      java.lang.IllegalArgumentException: Could not find true
           org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:111)
           org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:193)
           org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:71)
           org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35)
           org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22)
           org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19)
           org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
           org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           java.lang.reflect.Method.invoke(Method.java:597)
           org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
           org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
           org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
           org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
           org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
           org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
           org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
           org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
           org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

       

      What is the reason of this exception? More interesting question: How can I set this custom work item definitions if there are deployed in other spring-based web application? Is it possible to just browse already created processes without execution? Execution of this processes will be left for my spring-based web app.

       

      I want to use jBPM console for just browsing and check status (in graph viewer in case of processes) of  processes and task.

       

      Thanks in advance.

        • 1. Re: Custom processes in jBPM 5.1 console
          Michał Warecki Novice

          I have discovered that this issue was caused by my file system. I have resolved that and now jBPM see this process definition but now there is other with diagram preview: "No diagram associated with process" and exception in console:

           

          org.drools.repository.RulesRepositoryException: javax.jcr.PathNotFoundException: pl.edu.wat.mw.RetailSales-image

              at org.drools.repository.PackageItem.loadAsset(PackageItem.java:724)

              at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:180)

              at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:76)

              at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:135)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:625)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

              at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

              at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

              at java.lang.Thread.run(Thread.java:619)

          Caused by: javax.jcr.PathNotFoundException: pl.edu.wat.mw.RetailSales-image

              at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2437)

              at org.drools.repository.PackageItem.loadAsset(PackageItem.java:720)

              ... 30 more

          2011-08-21 14:14:39,668 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/drools-guvnor].[PackageDeploymentServlet]] (http-localhost%2F127.0.0.1-8080-4) Servlet.service() for servlet PackageDeploymentServlet threw exception

          javax.jcr.PathNotFoundException: pl.edu.wat.mw.RetailSales-image

              at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2437)

              at org.drools.repository.PackageItem.loadAsset(PackageItem.java:720)

              at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:180)

              at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:76)

              at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:135)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:625)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

              at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

              at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

              at java.lang.Thread.run(Thread.java:619)

          • 2. Re: Custom processes in jBPM 5.1 console
            Tihomir Surdilovic Master

            Console could not find your process image (pl.edu.wat.mw.RetailSales-image.png) on the classpath, so it tried to find it in Guvnor and could not find it there either. Try putting your process image alongside the process.

            • 3. Re: Custom processes in jBPM 5.1 console
              Michał Warecki Novice

              Ok but how can I make this process image? Should I make screenshot or what ? :-)

              • 4. Re: Custom processes in jBPM 5.1 console
                Tihomir Surdilovic Master

                If you are using Eclipse see video http://people.redhat.com/kverlaen/jBPM5-guvnor-integration.swf.

                If you are using the web Designer, see this video: http://vimeo.com/26126678.

                 

                Either way, you do not have to make a screenshot yourself