<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Connecting Console with Guvnor
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/calca">Demian Calcaprina</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/611043#611043">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi All,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am trying to connect Guvnor with the jbpm console. It is almost working, but now I am facing one problem.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have my processes, rules and process images in a package "org.test..".</p><p>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).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Checking the logs I find that, first, the definitions point to the right package:</p><p><span>INFO&#160; 20-06 13:18:14,021 (NilAuthenticator.java:authenticate:35) All users are guests.INFO&#160; 20-06 13:18:14,021 (RepositoryServlet.java:allowUser:114) admin authenticated for rest apiINFO&#160; 20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:141) PackageName: org.testINFO&#160; 20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:142) PackageVersion: LATESTINFO&#160; 20-06 13:18:14,022 (PackageDeploymentServlet.java:execute:143) PackageIsLatest: trueINFO&#160; 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='</span><a class="jive-link-external-small" href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST</a><span>']</span></p><p><a class="" href="http://community.jboss.org/message/611043#611043#611043/2011-06-20 13:18:14,300:debug">Connecting Console with Guvnor</a><span> KnowledgeAgent mapping resource=[UrlResource path='</span><a class="jive-link-external-small" href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.test/LATEST</a><span>'] to KnowledgeDefinition=[Rule name=Exceeds, agendaGroup=MAIN, salience=0, no-loop=false]</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>However, the log continues and I can see many exceptions like this:</p><p><span>java.io.IOException: Server returned HTTP response code: 500 for URL: </span><a class="jive-link-external-small" href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/Milestone_completed-image.png" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/Milestone_completed-image.png</a></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.net.URL.openStream(URL.java:1010)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jbpm.integration.console.graph.GraphViewerPluginImpl.getDiagramURL(GraphViewerPluginImpl.java:255)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If I check the following code:</p><p>org.jbpm.integration.console.graph.GraphViewerPluginImpl:</p><p>public URL getDiagramURL(String id) {</p><p>...</p><p><span>sb.append("</span><a class="jive-link-external-small" href="http://" target="_blank">http://</a><span>");</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sb.append(properties.get("jbpm.console.server.host"));</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sb.append(":").append(new Integer(properties.getProperty("jbpm.console.server.port")));</p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sb.append("/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/");</strong></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sb.append(URLEncoder.encode(id, "UTF-8"));</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sb.append("-image.png");</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It there a way to indicate the console to use not the default packages for png and also drl (AbstractFormDispatcher has the same logic)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Demian</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/611043#611043">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>