<!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;">
    Can not fire a rule
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/dmitry.erkin">Dmitry Erkin</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/787997#787997">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here is my first JBPM sample process whose purpose is to fire the simple rule:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;process processType="Private" isExecutable="true" id="com.sample.bpmn" name="Sample Process" tns:packageName="defaultPackage" &gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; &lt;extensionElements&gt;</p><p>&#160;&#160;&#160;&#160; &lt;tns:import name="defaultPackage.Person" /&gt;</p><p>&#160;&#160;&#160; &lt;/extensionElements&gt;</p><p>&#160;&#160;&#160; &lt;!-- process variables --&gt;</p><p>&#160;&#160;&#160; &lt;property id="p" itemSubjectRef="_pItem"/&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; &lt;!-- nodes --&gt;</p><p>&#160;&#160;&#160; &lt;startEvent id="_1" name="StartProcess" /&gt;</p><p>&#160;&#160;&#160; &lt;endEvent id="_3" name="End" &gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;terminateEventDefinition /&gt;</p><p>&#160;&#160;&#160; &lt;/endEvent&gt;</p><p><span>&#160;&#160;&#160; &lt;scriptTask id="_4" name="Create new person" scriptFormat="</span><a class="jive-link-external-small" href="http://www.java.com/java" target="_blank">http://www.java.com/java</a><span>" &gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;script&gt;<strong>p = new Person("john", 19);</strong>&lt;/script&gt;</p><p>&#160;&#160;&#160; &lt;/scriptTask&gt;</p><p><span>&#160;&#160;&#160; &lt;scriptTask id="_6" name="Add the fact that new person is created" scriptFormat="</span><a class="jive-link-external-small" href="http://www.java.com/java" target="_blank">http://www.java.com/java</a><span>" &gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;script&gt;<strong>kcontext.getKnowledgeRuntime().insert(p);</strong></p><p>&lt;/script&gt;</p><p>&#160;&#160;&#160; &lt;/scriptTask&gt;</p><p>&#160;&#160;&#160; &lt;businessRuleTask id="_7" name="Fire rules" g:ruleFlowGroup="<strong>test</strong>" &gt;</p><p>&#160;&#160;&#160; &lt;/businessRuleTask&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; &lt;!-- connections --&gt;</p><p>&#160;&#160;&#160; &lt;sequenceFlow id="_7-_3" sourceRef="_7" targetRef="_3" /&gt;</p><p>&#160;&#160;&#160; &lt;sequenceFlow id="_1-_4" sourceRef="_1" targetRef="_4" /&gt;</p><p>&#160;&#160;&#160; &lt;sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" /&gt;</p><p>&#160;&#160;&#160; &lt;sequenceFlow id="_6-_7" sourceRef="_6" targetRef="_7" /&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; &lt;/process&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here is the simple rule which is supposed to be fired:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>package defaultPackage</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>rule "test.Rule1"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ruleflow-group "<strong>test</strong>"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; when</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $p : Person()</p><p>&#160;&#160;&#160; then</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println( "Person " + $p );</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>end</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Nothing hapens when I start an instance of my sample process. I mean the server log does not have "Person " string.</p><p>What is wrong with my sample?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Regards,</p><p>Dmitry Erkin</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/787997#787997">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>