3 Replies Latest reply on Jun 21, 2011 8:50 AM by stellina_rosa

    diverging gateway... what's wrong?

    stellina_rosa Newbie

      Hi!

      I'm becoming crazy because I don't understand where is the problem in my diverging gateway constraint! I attach you my process.png...

      in the sub-process I use a drools file where the process variables prenota_bb && prenota_hotel (both boolean) are update and stored: I can take the value in the main process (I tested it with a print), but if I use a diverging gateway with these constraint it doesn't work:

       

      to node hotel :

       

      org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();    

      return "true".equals(process.getVariable("prenota_hotel"));

       

      to node hotel :

       

      org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();    

      return "true".equals(process.getVariable("prenota_bb"));

       

      AND THE ERROR IS:

       

      org.drools.RuntimeDroolsException: invalid package name

                at org.jbpm.compiler.ProcessBuilderImpl.buildProcess(ProcessBuilderImpl.java:175)

                at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:254)

                at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:430)

                at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:470)

                at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)

                at com.sample.ProcessTest.createKSession(ProcessTest.java:78)

                at com.sample.ProcessTest.main(ProcessTest.java:42)

       

      Compiling resources

      Error building kbase: [ERR 102] Line 5:58 mismatched input 'process' expecting '(' in rule "RuleFlow-Split-com.myProcess.bpmn-6-7-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance

      Error building kbase: [ERR 102] Line 5:119 mismatched input ')' expecting '(' in rule "RuleFlow-Split-com.myProcess.bpmn-6-7-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance

      Error building kbase: [ERR 102] Line 5:120 mismatched input 'kcontext' expecting ')' in rule "RuleFlow-Split-com.myProcess.bpmn-6-7-DROOLS_DEFAULT"

      Error building kbase: [ERR 101] Line 6:1 no viable alternative at input 'return' in rule "RuleFlow-Split-com.myProcess.bpmn-6-7-DROOLS_DEFAULT"

      Error building kbase: [ERR 101] Line 6:42 no viable alternative at input '"prenota_automobile"' in rule "RuleFlow-Split-com.myProcess.bpmn-6-7-DROOLS_DEFAULT" in pattern equals

      Error building kbase: [ERR 102] Line 13:58 mismatched input 'process' expecting '(' in rule "RuleFlow-Split-com.myProcess.bpmn-6-8-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance

      Error building kbase: [ERR 102] Line 13:119 mismatched input ')' expecting '(' in rule "RuleFlow-Split-com.myProcess.bpmn-6-8-DROOLS_DEFAULT" in pattern org.drools.runtime.process.WorkflowProcessInstance

      Error building kbase: [ERR 102] Line 13:120 mismatched input 'kcontext' expecting ')' in rule "RuleFlow-Split-com.myProcess.bpmn-6-8-DROOLS_DEFAULT"

      Error building kbase: [ERR 101] Line 14:1 no viable alternative at input 'return' in rule "RuleFlow-Split-com.myProcess.bpmn-6-8-DROOLS_DEFAULT"

      Error building kbase: [ERR 101] Line 14:42 no viable alternative at input '"prenota_bb"' in rule "RuleFlow-Split-com.myProcess.bpmn-6-8-DROOLS_DEFAULT" in pattern equals

      Error building kbase: unable to parse xml : Exception class org.drools.RuntimeDroolsException : invalid package name

      Error building kbase: unable to parse xml : Exception class org.drools.RuntimeDroolsException : invalid package name

      java.lang.RuntimeException: Error building kbase!

                at com.sample.ProcessTest.createKSession(ProcessTest.java:91)

                at com.sample.ProcessTest.main(ProcessTest.java:42)

       

       

      PLEASE HELP ME...