<!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;">
    org.drools.RuntimeDroolsException: invalid package name
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/stellina_rosa">stellina_rosa</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/609900#609900">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!</p><p>in my process there is a rule-task that set some process variable... for example, this is one rule:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'courier new', courier;">rule "no result"</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;ruleflow-group "rules"</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;when</span></p><p>&#160; </p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$process: WorkflowProcessInstance()</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$c: CostFlight(cost == "0") </span></p><p>&#160; </p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;then </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; System.out.println("Nosolution avaible!");</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; $process.setVariable("result","no_result");</span></p><p>&#160; </p><p><span style="font-family: 'courier new', courier;">end</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>and at this point I haven't any problem. If I use a diverging gateway ( XOR) with 2 possible way, I must write 2 constraint like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>(to node NO_RESULT)</p><p><span style="font-family: 'courier new', courier;"> org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();&#160;&#160;&#160;&#160; </span></p><p><span style="font-family: 'courier new', courier;"> return "no_result".equals(process.getVariable("result"));</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>(to node RESULT)</p><p><span style="font-family: 'courier new', courier;"> org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();&#160;&#160;&#160;&#160; </span></p><p><span style="font-family: 'courier new', courier;"> return "ok".equals(process.getVariable("result"));</span></p><p><span style="font-family: 'courier new', courier;"><br/></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>but when I try to launch it, I have this ERROR:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: 'courier new', courier;">org.drools.RuntimeDroolsException: invalid package name</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jbpm.compiler.ProcessBuilderImpl.buildProcess(ProcessBuilderImpl.java:175)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:254)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:430)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:470)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:65)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.sample.ProcessTest.main(ProcessTest.java:35)</span></p><p><span style="font-family: 'courier new', courier;">[5,58]: [ERR 102] Line 5:58 mismatched input 'process' expecting '(' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-11-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance</span></p><p><span style="font-family: 'courier new', courier;">[5,119]: [ERR 102] Line 5:119 mismatched input ')' expecting '(' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-11-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance</span></p><p><span style="font-family: 'courier new', courier;">[5,120]: [ERR 102] Line 5:120 mismatched input 'kcontext' expecting ')' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-11-DROOLS_DEFAULT"</span></p><p><span style="font-family: 'courier new', courier;">[6,7]: [ERR 101] Line 6:7 no viable alternative at input 'return' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-11-DROOLS_DEFAULT"</span></p><p><span style="font-family: 'courier new', courier;">[6,53]: [ERR 101] Line 6:53 no viable alternative at input '"risultato"' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-11-DROOLS_DEFAULT" in pattern equals</span></p><p><span style="font-family: 'courier new', courier;">[13,58]: [ERR 102] Line 13:58 mismatched input 'process' expecting '(' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-12-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance</span></p><p><span style="font-family: 'courier new', courier;">[13,119]: [ERR 102] Line 13:119 mismatched input ')' expecting '(' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-12-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance</span></p><p><span style="font-family: 'courier new', courier;">[13,120]: [ERR 102] Line 13:120 mismatched input 'kcontext' expecting ')' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-12-DROOLS_DEFAULT"</span></p><p><span style="font-family: 'courier new', courier;">[14,7]: [ERR 101] Line 14:7 no viable alternative at input 'return' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-12-DROOLS_DEFAULT"</span></p><p><span style="font-family: 'courier new', courier;">[14,46]: [ERR 101] Line 14:46 no viable alternative at input '"risultato"' in rule "RuleFlow-Split-com.sample.bpmn.hello-13-12-DROOLS_DEFAULT" in pattern equals</span></p><p><span style="font-family: 'courier new', courier;">org.drools.compiler.ProcessLoadError: unable to parse xml : Exception class org.drools.RuntimeDroolsException : invalid package name</span></p><p><span style="font-family: 'courier new', courier;">java.lang.IllegalArgumentException: Could not parse knowledge.</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:58)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:67)</span></p><p><span style="font-family: 'courier new', courier;">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.sample.ProcessTest.main(ProcessTest.java:35)</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>could anyone help me?I can't understand where is the problem!</p><p>thank you very much</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/609900#609900">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>