4 Replies Latest reply on Sep 10, 2009 2:50 AM by kukeltje

    drools in jbpm-console

    nl

      Hi,

      is there a way to get the rulesActionHandler example run in the jbpm-console?

      I'm getting the following error on starting an instance:

      08:12:36,160 ERROR [GraphElement] action threw exception: Unable to resolve ObjectType 'Customer' : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
      Unable to resolve ObjectType 'Order' : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
      org.jbpm.action.Customerorg.jbpm.action.OrderRule Compilation error : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
       org/jbpm/action/Rule_Determine_Shipper_0.java (2:33) : Only a type can be imported. org.jbpm.action.Customer resolves to a package
       org/jbpm/action/Rule_Determine_Shipper_0.java (2:109) : Only a type can be imported. org.jbpm.action.Order resolves to a package
      
      org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType 'Customer' : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
      Unable to resolve ObjectType 'Order' : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
      org.jbpm.action.Customerorg.jbpm.action.OrderRule Compilation error : [Rule name=Determine Shipper, agendaGroup=MAIN, salience=0, no-loop=false]
       org/jbpm/action/Rule_Determine_Shipper_0.java (2:33) : Only a type can be imported. org.jbpm.action.Customer resolves to a package
       org/jbpm/action/Rule_Determine_Shipper_0.java (2:109) : Only a type can be imported. org.jbpm.action.Order resolves to a package
      
       at org.drools.rule.Package.checkValidity(Package.java:424)
       at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:394)
       at org.jbpm.action.RulesActionHandler.readRule(RulesActionHandler.java:95)
       at org.jbpm.action.RulesActionHandler.execute(RulesActionHandler.java:39)
       at org.jbpm.graph.def.Action.execute(Action.java:122)


      it looks like drools can't find any of the deployed beans, while it does find those if running in a standalone app. So I don't thing this is a drools problem.

      Does anyone know how to resolve this problem?
      BTW: I'm using jbpm-jpdl-3.2.3.

      Thanks,

      Niels

        • 1. Re: drools in jbpm-console
          prachi.mukhija

          Hi,

          I need to integrate jBPM with drools. And facing exactly the same error. Please help. Its very urgent. Despite all my efforts, it doesn't read the bean classes. I changed the compiler to JANINO as well, but no luck.
          Please help.

          • 2. Re: drools in jbpm-console
            kukeltje

            drools cannot load classes from the processrepository, so if you deployed them there, you might have a problem

            • 3. Re: drools in jbpm-console
              prachi.mukhija

              Hi Ronald,

              Thanks for the reply. What do you mean by processrepository? And how do I make my bean classes visible to Drools?.Where should I deploy them? Please let me know how to integrate it with jbpm-console.

              Many thanks in advance.

              • 4. Re: drools in jbpm-console
                kukeltje

                it has nothing to do with the jBPM console. The jBPM console is just a front-end to jBPM.

                Your bean classes should be somewhere on the classpath where Drools can 'see' them. If you read a little about jBPM, you could know that jBPM 3 deploys processdefinitions to the database (process repository) and that jBPM can read 'versioned actionhandlers' from that repository as well. Other libraries otoh can't. So depending on other configurations of your war/ear/... you can e.g. deploy them in the war, in a jar that is in an ear or whatever... Of-course also depending on how you packaged drools