2 Replies Latest reply on Oct 11, 2013 10:19 AM by Keith West

    Delayed/Slow Loading of Processes in jbpm-console

    Keith West Newbie

      My environment consists of jBPM 5.4, using Java 1.7, JBOSS AS 7.2, running on RHEL 5.8. All of the web components of jBPM 5.4 appear to be working fine in this environment. However, one thing I've noticed when I first start the apps server with the jBPM components, and then login to jbpm-console, that it takes approximately 3 minutes before any process definitions show up in the Process Overview tab. I have configred the the console to get these process definitions from both the file system and from Guvnor, defaultpackage.


      Below is an excerpt from the server log. The line with FormDispatcherPlugin is where I logged into jbpm-console, and the line with "Loading process..." is where the application finally loaded the first bpmn file. This is over 3 minutes later,


      2013-10-10 14:37:55,334 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.0.Final "Janus" started in 33992ms - Started 572 of 646 services (71 services are passive or on-demand)


      2013-10-10 14:38:45,030 INFO [org.jboss.bpm.console.server.plugin.PluginMgr] (http-/ Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin': class org.jbpm.integration.console.forms.FormDispatcherComposite


      2013-10-10 14:38:45,036 INFO [org.jboss.bpm.console.server.plugin.PluginMgr] (http-/ Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.GraphViewerPlugin': class org.jbpm.integration.console.graph.GraphViewerPluginImpl


      2013-10-10 14:38:57,854 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http-/ Found BeanManager at java:comp/BeanManager


      2013-10-10 14:38:57,891 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http-/ Deploying javax.ws.rs.core.Application: class org.drools.guvnor.server.jaxrs.GuvnorRestApplication$Proxy$_$$_WeldClientProxy


      2013-10-10 14:42:10,736 INFO [org.jbpm.integration.console.kbase.DefaultKnowledgeBaseManager] (http-/ Loading process from file system: Evaluation.bpmn


      2013-10-10 14:42:11,910 INFO [org.hibernate.cfg.Configuration] (http-/ HHH000221: Reading mappings from resource: META-INF/JBPMorm-JPA2.xml




      I had seen a post somewhere that indicated this should take maybe 10-15 seconds, but is clearly taking longer in our env. Given this, I had a few questions...


      - Why does it take this long to start loading the processes?

      - Is this time configurable in some way?

      - Where in the jbpm-console (gwt) code would one find the logic that deals with loading processes?


      In the jbpm user guide, there is a bullet that states the following:


      • Currently, the console will load the process definitions the first time the list of processes is requested in the console. At this point, automatic updating from Guvnor when the package is rebuilt is turned off by default, so you will have to either configure this or restart the application server to get the latest versions.


      How and where do I configure the console to automatically pick up changes form Guvnor. Currently I have to restart the server, and then wait 3 minutes after to see new processes.





        • 1. Re: Delayed/Slow Loading of Processes in jbpm-console
          Maciej Swiderski Master

          the loading time depends on number of processes and rules that need to be loaded. In v5 loading of processes happens on first logon to application when both kbase and ksession is initialized. It is configured to load processes and rules from guvnor directly so you need to ensure that they are configured properly - as by default they use localhost 8080. So in your case it might be some different settings for the host end port that prevents from loading it quickly like some network delays or DNS resolving, firewall, etc.

          Code responsible for it is part of the jbpm-gwt-console-server module. It's not configurable as in general it should not take much time for reasonable amount of assets to process. What is the volume of your kbase? Is it high number of processes and rules to load?



          • 2. Re: Delayed/Slow Loading of Processes in jbpm-console
            Keith West Newbie

            The number of processes is 2 - the Evaluation sample process (from the file system), and 1 simple process from Guvnor. This is the only part of any of the components that is slow, which is why I was wanting to know where in the gwt-console code is the logic for accessing the processes, so I could try and figure out why this is occurring. Everything is running on one Linux instance, other than the repository, which is on a Postgres database in another instance. So, all settings are using localhost:8080. But since there is only 1 process to obtain from Guvnor repository, wouldn't think that would take so long.


            I didn't want another question to get lost in the mix here - how does one configure gwt-console to periodically obtain updated packages from Guvnor? Right now the only way I can get them is to stop/restart the apps server.