4 Replies Latest reply on Nov 5, 2012 6:09 AM by Felix Becker

    decision table matrix format

    Felix Becker Newbie

      Hello everybody,


      i'm new at jboss / drools and i got some issues.


      What is the project about:

      I'm studying informatics (master, cooperative) in germany. Currently, i'm on an practical semester and i'm analyzing a possible use of drools at a company project.

      The customer is a logistics companie for which we are inventing an application to request the current state of a shippment. This application uses a database, in which all events to a particular shippment are stored, to build the current state of the shippment. Furthermore this application builds the new state via a state matrix decision table, which looks like this:



      This means, State' = State + Event

      This matrix decision table has a size of 67 x 87. The outcome of this are 5.829 possible combinations which means, 5.829 rules.




      A possible way to compile this .xls into a drl string format, is using the RuleMatrixSheetListener().

      But this means, that the compilation will be done by sourcecode itselfs.


      Because the operating department wants to change this rules on their own, we have to swap this process out of the sourcecode. So i tried to use guvnor. And here i got the first problem. Is there a possibility to upload and compile a matrix decision table? I tried to generate a new rule by uploading this .xls as a decision table and got the error message, "Invalid column header: "S901", should be CONDITION, ACTION or attribute, in cell B13". I think that the guvnor tries to compile this matrix decision table as a normal decision table.


      My second idea was to precompile the .xls via RuleMatrixSheetListener() and to save the drl string into a drl file. After that i tried to create a new package by importing the created drl file. The upload takes a lot of time to load and while compiling, i got a lot of WARN messages like this one:

      "11:41:44,158 WARN  [org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint] (http-- validation of reference constraint is not yet implemented"


      After importing i got success message but finally this error message:

      "11:55:31,409 WARN  [org.jboss.seam.transaction.TransactionServletListener] (http-- Error starting the transaction: javax.transaction.NotSupportedException:

      BaseTransaction.checkTransactionState -ARJUNA016051: thread is already associated with a transaction!"


      The package was created but i cant open it without getting an big error message. Are 5.829 rules to much be to imported into guvnor?


      Could someone help me with that issue?



      Thanks and Regards from Germany



        • 1. Re: decision table matrix format
          tengyu ma Newbie


               The picture is too small, so I do not know whether the decision table format is correct or not. I suggest you read the drools document about the decision table.

              ,I'm Chinese, my English is poor.

          • 2. Re: decision table matrix format
            Felix Becker Newbie

            Hi tengyu,


            the picture should only visualize that this is a matrix decision table.

            The format of the decision table and it's configuration fields at the beginning of the .xls are correct, because it is possible to compile it with drools expert. So it's not the structure, infact it will be the missing matrix compilation feature at guvnor.

            Furthermore i found out, that a uploaded decision table at guvnor, can't be compiled into rule assets. This means, that this decision table can be loaded from guvnor ondemand, but this does not accept work, because this decision table has to be compiled at runtime.


            The longer i work with guvnor, it fiels i'm working with a pre-Alpha-Version. Non-stop error messages, not supported features, which drools expert gots and so on.


            But maybe some can tell me a trick to get a matrix decision table working on guvnor.





            • 3. Re: decision table matrix format
              tengyu ma Newbie

              Hi Suerte,

                    Maybe you are right, That this decision table has to be compiled at runtime. It won't be compiled into rule assets, but it can convert Guided decision table.

                    It maybe use Drools api to compile and execute it.

                     I have tried it. I upload a well-format decision table and access it in my application. It's OK.

                    I use the Guvnor-5.4.0.Final. you may use it and try it.  


                    Your Friend,


              • 4. Re: decision table matrix format
                Felix Becker Newbie

                hi tengyu,


                thank you for being a part of this discussion. unfortunately we are only in pairs and no expert is joining this conversation. this would help us a lot.


                @ your reply:

                You only uploaded an well-format decision table. i tried this too and it works for me too. i converted the uploaded .xls into a web-decision-table. guvnor created new assets and i could edit in a web view. but also in this case, guvnor does not create technical assets like when .. then. This causes in an runtime compilation. Ok this won't be a big problem, because there is a knowledgeagend.


                But there is no possibility to upload and convert a MATRIX decision table. this means our business units have to edit and upload it manually into a specific folder on the server.