<!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="https://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;">
    Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/stmarci">Márton Steierlein</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/727904#727904">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Dear Mahdi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You have the following options:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>you use guvnor to declare a declarative model using the web interface (Create New -&gt; Declarative model).</li></ul><p>You can then use this as an object in your process variables (Object type). The fields are accessed using getters and setters (auto generated). They use java beans notation, so for example if you have:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>boolean readonly; -&gt; boolean isReadonly(), void setReadonly(boolean)</p><p>String designatedName; -&gt; String getDesignatedName(), void setDesignatedName()</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The problem with this is that you might have a hard time using it outside the scope of the jBPM framework. I am using the REST interface of jBPM to access the variables of a process (/gwt-console-server/rs/process/instance/&lt;instance number&gt;/dataset) and I don't see a way to deserialize it into a Java object. This is the reason why I'm using the following:</p><ul><li>Upload a POJO model jar where you can declare your own classes. The problem with this is that the server side component of the jBPM console cannot deserialize the object and silently throws a RuntimeException which you cannot see in the logs.</li></ul><p>You can circumvent this headache by exploding your jbpm-gwt-console-server.war (unzip into a directory with the same name with the .war extension like /opt/jbpm/&lt;jboss version&gt;/standalone/deployments/jbpm-gwt-console-server.war/). By doing this, the hot-deploy feature gets disabled so you need to create a file with 'touch' whenever you need to redeploy your applications.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In order to make jBPM work with your custom JAR you'll need to copy it into the above mentioned directory (jbpm-gwt-console-server) into the WEB-INF/lib directory. Once you are done with that, you signal jBoss to redeploy the application (int the deployments directory)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>touch jbpm-gwt-console-server.war.dodeploy</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then navigate to jbpm-console in your browser and hit ctrl+r. After that you should be able to see your processes. Remember always use the same jar in guvnor and the console-server. Don't forget to build your package and setup your imports in guvnor. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you have static classes, you might need to restart the entire jBPM framework (including jBoss), so I would suggest avoiding them in your models.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you have further questions don't hesitate to contact me.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards,</p><p>M&#225;rton</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/727904#727904">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://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>