8 Replies Latest reply on Apr 1, 2013 11:05 AM by stangirala

    Guvnor - build package problem, import definitions

    urdo2

      Hi

       

      I've designed simple process definition on Guvnor. Process includes imports (ex. java.util.HashMap). Now, when I build package (Guvnor - build pacakge), I get a "Process Compilation error HashMap cannot be resolved to a type HashMap cannot be resolved to a type" error.

       

      Oryx-designer generate:

       

      <bpmn2:extensionElements>

                  <emfextmodel:import name="java.util.HashMap"/>

              </bpmn2:extensionElements>

       

       

      Guvnor ver. : guvnor-distribution-wars-5.2.0.Final-jboss-as-5.1

      Designer ver. : designer-1.0.0.054-jboss

      JBPM ver. : jbpm-5.2.0-SNAPSHOT

       

       

      Is "import declarations", supported by Guvnor+JBPM ?

        • 1. Re: Guvnor - build package problem, import definitions
          tsurdilovic

          >> I get a "Process Compilation error HashMap cannot be resolved to a type HashMap cannot be resolved to a type" error. <<

          The Guvnor package you have your process in and are building has to have the proper imports defined.

          Click on your package, and select the "Edit" tab, then under "Configuration: Imported Types" click the green "+" image to add another import type.

          In the popup shown, in the "(advanced) class name:" text box type in java.util.HashMap, then the "OK" button. Validate your configuration, and then build your package again. It should build fine now.

           

          Hope this helps.

           

          Thanks.

          • 2. Re: Guvnor - build package problem, import definitions
            stangirala

            Hi Tihomir,

             

            I tried to create a sample process and have some imports of external classes from odata4j jars, but when I add it as you mentioned, it validates successfully, but when I build it throws process compilation error. Not sure how to add external jars to guvnor process import... any ideas?

             

            This is the error I get :

             

            Process Compilation error ODataConsumer cannot be resolved to a type ODataConsumers cannot be resolved FormatType.JSON cannot be resolved to a type OClientBehaviors cannot be resolved OEntity cannot be resolved to a type List cannot be resolved to a type OEntity cannot be resolved to a type OQueryRequest cannot be resolved to a type OEntity cannot be resolved to a type OEntity cannot be resolved to a type List cannot be resolved to a type OProperty cannot be resolved to a type OProperty cannot be resolved to a type EdmType cannot be resolved to a type

             

            Thanks,

            Shailendra

            • 3. Re: Guvnor - build package problem, import definitions
              tsurdilovic

              Check the Guvnor documentation. It describes how to add package-level imports  - http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/index.html#d0e2975

              • 4. Re: Guvnor - build package problem, import definitions
                stangirala

                Hi, I am talking about external third party jars which have dependency on my process. I tried adding to dependencies folder and then try to install it, but still the issue remains...

                 

                Not sure what is the process of adding third party jars...

                 

                Process Compilation error ODataConsumer cannot be resolved to a type ODataConsumers cannot be resolved FormatType.JSON cannot be resolved to a type OClientBehaviors cannot be resolved OEntity cannot be resolved to a type List cannot be resolved to a type OEntity cannot be resolved to a type OQueryRequest cannot be resolved to a type OEntity cannot be resolved to a type OEntity cannot be resolved to a type List cannot be resolved to a type OProperty cannot be resolved to a type OProperty cannot be resolved to a type EdmType cannot be resolved to a type

                 

                Regards,

                Shailendra

                • 5. Re: Guvnor - build package problem, import definitions
                  tsurdilovic

                  Can you attach your latest bpmn2. I'll take a look. If you get these errors during package build time, then its setting your package imports and process imports correctly. If it's at runtime then it's something in your bpmn2.

                  • 6. Re: Guvnor - build package problem, import definitions
                    stangirala

                    Hi,

                     

                    Here is the bpm process...

                     

                    Thanks for your reply.

                     

                    Regards,

                    Shailendra

                    • 7. Re: Guvnor - build package problem, import definitions
                      stangirala

                      Hi,

                       

                      It is during build time. The same process works fine in eclipse environment. So I tried couple of ways to import external jars...

                       

                      1) Put in depency folder so that they can added to lib directory once I do clean build and I see those jar added to the jbpm-gwt-console-server.war. Started the JBoss and still get this errors as not able to find the classes.

                      2) Add them as a part of "Edit Configuration" and added all the imports there... but same issue...

                       

                      Any debug parameters I can use to see whats being done while I build package?

                       

                      Thanks,

                      Shailendra

                      • 8. Re: Guvnor - build package problem, import definitions
                        stangirala

                        process_build1.bmpAdding the image