<!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;"> </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;"> </p><p><process processType="Private" isExecutable="true" id="com.sample.bpmn" name="Sample Process" tns:packageName="defaultPackage" ></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <extensionElements></p><p>     <tns:import name="defaultPackage.Person" /></p><p>    </extensionElements></p><p>    <!-- process variables --></p><p>    <property id="p" itemSubjectRef="_pItem"/></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- nodes --></p><p>    <startEvent id="_1" name="StartProcess" /></p><p>    <endEvent id="_3" name="End" ></p><p>        <terminateEventDefinition /></p><p>    </endEvent></p><p><span>    <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>" ></span></p><p>      <script><strong>p = new Person("john", 19);</strong></script></p><p>    </scriptTask></p><p><span>    <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>" ></span></p><p>      <script><strong>kcontext.getKnowledgeRuntime().insert(p);</strong></p><p></script></p><p>    </scriptTask></p><p>    <businessRuleTask id="_7" name="Fire rules" g:ruleFlowGroup="<strong>test</strong>" ></p><p>    </businessRuleTask></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- connections --></p><p>    <sequenceFlow id="_7-_3" sourceRef="_7" targetRef="_3" /></p><p>    <sequenceFlow id="_1-_4" sourceRef="_1" targetRef="_4" /></p><p>    <sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" /></p><p>    <sequenceFlow id="_6-_7" sourceRef="_6" targetRef="_7" /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </process></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here is the simple rule which is supposed to be fired:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>package defaultPackage</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rule "test.Rule1"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>ruleflow-group "<strong>test</strong>"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    when</p><p>        $p : Person()</p><p>    then</p><p>        System.out.println( "Person " + $p );</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>end</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </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;"> </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>