1 Reply Latest reply on Jul 5, 2011 10:12 AM by Demian Calcaprina

    Connecting Console with Guvnor

    Demian Calcaprina Master

      Hi All,

       

      I am trying to connect Guvnor with the jbpm console. It is almost working, but now I am facing one problem.

       

      I have my processes, rules and process images in a package "org.test..".

      When go to the process part of the console, I can see the deployed processes and create instances. However, I cannot see the process image (it says there is no image).

       

      Checking the logs I find that, first, the definitions point to the right package:

      INFO  20-06 13:18:14,021 (NilAuthenticator.java:authenticate:35) All users are guests.
      INFO  20-06 13:18:14,021 (RepositoryServlet.java:allowUser:114) admin authenticated for rest api
      INFO  20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:141) PackageName: org.test
      INFO  20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:142) PackageVersion: LATEST
      INFO  20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:143) PackageIsLatest: true
      INFO  20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:144) PackageIsSource: false

      [2011-06-20 13:18:14,300:debug] KnowledgeAgent obtaining pkg resource=[UrlResource path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST']

      [2011-06-20 13:18:14,300:debug] KnowledgeAgent mapping resource=[UrlResource path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST'] to KnowledgeDefinition=[Rule name=Exceeds, agendaGroup=MAIN, salience=0, no-loop=false]

       

      However, the log continues and I can see many exceptions like this:

      java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/Milestone_completed-image.png

                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)

                at java.net.URL.openStream(URL.java:1010)

                at org.jbpm.integration.console.graph.GraphViewerPluginImpl.getDiagramURL(GraphViewerPluginImpl.java:255)

       

       

      If I check the following code:

      org.jbpm.integration.console.graph.GraphViewerPluginImpl:

      public URL getDiagramURL(String id) {

      ...

      sb.append("http://");

                                    sb.append(properties.get("jbpm.console.server.host"));

                                    sb.append(":").append(new Integer(properties.getProperty("jbpm.console.server.port")));

                                    sb.append("/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/");

                                    sb.append(URLEncoder.encode(id, "UTF-8"));

                                    sb.append("-image.png");

      }

       

      It there a way to indicate the console to use not the default packages for png and also drl (AbstractFormDispatcher has the same logic)

       

      Thanks

       

      Demian